Skip to content

Commit

Permalink
Replace Role with ClusterRole for secrets backup
Browse files Browse the repository at this point in the history
This also adds the `configmaps` resource to the rules of the new clusterrole, which is necessary for the backup script
  • Loading branch information
jjnesbitt committed Feb 22, 2023
1 parent d50676e commit 94e654a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions k8s/secrets-backup/service-accounts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,25 @@ metadata:
eks.amazonaws.com/role-arn: arn:aws:iam::588562868276:role/SecretsBackupRole-production

---
kind: Role
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: secrets-backup
namespace: custom
rules:
- apiGroups: [""]
resources: ["secrets"]
resources: ["secrets", "configmaps"]
verbs: ["get", "watch", "list"]

---
kind: RoleBinding
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: secrets-backup
namespace: custom
subjects:
- kind: ServiceAccount
name: secrets-backup
namespace: custom
roleRef:
kind: Role
kind: ClusterRole
name: secrets-backup
apiGroup: rbac.authorization.k8s.io

0 comments on commit 94e654a

Please sign in to comment.