Browse Source

Merge "Fix k8s_fedora to work with cinder volume driver"

changes/13/375213/1
Jenkins 5 years ago
committed by Gerrit Code Review
parent
commit
b6efd04613
  1. 9
      magnum/drivers/common/templates/kubernetes/fragments/configure-kubernetes-minion.sh

9
magnum/drivers/common/templates/kubernetes/fragments/configure-kubernetes-minion.sh

@ -25,7 +25,8 @@ sed -i '
/^KUBE_MASTER=/ s|=.*|="--master='"$KUBE_MASTER_URI"'"|
' /etc/kubernetes/config
KUBELET_ARGS="--config=/etc/kubernetes/manifests --cadvisor-port=4194 --hostname-override=$KUBE_NODE_IP ${KUBE_CONFIG}"
HOSTNAME=$(hostname --short | sed 's/\.novalocal//')
KUBELET_ARGS="--config=/etc/kubernetes/manifests --cadvisor-port=4194 ${KUBE_CONFIG}"
if [ -n "${INSECURE_REGISTRY_URL}" ]; then
KUBELET_ARGS="${KUBELET_ARGS} --pod-infra-container-image=${INSECURE_REGISTRY_URL}/google_containers/pause\:0.8.0"
@ -36,7 +37,7 @@ sed -i '
/^KUBELET_ADDRESS=/ s/=.*/="--address=0.0.0.0"/
/^KUBELET_HOSTNAME=/ s/=.*/=""/
/^KUBELET_API_SERVER=/ s|=.*|="--api_servers='"$KUBE_MASTER_URI"'"|
/^KUBELET_ARGS=/ s|=.*|='"${KUBELET_ARGS}"'|
/^KUBELET_ARGS=/ s|=.*|="'"${KUBELET_ARGS}"' --hostname-override='"${KUBE_NODE_IP}"'"|
' /etc/kubernetes/kubelet
sed -i '
@ -63,7 +64,7 @@ if [ "$VOLUME_DRIVER" = "cinder" ]; then
if [ ! -d ${KUBERNETES} -o ! -f ${CLOUD_CONFIG} ]; then
sudo mkdir -p $KUBERNETES
fi
AUTH_URL=$(echo "$AUTH_URL" | sed 's/v3/v2/')
AUTH_URL=${AUTH_URL/v3/v2.0}
cat > $CLOUD_CONFIG <<EOF
[Global]
auth-url=$AUTH_URL
@ -74,7 +75,7 @@ tenant-name=$TENANT_NAME
EOF
cat << _EOC_ >> /etc/kubernetes/kubelet
#KUBELET_ARGS="$KUBELET_ARGS --cloud-provider=openstack --cloud-config=/etc/kubernetes/kube_openstack_config"
#KUBELET_ARGS="$KUBELET_ARGS --hostname-override=${HOSTNAME} --cloud-provider=openstack --cloud-config=/etc/kubernetes/kube_openstack_config"
_EOC_
if [ ! -f /usr/bin/udevadm ]; then

Loading…
Cancel
Save