Merge "Fix developers kubeadm installation"

This commit is contained in:
Zuul 2020-07-02 19:17:55 +00:00 committed by Gerrit Code Review
commit 5b9c79604a
3 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ if [ "x${ACTION}" == "xgenerate-join-cmd" ]; then
: ${TTL:="10m"}
DISCOVERY_TOKEN="$(kubeadm token --kubeconfig /etc/kubernetes/admin.conf create --ttl ${TTL} --usages signing,authentication --groups '')"
DISCOVERY_TOKEN_CA_HASH="$(openssl x509 -pubkey -in /etc/kubernetes/pki/ca.crt | openssl rsa -pubin -outform der 2>/dev/null | openssl dgst -sha256 -hex | sed 's/^.* /sha256:/')"
API_SERVER=$(cat /etc/kubernetes/admin.conf | python -c "import sys, yaml; print(yaml.safe_load(sys.stdin)['clusters'][0]['cluster']['server'].split(\"//\",1).pop())")
API_SERVER=$(cat /etc/kubernetes/admin.conf | python3 -c "import sys, yaml; print(yaml.safe_load(sys.stdin)['clusters'][0]['cluster']['server'].split(\"//\",1).pop())")
exec echo "kubeadm join \
--token ${DISCOVERY_TOKEN} \
--discovery-token-ca-cert-hash ${DISCOVERY_TOKEN_CA_HASH} \

View File

@ -90,7 +90,7 @@
dest: /etc/kubernetes/pki/calico/certs.py
- name: Create yaml file
shell: python /etc/kubernetes/pki/calico/certs.py
shell: python3 /etc/kubernetes/pki/calico/certs.py
args:
executable: /bin/bash
chdir: /etc/kubernetes/pki/calico

View File

@ -94,7 +94,7 @@
delegate_to: 127.0.0.1
block:
- name: wait for kube api
shell: python /usr/bin/test-kube-api.py
shell: python3 /usr/bin/test-kube-api.py
register: task_result
until: task_result.rc == 0
retries: 120