Skip to content

Commit

Permalink
Workaround kubeadm 1.7.0 race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrlaltdel committed Jul 12, 2017
1 parent 19922a8 commit eb6751c
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
54 changes: 54 additions & 0 deletions files/kubeadm-1-7-0-race-condition-workaround.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
cat <<EOF | kubectl --kubeconfig=/etc/kubernetes/admin.conf apply -f -
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: Role
metadata:
annotations:
rbac.authorization.kubernetes.io/autoupdate: "true"
labels:
kubernetes.io/bootstrapping: rbac-defaults
name: system:controller:bootstrap-signer
namespace: kube-public
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- apiGroups:
- ""
resourceNames:
- cluster-info
resources:
- configmaps
verbs:
- update
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
- update
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
annotations:
rbac.authorization.kubernetes.io/autoupdate: "true"
labels:
kubernetes.io/bootstrapping: rbac-defaults
name: system:controller:bootstrap-signer
namespace: kube-public
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: system:controller:bootstrap-signer
subjects:
- kind: ServiceAccount
name: bootstrap-signer
namespace: kube-system
EOF
3 changes: 3 additions & 0 deletions roles/kubeadm-master/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,6 @@
become: True
shell: kubectl completion bash > /etc/bash_completion.d/kubectl
when: kubectl_bash_completion.stat.exists == False

- name: Workaround kubeadm 1.7.0 race condition, see https://github.com/kubernetes/kubeadm/issues/335
script: kubeadm-1-7-0-race-condition-workaround.sh

0 comments on commit eb6751c

Please sign in to comment.