42 lines
820 B
Bash
42 lines
820 B
Bash
#!/bin/sh
|
|
|
|
. /etc/sysconfig/heat-params
|
|
|
|
function init_templates {
|
|
local TEMPLATE=/etc/kubernetes/manifests/kube-proxy.yaml
|
|
[ -f ${TEMPLATE} ] || {
|
|
echo "TEMPLATE: $TEMPLATE"
|
|
mkdir -p $(dirname ${TEMPLATE})
|
|
cat << EOF > ${TEMPLATE}
|
|
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
name: kube-proxy
|
|
namespace: kube-system
|
|
spec:
|
|
hostNetwork: true
|
|
containers:
|
|
- name: kube-proxy
|
|
image: gcr.io/google_containers/hyperkube:v1.0.6
|
|
command:
|
|
- /hyperkube
|
|
- proxy
|
|
- --master=http://127.0.0.1:8080
|
|
- --logtostderr=true
|
|
- --v=0
|
|
securityContext:
|
|
privileged: true
|
|
volumeMounts:
|
|
- mountPath: /etc/ssl/certs
|
|
name: ssl-certs-host
|
|
readOnly: true
|
|
volumes:
|
|
- hostPath:
|
|
path: /etc/ssl/certs
|
|
name: ssl-certs-host
|
|
EOF
|
|
}
|
|
}
|
|
|
|
init_templates
|