Following up of https://review.openstack.org/#/c/487943 Depends-On: I9a7d00cddb456b885b6de28cfb3d33d2e16cc348 Implements: blueprint run-kube-as-container Change-Id: Icddb8ed1598f2ba1f782622f86fb6083953c3b3fchanges/43/488443/8
parent
d003e80a3a
commit
005eeb575d
@ -1,39 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /etc/sysconfig/heat-params
|
||||
|
||||
if [ -n "${INSECURE_REGISTRY_URL}" ]; then
|
||||
HYPERKUBE_IMAGE="${INSECURE_REGISTRY_URL}/google_containers/hyperkube:${KUBE_VERSION}"
|
||||
else
|
||||
HYPERKUBE_IMAGE="gcr.io/google_containers/hyperkube:${KUBE_VERSION}"
|
||||
fi
|
||||
|
||||
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: ${HYPERKUBE_IMAGE}
|
||||
command:
|
||||
- /hyperkube
|
||||
- proxy
|
||||
- --master=http://127.0.0.1:8080
|
||||
- --logtostderr=true
|
||||
- --v=0
|
||||
securityContext:
|
||||
privileged: true
|
||||
EOF
|
||||
}
|
||||
}
|
||||
|
||||
init_templates
|
@ -1,56 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /etc/sysconfig/heat-params
|
||||
|
||||
if [ -n "${INSECURE_REGISTRY_URL}" ]; then
|
||||
HYPERKUBE_IMAGE="${INSECURE_REGISTRY_URL}/google_containers/hyperkube:${KUBE_VERSION}"
|
||||
else
|
||||
HYPERKUBE_IMAGE="gcr.io/google_containers/hyperkube:${KUBE_VERSION}"
|
||||
fi
|
||||
|
||||
init_templates () {
|
||||
local KUBE_PROTOCOL="https"
|
||||
local KUBE_CONFIG="/etc/kubernetes/kubeconfig.yaml"
|
||||
if [ "${TLS_DISABLED}" = "True" ]; then
|
||||
KUBE_PROTOCOL="http"
|
||||
KUBE_CONFIG=
|
||||
fi
|
||||
|
||||
local MASTER="${KUBE_PROTOCOL}://${KUBE_MASTER_IP}:${KUBE_API_PORT}"
|
||||
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: ${HYPERKUBE_IMAGE}
|
||||
command:
|
||||
- /hyperkube
|
||||
- proxy
|
||||
- --master=${MASTER}
|
||||
- --kubeconfig=${KUBE_CONFIG}
|
||||
- --logtostderr=true
|
||||
- --v=0
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- mountPath: /etc/kubernetes
|
||||
name: kubernetes-config
|
||||
readOnly: true
|
||||
volumes:
|
||||
- hostPath:
|
||||
path: /etc/kubernetes
|
||||
name: kubernetes-config
|
||||
EOF
|
||||
}
|
||||
}
|
||||
|
||||
init_templates
|
Loading…
Reference in new issue