openshift-node 779 B

123456789101112131415161718
  1. #!/bin/sh
  2. # This launches the Kubelet by converting the node configuration into kube flags.
  3. set -euo pipefail
  4. if ! [[ -f /etc/origin/node/client-ca.crt ]]; then
  5. if [[ -f /etc/origin/node/bootstrap.kubeconfig ]]; then
  6. oc config --config=/etc/origin/node/bootstrap.kubeconfig view --raw --minify -o go-template='{{ index .clusters 0 "cluster" "certificate-authority-data" }}' | base64 -d - > /etc/origin/node/client-ca.crt
  7. fi
  8. fi
  9. config=/etc/origin/node/bootstrap-node-config.yaml
  10. # TODO: remove when dynamic kubelet config is delivered
  11. if [[ -f /etc/origin/node/node-config.yaml ]]; then
  12. config=/etc/origin/node/node-config.yaml
  13. fi
  14. flags=$( /usr/bin/openshift-node-config "--config=${config}" )
  15. eval "exec /usr/bin/hyperkube kubelet --v=${DEBUG_LOGLEVEL:-2} ${flags}"