From 4e3f4be909520749d65e62be45a09dff2e0b13a2 Mon Sep 17 00:00:00 2001 From: Matteo Ruina Date: Wed, 14 Apr 2021 09:54:07 +0200 Subject: [PATCH] fix(argo-applicationset): Fix leader election rbac Signed-off-by: Matteo Ruina --- charts/argo-applicationset/Chart.yaml | 2 +- charts/argo-applicationset/README.md | 11 ++++++++ .../argo-applicationset/templates/rbac.yaml | 25 ++++++++++++++++++- 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/charts/argo-applicationset/Chart.yaml b/charts/argo-applicationset/Chart.yaml index 19f9e7fd..c467c3c6 100644 --- a/charts/argo-applicationset/Chart.yaml +++ b/charts/argo-applicationset/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: argocd-applicationset description: A Helm chart for installing ArgoCD ApplicationSet type: application -version: 0.1.1 +version: 0.1.2 appVersion: "v0.1.0" home: https://github.com/argoproj/argo-helm icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png diff --git a/charts/argo-applicationset/README.md b/charts/argo-applicationset/README.md index efebc869..316bd8ce 100644 --- a/charts/argo-applicationset/README.md +++ b/charts/argo-applicationset/README.md @@ -27,6 +27,17 @@ NAME: my-release Users of Helm v3 should set the `installCRDs` value to `false` to avoid warnings about nonexistent webhooks. +### Testing + +Users can test the chart with [kind](https://kind.sigs.k8s.io/) and [ct](https://github.com/helm/chart-testing). + +```console +kind create cluster +kubectl create namespace argocd +kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml +ct install --namespace argocd +``` + ## Values | Key | Type | Default | Description | diff --git a/charts/argo-applicationset/templates/rbac.yaml b/charts/argo-applicationset/templates/rbac.yaml index a70179ea..1181e3d2 100644 --- a/charts/argo-applicationset/templates/rbac.yaml +++ b/charts/argo-applicationset/templates/rbac.yaml @@ -44,11 +44,22 @@ rules: - "" resources: - secrets - - configmaps verbs: - get - list - watch + - apiGroups: + - "" + resources: + - configmaps + verbs: + - create + - delete + - get + - list + - patch + - update + - watch - apiGroups: - apps - extensions @@ -58,6 +69,18 @@ rules: - get - list - watch + - apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - create + - delete + - get + - list + - patch + - update + - watch --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding