Move config cm to -scripts, create real -config cm.
Showing
1 changed file
with
15 additions
and
5 deletions
... | @@ -2,13 +2,20 @@ | ... | @@ -2,13 +2,20 @@ |
2 | apiVersion: v1 | 2 | apiVersion: v1 |
3 | kind: ConfigMap | 3 | kind: ConfigMap |
4 | metadata: | 4 | metadata: |
5 | name: k8s-bootstrap | 5 | name: k8s-bootstrap-config |
6 | namespace: kube-system | ||
7 | data: | ||
8 | GIT_SSH_COMMAND: ssh -o StrictHostKeyChecking=no -i /tmp/cluster-ssh/ssh-private-key | ||
9 | --- | ||
10 | apiVersion: v1 | ||
11 | kind: ConfigMap | ||
12 | metadata: | ||
13 | name: k8s-bootstrap-scripts | ||
6 | namespace: kube-system | 14 | namespace: kube-system |
7 | data: | 15 | data: |
8 | clone-start-of-day: | | 16 | clone-start-of-day: | |
9 | #!/bin/sh | 17 | #!/bin/sh |
10 | set -ex | 18 | set -ex |
11 | GIT_SSH_COMMAND="ssh -i /tmp/cluster-ssh/ssh-private-key" | ||
12 | # FIXME: don't hard-code this. | 19 | # FIXME: don't hard-code this. |
13 | git clone git@gitlab.brainfood.com:brainfood/k8s-start-of-day.git /tmp/git-storage/k8s-start-of-day | 20 | git clone git@gitlab.brainfood.com:brainfood/k8s-start-of-day.git /tmp/git-storage/k8s-start-of-day |
14 | --- | 21 | --- |
... | @@ -45,14 +52,17 @@ spec: | ... | @@ -45,14 +52,17 @@ spec: |
45 | initContainers: | 52 | initContainers: |
46 | - name: clone-k8s-start-of-day | 53 | - name: clone-k8s-start-of-day |
47 | image: bitnami/git | 54 | image: bitnami/git |
55 | envFrom: | ||
56 | - configMapRef: | ||
57 | name: k8s-bootstrap-config | ||
48 | volumeMounts: | 58 | volumeMounts: |
49 | - name: k8s-bootstrap | 59 | - name: k8s-bootstrap-scripts |
50 | mountPath: /tmp/k8s-bootstrap | 60 | mountPath: /tmp/k8s-bootstrap-scripts |
51 | - name: cluster-ssh | 61 | - name: cluster-ssh |
52 | mountPath: /tmp/cluster-ssh | 62 | mountPath: /tmp/cluster-ssh |
53 | - name: git-storage | 63 | - name: git-storage |
54 | mountPath: /tmp/git-storage | 64 | mountPath: /tmp/git-storage |
55 | command: ["/tmp/k8s-bootstrap/clone-start-of-day"] | 65 | command: ["/tmp/k8s-bootstrap-scripts/clone-start-of-day"] |
56 | 66 | ||
57 | containers: | 67 | containers: |
58 | - name: show-status | 68 | - name: show-status | ... | ... |
-
Please register or sign in to post a comment