"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "magnum/drivers/common/templates/kubernetes/fragments/configure-kubernetes-minion.sh" between
magnum-8.1.0.tar.gz and magnum-8.2.0.tar.gz

About: OpenStack Magnum makes container orchestration engines such as Docker and Kubernetes available as first class resources in OpenStack.
The "Stein" series (maintained release).

configure-kubernetes-minion.sh  (magnum-8.1.0):configure-kubernetes-minion.sh  (magnum-8.2.0)
skipping to change at line 29 skipping to change at line 29
_prefix=${CONTAINER_INFRA_PREFIX:-docker.io/openstackmagnum/} _prefix=${CONTAINER_INFRA_PREFIX:-docker.io/openstackmagnum/}
rm -rf /etc/cni/net.d/* rm -rf /etc/cni/net.d/*
rm -rf /var/lib/cni/* rm -rf /var/lib/cni/*
rm -rf /opt/cni/* rm -rf /opt/cni/*
mkdir -p /opt/cni mkdir -p /opt/cni
mkdir -p /etc/cni/net.d/ mkdir -p /etc/cni/net.d/
_addtl_mounts=',{"type":"bind","source":"/opt/cni","destination":"/opt/cni","opt ions":["bind","rw","slave","mode=777"]},{"type":"bind","source":"/var/lib/docker ","destination":"/var/lib/docker","options":["bind","rw","slave","mode=755"]}' _addtl_mounts=',{"type":"bind","source":"/opt/cni","destination":"/opt/cni","opt ions":["bind","rw","slave","mode=777"]},{"type":"bind","source":"/var/lib/docker ","destination":"/var/lib/docker","options":["bind","rw","slave","mode=755"]}'
if [ "$NETWORK_DRIVER" = "calico" ]; then if [ "$NETWORK_DRIVER" = "calico" ]; then
echo "net.ipv4.conf.all.rp_filter = 1" >> /etc/sysctl.conf
sysctl -p
if [ "`systemctl status NetworkManager.service | grep -o "Active: active"`" = "Active: active" ]; then if [ "`systemctl status NetworkManager.service | grep -o "Active: active"`" = "Active: active" ]; then
CALICO_NM=/etc/NetworkManager/conf.d/calico.conf CALICO_NM=/etc/NetworkManager/conf.d/calico.conf
[ -f ${CALICO_NM} ] || { [ -f ${CALICO_NM} ] || {
echo "Writing File: $CALICO_NM" echo "Writing File: $CALICO_NM"
mkdir -p $(dirname ${CALICO_NM}) mkdir -p $(dirname ${CALICO_NM})
cat << EOF > ${CALICO_NM} cat << EOF > ${CALICO_NM}
[keyfile] [keyfile]
unmanaged-devices=interface-name:cali*;interface-name:tunl* unmanaged-devices=interface-name:cali*;interface-name:tunl*
EOF EOF
} }
systemctl restart NetworkManager systemctl restart NetworkManager
echo "net.ipv4.conf.all.rp_filter = 1" >> /etc/sysctl.conf
sysctl -p
fi fi
fi fi
atomic install --storage ostree --system --system-package=no --set=ADDTL_MOUNTS= ${_addtl_mounts} --name=kubelet ${_prefix}kubernetes-kubelet:${KUBE_TAG} atomic install --storage ostree --system --system-package=no --set=ADDTL_MOUNTS= ${_addtl_mounts} --name=kubelet ${_prefix}kubernetes-kubelet:${KUBE_TAG}
atomic install --storage ostree --system --system-package=no --name=kube-proxy $ {_prefix}kubernetes-proxy:${KUBE_TAG} atomic install --storage ostree --system --system-package=no --name=kube-proxy $ {_prefix}kubernetes-proxy:${KUBE_TAG}
CERT_DIR=/etc/kubernetes/certs CERT_DIR=/etc/kubernetes/certs
PROTOCOL=https PROTOCOL=https
ETCD_SERVER_IP=${ETCD_SERVER_IP:-$KUBE_MASTER_IP} ETCD_SERVER_IP=${ETCD_SERVER_IP:-$KUBE_MASTER_IP}
KUBE_PROTOCOL="https" KUBE_PROTOCOL="https"
skipping to change at line 65 skipping to change at line 65
if [ "$TLS_DISABLED" = "True" ]; then if [ "$TLS_DISABLED" = "True" ]; then
PROTOCOL=http PROTOCOL=http
KUBE_PROTOCOL="http" KUBE_PROTOCOL="http"
fi fi
KUBE_MASTER_URI="$KUBE_PROTOCOL://$KUBE_MASTER_IP:$KUBE_API_PORT" KUBE_MASTER_URI="$KUBE_PROTOCOL://$KUBE_MASTER_IP:$KUBE_API_PORT"
if [ -z "${KUBE_NODE_IP}" ]; then if [ -z "${KUBE_NODE_IP}" ]; then
KUBE_NODE_IP=$(curl -s http://169.254.169.254/latest/meta-data/local-ipv4) KUBE_NODE_IP=$(curl -s http://169.254.169.254/latest/meta-data/local-ipv4)
fi fi
HOSTNAME_OVERRIDE=$(hostname --short | sed 's/\.novalocal//')
cat << EOF >> ${KUBELET_KUBECONFIG} cat << EOF >> ${KUBELET_KUBECONFIG}
apiVersion: v1 apiVersion: v1
clusters: clusters:
- cluster: - cluster:
certificate-authority: ${CERT_DIR}/ca.crt certificate-authority: ${CERT_DIR}/ca.crt
server: ${KUBE_MASTER_URI} server: ${KUBE_MASTER_URI}
name: kubernetes name: kubernetes
contexts: contexts:
- context: - context:
cluster: kubernetes cluster: kubernetes
user: system:node:${HOSTNAME_OVERRIDE} user: system:node:${INSTANCE_NAME}
name: default name: default
current-context: default current-context: default
kind: Config kind: Config
preferences: {} preferences: {}
users: users:
- name: system:node:${HOSTNAME_OVERRIDE} - name: system:node:${INSTANCE_NAME}
user: user:
as-user-extra: {} as-user-extra: {}
client-certificate: ${CERT_DIR}/kubelet.crt client-certificate: ${CERT_DIR}/kubelet.crt
client-key: ${CERT_DIR}/kubelet.key client-key: ${CERT_DIR}/kubelet.key
EOF EOF
cat << EOF >> ${PROXY_KUBECONFIG} cat << EOF >> ${PROXY_KUBECONFIG}
apiVersion: v1 apiVersion: v1
clusters: clusters:
- cluster: - cluster:
certificate-authority: ${CERT_DIR}/ca.crt certificate-authority: ${CERT_DIR}/ca.crt
skipping to change at line 134 skipping to change at line 133
/^KUBE_MASTER=/ s|=.*|="--master='"$KUBE_MASTER_URI"'"| /^KUBE_MASTER=/ s|=.*|="--master='"$KUBE_MASTER_URI"'"|
' /etc/kubernetes/config ' /etc/kubernetes/config
# NOTE: Kubernetes plugin for Openstack requires that the node name registered # NOTE: Kubernetes plugin for Openstack requires that the node name registered
# in the kube-apiserver be the same as the Nova name of the instance, so that # in the kube-apiserver be the same as the Nova name of the instance, so that
# the plugin can use the name to query for attributes such as IP, etc. # the plugin can use the name to query for attributes such as IP, etc.
# The hostname of the node is set to be the Nova name of the instance, and # The hostname of the node is set to be the Nova name of the instance, and
# the option --hostname-override for kubelet uses the hostname to register the n ode. # the option --hostname-override for kubelet uses the hostname to register the n ode.
# Using any other name will break the load balancer and cinder volume features. # Using any other name will break the load balancer and cinder volume features.
mkdir -p /etc/kubernetes/manifests mkdir -p /etc/kubernetes/manifests
KUBELET_ARGS="--pod-manifest-path=/etc/kubernetes/manifests --cadvisor-port=0 -- kubeconfig ${KUBELET_KUBECONFIG} --hostname-override=${HOSTNAME_OVERRIDE}" KUBELET_ARGS="--pod-manifest-path=/etc/kubernetes/manifests --cadvisor-port=0 -- kubeconfig ${KUBELET_KUBECONFIG} --hostname-override=${INSTANCE_NAME}"
KUBELET_ARGS="${KUBELET_ARGS} --address=${KUBE_NODE_IP} --port=10250 --read-only -port=0 --anonymous-auth=false --authorization-mode=Webhook --authentication-tok en-webhook=true" KUBELET_ARGS="${KUBELET_ARGS} --address=${KUBE_NODE_IP} --port=10250 --read-only -port=0 --anonymous-auth=false --authorization-mode=Webhook --authentication-tok en-webhook=true"
KUBELET_ARGS="${KUBELET_ARGS} --cluster_dns=${DNS_SERVICE_IP} --cluster_domain=$ {DNS_CLUSTER_DOMAIN}" KUBELET_ARGS="${KUBELET_ARGS} --cluster_dns=${DNS_SERVICE_IP} --cluster_domain=$ {DNS_CLUSTER_DOMAIN}"
KUBELET_ARGS="${KUBELET_ARGS} --volume-plugin-dir=/var/lib/kubelet/volumeplugins " KUBELET_ARGS="${KUBELET_ARGS} --volume-plugin-dir=/var/lib/kubelet/volumeplugins "
KUBELET_ARGS="${KUBELET_ARGS} ${KUBELET_OPTIONS}" KUBELET_ARGS="${KUBELET_ARGS} ${KUBELET_OPTIONS}"
if [ "$(echo "${CLOUD_PROVIDER_ENABLED}" | tr '[:upper:]' '[:lower:]')" = "true" ]; then if [ "$(echo "${CLOUD_PROVIDER_ENABLED}" | tr '[:upper:]' '[:lower:]')" = "true" ]; then
KUBELET_ARGS="${KUBELET_ARGS} --cloud-provider=external" KUBELET_ARGS="${KUBELET_ARGS} --cloud-provider=external"
fi fi
# Workaround for Cinder support (fixed in k8s >= 1.6) # Workaround for Cinder support (fixed in k8s >= 1.6)
skipping to change at line 208 skipping to change at line 207
/^KUBELET_ARGS=/ s|=.*|="'"\$(/etc/kubernetes/get_require_kubeconfig.sh) ${K UBELET_ARGS}"'"| /^KUBELET_ARGS=/ s|=.*|="'"\$(/etc/kubernetes/get_require_kubeconfig.sh) ${K UBELET_ARGS}"'"|
' /etc/kubernetes/kubelet ' /etc/kubernetes/kubelet
cat > /etc/kubernetes/proxy << EOF cat > /etc/kubernetes/proxy << EOF
KUBE_PROXY_ARGS="--kubeconfig=${PROXY_KUBECONFIG} --cluster-cidr=${PODS_NETWORK_ CIDR}" KUBE_PROXY_ARGS="--kubeconfig=${PROXY_KUBECONFIG} --cluster-cidr=${PODS_NETWORK_ CIDR}"
EOF EOF
cat >> /etc/environment <<EOF cat >> /etc/environment <<EOF
KUBERNETES_MASTER=$KUBE_MASTER_URI KUBERNETES_MASTER=$KUBE_MASTER_URI
EOF EOF
hostname `hostname | sed 's/.novalocal//'`
 End of changes. 7 change blocks. 
6 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)