"Fossies" - the Fresh Open Source Software Archive

Member "magnum-8.2.0/magnum/drivers/common/templates/kubernetes/fragments/enable-services-master.sh" (6 Dec 2019, 1046 Bytes) of package /linux/misc/openstack/magnum-8.2.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "enable-services-master.sh": 8.1.0_vs_8.2.0.

    1 #!/bin/sh
    2 
    3 . /etc/sysconfig/heat-params
    4 
    5 # make sure we pick up any modified unit files
    6 systemctl daemon-reload
    7 
    8 # if the certificate manager api is enabled, wait for the ca key to be handled
    9 # by the heat container agent (required for the controller-manager)
   10 while [ ! -f /etc/kubernetes/certs/ca.key ] && \
   11     [ "$(echo $CERT_MANAGER_API | tr '[:upper:]' '[:lower:]')" == "true" ]; do
   12     echo "waiting for CA to be made available for certificate manager api"
   13     sleep 2
   14 done
   15 
   16 echo "starting services"
   17 for service in etcd docker kube-apiserver kube-controller-manager kube-scheduler kubelet kube-proxy; do
   18     echo "activating service $service"
   19     systemctl enable $service
   20     systemctl --no-block start $service
   21 done
   22 
   23 # Label self as master
   24 until  [ "ok" = "$(curl --silent http://127.0.0.1:8080/healthz)" ] && \
   25     kubectl patch node ${INSTANCE_NAME} \
   26         --patch '{"metadata": {"labels": {"node-role.kubernetes.io/master": ""}}}'
   27 do
   28     echo "Trying to label master node with node-role.kubernetes.io/master=\"\""
   29     sleep 5s
   30 done