Skip to content

Commit

Permalink
Merge pull request #244 from yevgeny-shnaidman/yevgeny/manager-servic…
Browse files Browse the repository at this point in the history
…e-account

Using dedicated ServiceAccount for manager pod
  • Loading branch information
k8s-ci-robot authored Jul 15, 2024
2 parents f3b2307 + e5ce843 commit ea4d9be
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 239 deletions.
1 change: 1 addition & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ spec:
labels:
control-plane: nfd-controller-manager
spec:
serviceAccountName: nfd-manager
containers:
- name: manager
securityContext:
Expand Down
2 changes: 1 addition & 1 deletion config/rbac/auth_proxy/role_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ roleRef:
name: nfd-proxy-role
subjects:
- kind: ServiceAccount
name: default
name: nfd-manager
namespace: node-feature-discovery-operator
2 changes: 1 addition & 1 deletion config/rbac/core/leader_election_role_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ roleRef:
name: nfd-leader-election-role
subjects:
- kind: ServiceAccount
name: default
name: nfd-manager
namespace: node-feature-discovery-operator
2 changes: 1 addition & 1 deletion config/rbac/core/manager_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: nfd-manager-role
name: nfd-manager
rules:
- apiGroups:
- ""
Expand Down
233 changes: 0 additions & 233 deletions config/rbac/core/manager_role.yaml.working

This file was deleted.

6 changes: 3 additions & 3 deletions config/rbac/core/manager_role_binding.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: nfd-manager-rolebinding
name: nfd-manager
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: nfd-manager-role
name: nfd-manager
subjects:
- kind: ServiceAccount
name: default
name: nfd-manager
namespace: node-feature-discovery-operator
1 change: 1 addition & 0 deletions config/rbac/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ resources:
- prune/
- topologyupdater/
- worker/
- manager/
# Comment the following line if you want to disable
# the auth proxy (https://github.com/brancz/kube-rbac-proxy)
# which protects your /metrics endpoint.
Expand Down
5 changes: 5 additions & 0 deletions config/rbac/manager/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- sa.yaml
5 changes: 5 additions & 0 deletions config/rbac/manager/sa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: nfd-manager
namespace: node-feature-discovery-operator

0 comments on commit ea4d9be

Please sign in to comment.