Skip to content

Commit

Permalink
make all static system pods critical
Browse files Browse the repository at this point in the history
  • Loading branch information
dashpole committed Jun 12, 2017
1 parent 695d438 commit e223eb9
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: Pod
metadata:
name: etcd-empty-dir-cleanup
namespace: kube-system
annotations:
scheduler.alpha.kubernetes.io/critical-pod: ''
labels:
k8s-app: etcd-empty-dir-cleanup
spec:
Expand Down
5 changes: 4 additions & 1 deletion cluster/saltbase/salt/etcd/etcd.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@
"kind": "Pod",
"metadata": {
"name":"etcd-server{{ suffix }}",
"namespace": "kube-system"
"namespace": "kube-system",
"annotations": {
"scheduler.alpha.kubernetes.io/critical-pod": ""
}
},
"spec":{
"hostNetwork": true,
Expand Down
2 changes: 2 additions & 0 deletions cluster/saltbase/salt/kube-addons/kube-addon-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: Pod
metadata:
name: kube-addon-manager
namespace: kube-system
annotations:
scheduler.alpha.kubernetes.io/critical-pod: ''
labels:
component: kube-addon-manager
spec:
Expand Down
3 changes: 3 additions & 0 deletions cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@
"metadata": {
"name":"kube-apiserver",
"namespace": "kube-system",
"annotations": {
"scheduler.alpha.kubernetes.io/critical-pod": ""
},
"labels": {
"tier": "control-plane",
"component": "kube-apiserver"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@
"metadata": {
"name":"kube-controller-manager",
"namespace": "kube-system",
"annotations": {
"scheduler.alpha.kubernetes.io/critical-pod": ""
},
"labels": {
"tier": "control-plane",
"component": "kube-controller-manager"
Expand Down
3 changes: 3 additions & 0 deletions cluster/saltbase/salt/kube-scheduler/kube-scheduler.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
"metadata": {
"name":"kube-scheduler",
"namespace": "kube-system",
"annotations": {
"scheduler.alpha.kubernetes.io/critical-pod": ""
},
"labels": {
"tier": "control-plane",
"component": "kube-scheduler"
Expand Down
2 changes: 2 additions & 0 deletions cluster/saltbase/salt/l7-gcp/glbc.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: Pod
metadata:
name: l7-lb-controller-v0.9.3
namespace: kube-system
annotations:
scheduler.alpha.kubernetes.io/critical-pod: ''
labels:
k8s-app: glbc
version: v0.9.3
Expand Down
2 changes: 2 additions & 0 deletions cluster/saltbase/salt/rescheduler/rescheduler.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: Pod
metadata:
name: rescheduler-v0.3.0
namespace: kube-system
annotations:
scheduler.alpha.kubernetes.io/critical-pod: ''
labels:
k8s-app: rescheduler
version: v0.3.0
Expand Down
1 change: 1 addition & 0 deletions cmd/kubeadm/app/master/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ go_library(
"//pkg/bootstrap/api:go_default_library",
"//pkg/kubeapiserver/authorizer/modes:go_default_library",
"//pkg/kubectl/cmd/util:go_default_library",
"//pkg/kubelet/types:go_default_library",
"//pkg/util/version:go_default_library",
"//vendor/github.com/ghodss/yaml:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
Expand Down
8 changes: 5 additions & 3 deletions cmd/kubeadm/app/master/manifests.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import (
bootstrapapi "k8s.io/kubernetes/pkg/bootstrap/api"
authzmodes "k8s.io/kubernetes/pkg/kubeapiserver/authorizer/modes"
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
kubetypes "k8s.io/kubernetes/pkg/kubelet/types"
"k8s.io/kubernetes/pkg/util/version"
)

Expand Down Expand Up @@ -300,9 +301,10 @@ func componentPod(container api.Container, volumes ...api.Volume) api.Pod {
Kind: "Pod",
},
ObjectMeta: metav1.ObjectMeta{
Name: container.Name,
Namespace: "kube-system",
Labels: map[string]string{"component": container.Name, "tier": "control-plane"},
Name: container.Name,
Namespace: "kube-system",
Annotations: map[string]string{kubetypes.CriticalPodAnnotationKey: ""},
Labels: map[string]string{"component": container.Name, "tier": "control-plane"},
},
Spec: api.PodSpec{
Containers: []api.Container{container},
Expand Down

0 comments on commit e223eb9

Please sign in to comment.