Skip to content

Commit

Permalink
Add label to prevent kops-controller from running on old nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
johngmyers committed Sep 28, 2020
1 parent 257f859 commit 11bebf0
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 7 deletions.
3 changes: 2 additions & 1 deletion protokube/pkg/protokube/labeler.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ func bootstrapMasterNodeLabels(ctx context.Context, kubeContext *KubernetesConte
}

labels := map[string]string{
"node-role.kubernetes.io/master": "",
"node-role.kubernetes.io/master": "",
"kops.k8s.io/kops-controller-pki": "",
}

shouldPatch := false
Expand Down
1 change: 1 addition & 0 deletions upup/models/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ spec:
operator: Exists
nodeSelector:
node-role.kubernetes.io/master: ""
kops.k8s.io/kops-controller-pki: ""
dnsPolicy: Default # Don't use cluster DNS (we are likely running before kube-dns)
hostNetwork: true
serviceAccount: kops-controller
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
- id: k8s-1.16
kubernetesVersion: '>=1.16.0-alpha.0'
manifest: kops-controller.addons.k8s.io/k8s-1.16.yaml
manifestHash: b047de23df3b0caff3784aaa89ae0c967e866c95
manifestHash: 00457a1b369f839820f5fc094c5610e2065da388
name: kops-controller.addons.k8s.io
selector:
k8s-addon: kops-controller.addons.k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
- id: k8s-1.16
kubernetesVersion: '>=1.16.0-alpha.0'
manifest: kops-controller.addons.k8s.io/k8s-1.16.yaml
manifestHash: 3c73d81e8c87bf4f409323ca904d22ee9c375284
manifestHash: db684c93db61d505f87af71577409945bc290fc1
name: kops-controller.addons.k8s.io
selector:
k8s-addon: kops-controller.addons.k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ spec:
dnsPolicy: Default
hostNetwork: true
nodeSelector:
kops.k8s.io/kops-controller-pki: ""
node-role.kubernetes.io/master: ""
priorityClassName: system-node-critical
serviceAccount: kops-controller
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
- id: k8s-1.16
kubernetesVersion: '>=1.16.0-alpha.0'
manifest: kops-controller.addons.k8s.io/k8s-1.16.yaml
manifestHash: b047de23df3b0caff3784aaa89ae0c967e866c95
manifestHash: 00457a1b369f839820f5fc094c5610e2065da388
name: kops-controller.addons.k8s.io
selector:
k8s-addon: kops-controller.addons.k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ spec:
dnsPolicy: Default
hostNetwork: true
nodeSelector:
kops.k8s.io/kops-controller-pki: ""
node-role.kubernetes.io/master: ""
priorityClassName: system-node-critical
serviceAccount: kops-controller
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
- id: k8s-1.16
kubernetesVersion: '>=1.16.0-alpha.0'
manifest: kops-controller.addons.k8s.io/k8s-1.16.yaml
manifestHash: b047de23df3b0caff3784aaa89ae0c967e866c95
manifestHash: 00457a1b369f839820f5fc094c5610e2065da388
name: kops-controller.addons.k8s.io
selector:
k8s-addon: kops-controller.addons.k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ spec:
dnsPolicy: Default
hostNetwork: true
nodeSelector:
kops.k8s.io/kops-controller-pki: ""
node-role.kubernetes.io/master: ""
priorityClassName: system-node-critical
serviceAccount: kops-controller
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
- id: k8s-1.16
kubernetesVersion: '>=1.16.0-alpha.0'
manifest: kops-controller.addons.k8s.io/k8s-1.16.yaml
manifestHash: 3c73d81e8c87bf4f409323ca904d22ee9c375284
manifestHash: db684c93db61d505f87af71577409945bc290fc1
name: kops-controller.addons.k8s.io
selector:
k8s-addon: kops-controller.addons.k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
- id: k8s-1.16
kubernetesVersion: '>=1.16.0-alpha.0'
manifest: kops-controller.addons.k8s.io/k8s-1.16.yaml
manifestHash: b047de23df3b0caff3784aaa89ae0c967e866c95
manifestHash: 00457a1b369f839820f5fc094c5610e2065da388
name: kops-controller.addons.k8s.io
selector:
k8s-addon: kops-controller.addons.k8s.io
Expand Down

0 comments on commit 11bebf0

Please sign in to comment.