feat(argo-cd): Add support for aggregation clusterroles
* feat: Add support for aggregation clusterroles Signed-off-by: Christian Strack <github@abyth.de>
This commit is contained in:
parent
607caac246
commit
d67acde1bd
4 changed files with 76 additions and 3 deletions
|
@ -2,7 +2,7 @@ apiVersion: v2
|
|||
appVersion: 2.0.5
|
||||
description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes.
|
||||
name: argo-cd
|
||||
version: 3.11.5
|
||||
version: 3.11.6
|
||||
home: https://github.com/argoproj/argo-helm
|
||||
icon: https://argoproj.github.io/argo-cd/assets/logo.png
|
||||
keywords:
|
||||
|
@ -21,4 +21,4 @@ dependencies:
|
|||
condition: redis-ha.enabled
|
||||
annotations:
|
||||
artifacthub.io/changes: |
|
||||
- "[Fixed]: Can't login when using configs.secret.argocdServerAdminPassword"
|
||||
- "[Added]: Support for aggregation clusterroles"
|
||||
|
|
|
@ -165,6 +165,7 @@ NAME: my-release
|
|||
| configs.secret.extra | add additional secrets to be added to argocd-secret | `{}` |
|
||||
| configs.styles | Define custom CSS styles for your argo instance ([Read More](https://argo-cd.readthedocs.io/en/stable/operator-manual/custom-styles/)). This Settings will automatically mount the provided css and reference it in the argo configuration. | `""` (See [values.yaml](values.yaml)) |
|
||||
| openshift.enabled | enables using arbitrary uid for argo repo server | `false` |
|
||||
| rbac.create | Create clusterroles that extend aggregated roles to use argo-cd crds | `false` |
|
||||
|
||||
## ArgoCD Controller
|
||||
|
||||
|
|
67
charts/argo-cd/templates/argocd-aggregate-roles.yaml
Normal file
67
charts/argo-cd/templates/argocd-aggregate-roles.yaml
Normal file
|
@ -0,0 +1,67 @@
|
|||
{{- if .Values.rbac.create }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ include "argo-cd.fullname" . }}-aggregate-to-view
|
||||
labels:
|
||||
rbac.authorization.k8s.io/aggregate-to-view: "true"
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- argoproj.io
|
||||
resources:
|
||||
- applications
|
||||
- appprojects
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ include "argo-cd.fullname" . }}-aggregate-to-edit
|
||||
labels:
|
||||
rbac.authorization.k8s.io/aggregate-to-edit: "true"
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- argoproj.io
|
||||
resources:
|
||||
- applications
|
||||
- appprojects
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- deletecollection
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ include "argo-cd.fullname" . }}-aggregate-to-admin
|
||||
labels:
|
||||
rbac.authorization.k8s.io/aggregate-to-admin: "true"
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- argoproj.io
|
||||
resources:
|
||||
- applications
|
||||
- appprojects
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- deletecollection
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
{{- end }}
|
|
@ -31,6 +31,11 @@ apiVersionOverrides:
|
|||
certmanager: "" # cert-manager.io/v1
|
||||
ingress: "" # networking.k8s.io/v1beta1
|
||||
|
||||
## Create clusterroles that extend existing clusterroles to interact with argo-cd crds
|
||||
## Ref: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#aggregated-clusterroles
|
||||
rbac:
|
||||
create: false
|
||||
|
||||
## Controller
|
||||
controller:
|
||||
name: application-controller
|
||||
|
|
Loading…
Reference in a new issue