Skip to content

Commit

Permalink
Merge pull request #212 from petrepopescu21/feature/rbac-role-in-values
Browse files Browse the repository at this point in the history
Make cluster role name configurable
  • Loading branch information
haarchri authored Mar 3, 2024
2 parents 7d1ecac + 815c553 commit 31635e1
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 13 deletions.
2 changes: 1 addition & 1 deletion charts/flux2/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ name: flux2
sources:
- https://github.com/fluxcd-community/helm-charts
type: application
version: 2.12.3
version: 2.12.4
2 changes: 1 addition & 1 deletion charts/flux2/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# flux2

![Version: 2.12.3](https://img.shields.io/badge/Version-2.12.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.2.3](https://img.shields.io/badge/AppVersion-2.2.3-informational?style=flat-square)
![Version: 2.12.4](https://img.shields.io/badge/Version-2.12.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.2.3](https://img.shields.io/badge/AppVersion-2.2.3-informational?style=flat-square)

A Helm chart for flux2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ metadata:
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
name: {{ .Values.rbac.roleRef.name }}
subjects:
- kind: ServiceAccount
name: kustomize-controller
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ should match snapshot of default values:
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 2.2.3
control-plane: controller
helm.sh/chart: flux2-2.12.3
helm.sh/chart: flux2-2.12.4
labeltestkey: labeltestvalue
labeltestkey2: labeltestvalue2
name: helm-controller
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ should match snapshot of default values:
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 2.2.3
control-plane: controller
helm.sh/chart: flux2-2.12.3
helm.sh/chart: flux2-2.12.4
name: image-automation-controller
spec:
replicas: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ should match snapshot of default values:
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 2.2.3
control-plane: controller
helm.sh/chart: flux2-2.12.3
helm.sh/chart: flux2-2.12.4
name: image-reflector-controller
spec:
replicas: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ should match snapshot of default values:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 2.2.3
helm.sh/chart: flux2-2.12.3
helm.sh/chart: flux2-2.12.4
name: test1
namespace: NAMESPACE
type: Opaque
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ should match snapshot of default values:
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 2.2.3
control-plane: controller
helm.sh/chart: flux2-2.12.3
helm.sh/chart: flux2-2.12.4
name: kustomize-controller
spec:
replicas: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ should match snapshot of default values:
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 2.2.3
control-plane: controller
helm.sh/chart: flux2-2.12.3
helm.sh/chart: flux2-2.12.4
name: notification-controller
spec:
replicas: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ should match snapshot of default values:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 2.2.3
helm.sh/chart: flux2-2.12.3
helm.sh/chart: flux2-2.12.4
name: RELEASE-NAME-flux-check
spec:
backoffLimit: 1
Expand All @@ -23,7 +23,7 @@ should match snapshot of default values:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 2.2.3
helm.sh/chart: flux2-2.12.3
helm.sh/chart: flux2-2.12.4
name: RELEASE-NAME
spec:
automountServiceAccountToken: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ should match snapshot of default values:
app.kubernetes.io/part-of: flux
app.kubernetes.io/version: 2.2.3
control-plane: controller
helm.sh/chart: flux2-2.12.3
helm.sh/chart: flux2-2.12.4
name: source-controller
spec:
replicas: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,11 @@ tests:
- equal:
path: metadata.annotations
value:
helm.sh/resource-policy: keep
helm.sh/resource-policy: keep
- it: should set clusterrole name
set:
rbac.roleRef.name: test-clusterrole
asserts:
- equal:
path: roleRef.name
value: test-clusterrole
2 changes: 2 additions & 0 deletions charts/flux2/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ rbac:
createAggregation: true
# -- Add annotations to all RBAC resources, e.g. "helm.sh/resource-policy": keep
annotations: {}
roleRef:
name: cluster-admin

logLevel: info
watchAllNamespaces: true
Expand Down

0 comments on commit 31635e1

Please sign in to comment.