e9c9ece2 by Adam Heath

Move config cm to -scripts, create real -config cm.

1 parent 351a40fc
......@@ -2,13 +2,20 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: k8s-bootstrap
name: k8s-bootstrap-config
namespace: kube-system
data:
GIT_SSH_COMMAND: ssh -o StrictHostKeyChecking=no -i /tmp/cluster-ssh/ssh-private-key
---
apiVersion: v1
kind: ConfigMap
metadata:
name: k8s-bootstrap-scripts
namespace: kube-system
data:
clone-start-of-day: |
#!/bin/sh
set -ex
GIT_SSH_COMMAND="ssh -i /tmp/cluster-ssh/ssh-private-key"
# FIXME: don't hard-code this.
git clone git@gitlab.brainfood.com:brainfood/k8s-start-of-day.git /tmp/git-storage/k8s-start-of-day
---
......@@ -45,14 +52,17 @@ spec:
initContainers:
- name: clone-k8s-start-of-day
image: bitnami/git
envFrom:
- configMapRef:
name: k8s-bootstrap-config
volumeMounts:
- name: k8s-bootstrap
mountPath: /tmp/k8s-bootstrap
- name: k8s-bootstrap-scripts
mountPath: /tmp/k8s-bootstrap-scripts
- name: cluster-ssh
mountPath: /tmp/cluster-ssh
- name: git-storage
mountPath: /tmp/git-storage
command: ["/tmp/k8s-bootstrap/clone-start-of-day"]
command: ["/tmp/k8s-bootstrap-scripts/clone-start-of-day"]
containers:
- name: show-status
......