Skip to content

Commit 8571699

Browse files
committed
wip
1 parent fcbcc6f commit 8571699

File tree

4 files changed

+437
-0
lines changed

4 files changed

+437
-0
lines changed

kustomize/runtime-installer.cm.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: csdp-installer-cm
5+
data:
6+
csdp.url: <CSDP_URL>
7+
csdp.token: <CSDP_TOKEN>
8+
runtime.name: <RUNTIME_NAME>
9+
runtime.repo: <RUNTIME_REPO>
10+
runtime.gitToken: <RUNTIME_GIT_TOKEN>
11+
runtime.ingressURL: <RUNTIME_INGRESS_URL>
12+
runtime.cluster: <RUNTIME_CLUSTER>

kustomize/runtime-installer.job.yaml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
apiVersion: batch/v1
2+
kind: Job
3+
metadata:
4+
name: csdp-installation-job
5+
spec:
6+
ttlSecondsAfterFinished: 600 # stick around for 10m
7+
backoffLimit: 20
8+
template:
9+
metadata:
10+
name: csdp-installation-job
11+
spec:
12+
serviceAccount: argocd-server
13+
restartPolicy: Never
14+
containers:
15+
- name: csdp-installer
16+
image: csdp-installer
17+
imagePullPolicy: IfNotPresent
18+
command:
19+
- bash
20+
args:
21+
- ./install.sh
22+
env:
23+
- name: NAMESPACE
24+
valueFrom:
25+
fieldRef:
26+
fieldPath: metadata.namespace
27+
- name: CSDP_URL
28+
valueFrom:
29+
configMapKeyRef:
30+
name: csdp-installer-cm
31+
key: csdp.url
32+
- name: CSDP_TOKEN
33+
valueFrom:
34+
configMapKeyRef:
35+
name: csdp-installer-cm
36+
key: csdp.token
37+
- name: CSDP_RUNTIME_NAME
38+
valueFrom:
39+
configMapKeyRef:
40+
name: csdp-installer-cm
41+
key: runtime.name
42+
- name: CSDP_RUNTIME_VERSION
43+
valueFrom:
44+
configMapKeyRef:
45+
name: csdp-installer-cm
46+
key: runtime.version
47+
optional: true
48+
- name: CSDP_RUNTIME_REPO
49+
valueFrom:
50+
configMapKeyRef:
51+
name: csdp-installer-cm
52+
key: runtime.repo
53+
- name: CSDP_RUNTIME_GIT_TOKEN
54+
valueFrom:
55+
configMapKeyRef:
56+
name: csdp-installer-cm
57+
key: runtime.gitToken
58+
- name: CSDP_RUNTIME_CLUSTER
59+
valueFrom:
60+
configMapKeyRef:
61+
name: csdp-installer-cm
62+
key: runtime.cluster
63+
- name: CSDP_RUNTIME_INGRESS_URL
64+
valueFrom:
65+
configMapKeyRef:
66+
name: csdp-installer-cm
67+
key: runtime.ingressURL
68+
- name: CSDP_GIT_INTEGRATION_PROVIDER
69+
valueFrom:
70+
configMapKeyRef:
71+
name: csdp-installer-cm
72+
key: gitIntegration.provider
73+
optional: true
74+
- name: CSDP_GIT_INTEGRATION_API_URL
75+
valueFrom:
76+
configMapKeyRef:
77+
name: csdp-installer-cm
78+
key: gitIntegration.apiURL
79+
optional: true
80+
- name: CSDP_GIT_INTEGRATION_TOKEN
81+
valueFrom:
82+
configMapKeyRef:
83+
name: csdp-installer-cm
84+
key: gitIntegration.token
85+
optional: true
86+
87+
resources:
88+
limits:
89+
memory: 256Mi
90+
cpu: "1"
91+
requests:
92+
memory: 128Mi
93+
cpu: "0.2"

runtime-installer/Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM alpine:3.15 as base
2+
3+
WORKDIR /go/src/github.com/codefresh-io/cli-v2
4+
5+
RUN apk -U add --no-cache git curl yq jq bash ca-certificates && update-ca-certificates
6+
7+
# Install kubectl
8+
RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
9+
RUN install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
10+
11+
# Install argocd cli
12+
RUN curl -sSL -o /usr/local/bin/argocd https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64
13+
RUN chmod +x /usr/local/bin/argocd
14+
15+
WORKDIR /src
16+
17+
COPY install.sh .
18+
19+
CMD [ "./install.sh" ]
20+
21+
ENTRYPOINT [ "bash" ]

0 commit comments

Comments
 (0)