Skip to content

Commit

Permalink
Use custom service accounts instead of default for controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
furkatgofurov7 committed Mar 10, 2021
1 parent 451d034 commit eceb123
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions config/default/aad-pod-identity-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ metadata:
k8s-app: capz-aad-pod-id-nmi-binding
subjects:
- kind: ServiceAccount
name: default
name: manager
namespace: capz-system
roleRef:
kind: ClusterRole
Expand Down Expand Up @@ -92,7 +92,7 @@ spec:
component: nmi
tier: node
spec:
serviceAccountName: default
serviceAccountName: manager
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
volumes:
Expand Down
1 change: 1 addition & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ spec:
fieldRef:
fieldPath: metadata.namespace
terminationGracePeriodSeconds: 10
serviceAccountName: manager
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: proxy-role
subjects:
- kind: ServiceAccount
name: default
name: manager
namespace: system
1 change: 1 addition & 0 deletions config/rbac/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: Kustomization
resources:
- role.yaml
- role_binding.yaml
- service_account.yaml
- leader_election_role.yaml
- leader_election_role_binding.yaml
- auth_proxy_client_clusterrole.yaml
Expand Down
2 changes: 1 addition & 1 deletion config/rbac/leader_election_role_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ roleRef:
name: leader-election-role
subjects:
- kind: ServiceAccount
name: default
name: manager
namespace: system
2 changes: 1 addition & 1 deletion config/rbac/role_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ roleRef:
name: manager-role
subjects:
- kind: ServiceAccount
name: default
name: manager
namespace: system
5 changes: 5 additions & 0 deletions config/rbac/service_account.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: manager
namespace: system

0 comments on commit eceb123

Please sign in to comment.