This repository was archived by the owner on Jul 30, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +11
-14
lines changed
Expand file tree Collapse file tree 3 files changed +11
-14
lines changed Original file line number Diff line number Diff line change @@ -88,14 +88,15 @@ Once it reaches the API server and finds out that it's no longer being scheduled
8888### RBAC Requirements
8989
9090By default, the pod checkpoint runs with service account credentials, checkpointing its own
91- service account secret for reboots. That service account must be bound to a ClusterRole that
92- lets the pod checkpoint watch for Pods with the checkpoint annotation, then save ConfigMaps and
93- Secrets referenced by those Pods.
91+ service account secret for reboots. That service account must be bound to a Role that lets the
92+ pod checkpoint watch for Pods with the checkpoint annotation, then save ConfigMaps and Secrets
93+ referenced by those Pods.
9494
9595``` yaml
96- kind : ClusterRole
96+ kind : Role
9797metadata :
9898 name : pod-checkpointer
99+ namespace : kube-system
99100rules :
100101- apiGroups : [""] # "" indicates the core API group
101102 resources : ["pods"]
@@ -104,6 +105,3 @@ rules:
104105 resources : ["secrets", "configmaps"]
105106 verbs : ["get"]
106107` ` `
107-
108- Currently the pod checkpoint watches all pods in all namespaces, and requires a ClusterRole and
109- ClusterRoleBinding. In the future the pod checkpoint may be restricted to ` kube-system`.
Original file line number Diff line number Diff line change @@ -13,5 +13,5 @@ var DefaultImages = ImageVersions{
1313 KubeDNS : "gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.14.5" ,
1414 KubeDNSMasq : "gcr.io/google_containers/k8s-dns-dnsmasq-nanny-amd64:1.14.5" ,
1515 KubeDNSSidecar : "gcr.io/google_containers/k8s-dns-sidecar-amd64:1.14.5" ,
16- PodCheckpointer : "quay.io/coreos/pod-checkpointer:e22cc0e3714378de92f45326474874eb602ca0ac " ,
16+ PodCheckpointer : "quay.io/coreos/pod-checkpointer:08fa021813231323e121ecca7383cc64c4afe888 " ,
1717}
Original file line number Diff line number Diff line change @@ -332,13 +332,11 @@ metadata:
332332 name: pod-checkpointer
333333` )
334334
335- // TODO: Drop checkpointer RBAC resources to a Role and RoleBinding if
336- // the checkpoint switches to only watching kube-system.
337-
338335var CheckpointerRole = []byte (`apiVersion: rbac.authorization.k8s.io/v1
339- kind: ClusterRole
336+ kind: Role
340337metadata:
341338 name: pod-checkpointer
339+ namespace: kube-system
342340rules:
343341- apiGroups: [""] # "" indicates the core API group
344342 resources: ["pods"]
@@ -349,12 +347,13 @@ rules:
349347` )
350348
351349var CheckpointerRoleBinding = []byte (`apiVersion: rbac.authorization.k8s.io/v1
352- kind: ClusterRoleBinding
350+ kind: RoleBinding
353351metadata:
354352 name: pod-checkpointer
353+ namespace: kube-system
355354roleRef:
356355 apiGroup: rbac.authorization.k8s.io
357- kind: ClusterRole
356+ kind: Role
358357 name: pod-checkpointer
359358subjects:
360359- kind: ServiceAccount
You can’t perform that action at this time.
0 commit comments