Merge "k8s: Remove unused volume mount for kube-proxy"

This commit is contained in:
Jenkins 2016-07-27 08:32:04 +00:00 committed by Gerrit Code Review
commit dad775136f
6 changed files with 1 additions and 145 deletions

View File

@ -47,12 +47,4 @@ write_files:
- --v=0
securityContext:
privileged: true
volumeMounts:
- mountPath: /etc/ssl/certs
name: ssl-certs-host
readOnly: true
volumes:
- hostPath:
path: ${HOST_CERTS_PATH}
name: ssl-certs-host
EOF

View File

@ -1,47 +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
volumeMounts:
- mountPath: /etc/ssl/certs
name: ssl-certs-host
readOnly: true
volumes:
- hostPath:
path: /etc/ssl/certs
name: ssl-certs-host
EOF
}
}
init_templates

View File

@ -25,7 +25,6 @@ write_files:
awk '$1 == "inet" {print $2}' | cut -f1 -d/)
HOST_CERTS_PATH=/usr/share/ca-certificates
KUBE_CERTS_PATH=/etc/kubernetes/ssl
KUBE_CONFIG_PATH=/etc/kubernetes/config
KUBE_PROTOCOL="https"
KUBE_CONFIG="${KUBE_CONFIG_PATH}/worker-kubeconfig.yaml"
@ -58,22 +57,10 @@ write_files:
securityContext:
privileged: true
volumeMounts:
- mountPath: /etc/ssl/certs
name: "ssl-certs"
- mountPath: /etc/kubernetes/config
name: "kubeconfig"
readOnly: true
- mountPath: /etc/kubernetes/ssl
name: "etc-kube-ssl"
readOnly: true
volumes:
- name: "ssl-certs"
hostPath:
path: ${HOST_CERTS_PATH}
- name: "kubeconfig"
hostPath:
path: ${KUBE_CONFIG_PATH}
- name: "etc-kube-ssl"
hostPath:
path: ${KUBE_CERTS_PATH}
EOF

View File

@ -1,62 +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="/srv/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/ssl/certs
name: ssl-certs-host
readOnly: true
- mountPath: /srv/kubernetes
name: "srv-kube"
readOnly: true
volumes:
- hostPath:
path: /etc/ssl/certs
name: ssl-certs-host
- hostPath:
path: "/srv/kubernetes"
name: "srv-kube"
EOF
}
}
init_templates

View File

@ -32,14 +32,6 @@ spec:
- --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
}
}

View File

@ -42,18 +42,12 @@ spec:
securityContext:
privileged: true
volumeMounts:
- mountPath: /etc/ssl/certs
name: ssl-certs-host
readOnly: true
- mountPath: /srv/kubernetes
name: "srv-kube"
readOnly: true
volumes:
- hostPath:
path: /etc/ssl/certs
name: ssl-certs-host
- hostPath:
path: "/srv/kubernetes"
path: "/srv/kubernetes"
name: "srv-kube"
EOF
}