Skip to content

Commit

Permalink
fix: reduce permissions for cluster role (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
MicaiahReid authored Sep 21, 2023
1 parent ef1ebde commit 2ea50ea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 deletions templates/ci/stacks-devnet-api.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ metadata:
name: stacks-devnet-api-service-account
rules:
- apiGroups: [""]
# TODO: production version should not be able to create/delete namespaces (only get)
resources: ["pods", "pods/status", "services", "configmaps", "persistentvolumeclaims", "namespaces"]
resources: ["pods", "pods/status", "services", "configmaps", "persistentvolumeclaims"]
verbs: ["get", "delete", "create"]
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["get"]

---
apiVersion: rbac.authorization.k8s.io/v1
Expand Down
7 changes: 5 additions & 2 deletions templates/stacks-devnet-api.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ metadata:
name: stacks-devnet-api-service-account
rules:
- apiGroups: [""]
# TODO: production version should not be able to create/delete namespaces (only get)
resources: ["pods", "pods/status", "services", "configmaps", "persistentvolumeclaims", "namespaces"]
resources: ["pods", "pods/status", "services", "configmaps", "persistentvolumeclaims"]
verbs: ["get", "delete", "create"]
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["get"]


---
apiVersion: rbac.authorization.k8s.io/v1
Expand Down

0 comments on commit 2ea50ea

Please sign in to comment.