Support latest armada image

The latest armada image runs as a non-root user, which requires moving
some configuration files as well as a different strategy for
self-deletion.

Change-Id: Ib4fcbb18ace34bb7bbc5cf898b06da674373563f
This commit is contained in:
Mark Burnett 2017-08-24 13:18:16 -05:00
parent 7814264e7a
commit 47f142c5f2
4 changed files with 37 additions and 9 deletions

View File

@ -60,7 +60,7 @@ metadata:
target: all
spec:
images:
armada: quay.io/attcomdev/armada:v0.6.0
armada: quay.io/attcomdev/armada:latest
calico:
cni: quay.io/calico/cni:v1.9.1
etcd: quay.io/coreos/etcd:v3.2.1

View File

@ -3,7 +3,7 @@ apiVersion: v1
clusters:
- cluster:
server: https://kubernetes.default.svc.{{ config['Network']['cluster_domain'] }}
certificate-authority: /etc/kubernetes/armada-loader/pki/cluster-ca.pem
certificate-authority: pki/cluster-ca.pem
name: kubernetes
contexts:
- context:
@ -16,5 +16,5 @@ preferences: {}
users:
- name: armada-loader
user:
client-certificate: /etc/kubernetes/armada-loader/pki/armada-loader.pem
client-key: /etc/kubernetes/armada-loader/pki/armada-loader-key.pem
client-certificate: pki/armada-loader.pem
client-key: pki/armada-loader-key.pem

View File

@ -42,9 +42,6 @@ spec:
- |-
set -x
mkdir -p /root/.kube
cp /etc/kubernetes/armada-loader/kubeconfig.yaml /root/.kube/config
cd /etc/kubernetes/armada-loader/assets
if [ -s promenade-armada.yaml ]; then
while true; do
@ -64,7 +61,8 @@ spec:
done
fi
rm -rf /etc/kubernetes/kubelet/manifests/armada-loader.yaml
touch /shared/armada.done
# Sleep so that kubelet doesn't restart this pod before it kills it
sleep 10000
@ -72,8 +70,36 @@ spec:
- name: config
mountPath: /etc/kubernetes/armada-loader
readOnly: true
- name: config
mountPath: /armada/.kube
readOnly: true
- name: shared
mountPath: /shared
- name: monitor
image: busybox:latest
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -c
- |-
set -x
while [ ! -f /shared/armada.done ] ; do
sleep 1
done
rm -f /etc/kubernetes/kubelet/manifests/armada-loader.yaml
# Sleep so that kubelet doesn't restart this pod before it kills it
sleep 10000
volumeMounts:
- name: shared
mountPath: /shared
- name: manifests
mountPath: /etc/kubernetes/kubelet/manifests
volumes:
- name: config
hostPath:
@ -81,3 +107,5 @@ spec:
- name: manifests
hostPath:
path: /etc/kubernetes/kubelet/manifests
- name: shared
emptyDir: {}

View File

@ -63,7 +63,7 @@ metadata:
target: all
spec:
images:
armada: quay.io/attcomdev/armada:v0.6.0
armada: quay.io/attcomdev/armada:latest
calico:
cni: quay.io/calico/cni:v1.9.1
etcd: quay.io/coreos/etcd:v3.2.1