Debian Codegraph @

contrib/drivers/k8s_opensuse_v1/templates/fragments/configure-kubernetes-minion.sh

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2
3 . /etc/sysconfig/heat-paramsscip-shell source . . `/etc/sysconfig/heat-params`.
4
5 echoscip-shell system . . echo. "configuring kubernetes (minion)"
6
7 myip="$KUBE_NODE_IP"
8
9 ETCD_SERVER_IP=${ETCD_SERVER_IP:-$KUBE_MASTER_IP}
10
11 if [scip-shell system . . `[`. "$TLS_DISABLED" == "True" ]; then
12 KUBE_PROTOCOL="http"
13 KUBE_CONFIG=""
14 else
15 KUBE_PROTOCOL="https"
16 KUBE_CONFIG="--kubeconfig=/etc/kubernetes/kubeconfig.yaml"
17 fi
18
19 KUBE_MASTER_URI="$KUBE_PROTOCOL://$KUBE_MASTER_IP:$KUBE_API_PORT"
20
21 sedscip-shell system . . sed. -i '
22 /^KUBE_ALLOW_PRIV=/ s/=.*/="--allow-privileged='"$KUBE_ALLOW_PRIV"'"/
23 /^KUBE_ETCD_SERVERS=/ s|=.*|="--etcd-servers=http://'"$ETCD_SERVER_IP"':2379"|
24 /^KUBE_MASTER=/ s|=.*|="--master='"$KUBE_MASTER_URI"'"|
25 ' /etc/kubernetes/configscip-shell filesystem . . `/etc/kubernetes/config`.
26
27 sedscip-shell system . . sed. -i '
28 /^KUBELET_ADDRESS=/ s/=.*/="--address=0.0.0.0"/
29 /^KUBELET_HOSTNAME=/ s/=.*/="--hostname-override='"$myip"'"/
30 /^KUBELET_API_SERVER=/ s|=.*|="--api-servers='"$KUBE_MASTER_URI"'"|
31 /^KUBELET_ARGS=/ s|=.*|="--node-ip='"$myip"' --container-runtime=docker --config=/etc/kubernetes/manifests '"$KUBE_CONFIG"'"|
32 ' /etc/kubernetes/kubeletscip-shell filesystem . . `/etc/kubernetes/kubelet`.
33
34 sedscip-shell system . . sed. -i '
35 /^KUBE_PROXY_ARGS=/ s|=.*|="--proxy-mode=iptables '"$KUBE_CONFIG"'"|
36 ' /etc/kubernetes/proxyscip-shell filesystem . . `/etc/kubernetes/proxy`.
37
38 catscip-shell system . . cat. >> /etc/environmentscip-shell filesystem . . `/etc/environment`. <<EOF
39 KUBERNETES_MASTER=$KUBE_MASTER_URI
40 EOF
41
42 for service in kubelet kube-proxy; do
43 echoscip-shell system . . echo. "activating $service service"
44 systemctl enable $service
45
46 echoscip-shell system . . echo. "starting $service service"
47 systemctl --no-block start $service
48 done