Skip to content

Commit 54ccd8d

Browse files
feat: correct rbac for running in cluster
1 parent 35bb4f8 commit 54ccd8d

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

charts/ecr-cleanup/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ type: application
2020
# This is the chart version. This version number should be incremented each time you make changes
2121
# to the chart and its templates, including the app version.
2222
# Versions are expected to follow Semantic Versioning (https://semver.org/)
23-
version: 0.2.9
23+
version: 0.2.10
2424

2525
# This is the version number of the application being deployed. This version number should be
2626
# incremented each time you make changes to the application. Versions are not expected to
2727
# follow Semantic Versioning. They should reflect the version the application is using.
2828
# It is recommended to use it with quotes.
29-
appVersion: "0.2.9"
29+
appVersion: "0.2.10"

charts/ecr-cleanup/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Deploys a job that cleans up an ECR repo based on the following rules.
66
3. Has the container been tagged with the word `keep`
77
4. Is the container the only tag in the ECR repository
88

9-
![Version: 0.2.9](https://img.shields.io/badge/Version-0.2.9-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.2.9](https://img.shields.io/badge/AppVersion-0.2.9-informational?style=flat-square)
9+
![Version: 0.2.10](https://img.shields.io/badge/Version-0.2.10-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.2.10](https://img.shields.io/badge/AppVersion-0.2.10-informational?style=flat-square)
1010

1111
## Values
1212

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
apiVersion: rbac.authorization.k8s.io/v1
2-
kind: Role
2+
kind: ClusterRole
33
metadata:
4-
namespace: {{ .Release.Namespace }}
54
name: {{ .Values.serviceAccount.name }}
65
rules:
7-
- apiGroups: ["v1"]
6+
- apiGroups: [""]
87
resources: ["pods"]
98
verbs: ["get", "watch", "list"]
10-
- apiGroups: ["apps/v1"]
11-
resources: ["daemonsets ","deployments","statefulsets"]
9+
- apiGroups: ["apps"]
10+
resources: ["daemonsets","deployments","statefulsets"]
1211
verbs: ["get", "watch", "list"]
13-
- apiGroups: ["batch/v1"]
12+
- apiGroups: ["batch"]
1413
resources: ["jobs","cronjobs"]
1514
verbs: ["get", "watch", "list"]
1615
---
1716
apiVersion: rbac.authorization.k8s.io/v1
18-
kind: RoleBinding
17+
# This cluster role binding allows anyone in the "manager" group to
18+
# read secrets in any namespace.
19+
kind: ClusterRoleBinding
1920
metadata:
2021
name: {{ .Values.serviceAccount.name }}
21-
namespace: {{.Release.Namespace}}
2222
roleRef:
2323
apiGroup: rbac.authorization.k8s.io
24-
kind: Role
24+
kind: ClusterRole
2525
name: {{ .Values.serviceAccount.name }}
2626
subjects:
27-
- namespace: {{.Release.Namespace}}
28-
kind: ServiceAccount
27+
- kind: ServiceAccount
2928
name: {{ .Values.serviceAccount.name }}
29+
namespace: {{.Release.Namespace}}

0 commit comments

Comments
 (0)