Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions templates/pattern-operator-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ data:
{{- if .Values.main.gitops.additionalArgoAdmins }}
gitops.additionalArgoAdmins: {{ .Values.main.gitops.additionalArgoAdmins }}
{{- end }}
{{- if .Values.main.gitops.argoRBAC }}
gitops.argoRBAC: |
{{ .Values.main.gitops.argoRBAC | indent 4 }}
{{- end }}

# gitops.sourceNamespace: GitOpsDefaultCatalogSourceNamespace
# gitops.installApprovalPlan: GitOpsDefaultApprovalPlan
Expand Down
17 changes: 17 additions & 0 deletions tests/pattern_operator_configmap_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,23 @@ tests:
path: data["gitops.additionalArgoAdmins"]
value: "group1,group2"

- it: Should not include gitops.argoRBAC by default
asserts:
- notExists:
path: data["gitops.argoRBAC"]

- it: Should set gitops.argoRBAC
set:
main:
gitops:
argoRBAC: |
defaultPolicy: "role:readonly"
policy: "g, custom-admins, role:admin"
scopes: "[groups,email]"
asserts:
- exists:
path: data["gitops.argoRBAC"]

- it: Should set gitea parameters
set:
main:
Expand Down
3 changes: 3 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ main:
# -- Comma-separated list of additional ArgoCD admin groups.
# Only used when argoRBAC is not set.
additionalArgoAdmins: ""
# -- Full ArgoCD RBAC spec as a YAML string. When set, it completely
# overrides the default RBAC policy and additionalArgoAdmins is ignored.
argoRBAC: ""

# -- Settings related to the in-cluster gitea installation
gitea:
Expand Down