From 517b6b86049b185718e9c13770ced9caad7c7797 Mon Sep 17 00:00:00 2001 From: Mayank Shah Date: Thu, 12 Dec 2024 20:56:38 +0530 Subject: [PATCH 1/3] fix rbac Signed-off-by: Mayank Shah --- charts/everest/charts/common/Chart.yaml | 2 +- .../common/templates/_upgrade_checks.yaml.tpl | 39 +++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/charts/everest/charts/common/Chart.yaml b/charts/everest/charts/common/Chart.yaml index c29b23df..95848bb6 100644 --- a/charts/everest/charts/common/Chart.yaml +++ b/charts/everest/charts/common/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: common description: A library chart for Everest containing common resources. type: library -version: 0.0.10 +version: 0.0.11 appVersion: "0.0.3" maintainers: - name: mayankshah1607 diff --git a/charts/everest/charts/common/templates/_upgrade_checks.yaml.tpl b/charts/everest/charts/common/templates/_upgrade_checks.yaml.tpl index 0fd9e5ad..e16edf33 100644 --- a/charts/everest/charts/common/templates/_upgrade_checks.yaml.tpl +++ b/charts/everest/charts/common/templates/_upgrade_checks.yaml.tpl @@ -47,6 +47,45 @@ subjects: name: {{ $hookName }} namespace: {{ .namespace }} --- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ $hookName }} + annotations: + "helm.sh/hook": pre-upgrade + "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded +rules: + - apiGroups: + - "" + resources: + - namespaces + verbs: + - list + - apiGroups: + - operators.coreos.com + resources: + - subscriptions + - clusterserviceversions + verbs: + - get + - list +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ $hookName }} + annotations: + "helm.sh/hook": pre-upgrade + "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ $hookName }} +subjects: + - kind: ServiceAccount + name: {{ $hookName }} + namespace: {{ .namespace }} +--- apiVersion: batch/v1 kind: Job metadata: From 700b2664e0d9d57d8f9759a72c581617226582b7 Mon Sep 17 00:00:00 2001 From: Mayank Shah Date: Thu, 12 Dec 2024 20:57:09 +0530 Subject: [PATCH 2/3] update deps Signed-off-by: Mayank Shah --- charts/everest/Chart.lock | 6 +++--- charts/everest/charts/everest-db-namespace/Chart.lock | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/charts/everest/Chart.lock b/charts/everest/Chart.lock index 01f60bf1..ae52ff60 100644 --- a/charts/everest/Chart.lock +++ b/charts/everest/Chart.lock @@ -1,7 +1,7 @@ dependencies: - name: common repository: file://charts/common - version: 0.0.10 + version: 0.0.11 - name: everest-db-namespace repository: file://charts/everest-db-namespace version: 0.0.0 @@ -11,5 +11,5 @@ dependencies: - name: victoria-metrics-operator repository: https://victoriametrics.github.io/helm-charts version: 0.37.0 -digest: sha256:7ff4b6b7298b24aa96d2bf73cb3ce3c891997f016815e18acaaf326c603621e1 -generated: "2024-12-12T18:45:12.381768+05:30" +digest: sha256:54860d2efc9709c4b9808b3f3929e5dc1e744681c9c81c40f698d2d06cf184ff +generated: "2024-12-12T20:56:54.266112+05:30" diff --git a/charts/everest/charts/everest-db-namespace/Chart.lock b/charts/everest/charts/everest-db-namespace/Chart.lock index 8fca8cbb..79e0f2ad 100644 --- a/charts/everest/charts/everest-db-namespace/Chart.lock +++ b/charts/everest/charts/everest-db-namespace/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: common repository: file://../common - version: 0.0.10 -digest: sha256:d4cac358be2d69d442c3ab82ce0945f65ea1101909b3ec3a22202cc19dbcdae9 -generated: "2024-12-12T18:45:16.470721+05:30" + version: 0.0.11 +digest: sha256:76207a0fd5b735778bb6df03fb4859334fff0381b71fc719cdaa89d1608049bb +generated: "2024-12-12T20:56:58.278472+05:30" From d3463887286693e15aafffb4cba67b0128c8b01c Mon Sep 17 00:00:00 2001 From: Mayank Shah Date: Thu, 12 Dec 2024 20:58:01 +0530 Subject: [PATCH 3/3] docs gen Signed-off-by: Mayank Shah --- charts/everest/charts/common/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/everest/charts/common/README.md b/charts/everest/charts/common/README.md index dc656520..aa0b0a35 100644 --- a/charts/everest/charts/common/README.md +++ b/charts/everest/charts/common/README.md @@ -1,6 +1,6 @@ # common -![Version: 0.0.10](https://img.shields.io/badge/Version-0.0.10-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) ![AppVersion: 0.0.3](https://img.shields.io/badge/AppVersion-0.0.3-informational?style=flat-square) +![Version: 0.0.11](https://img.shields.io/badge/Version-0.0.11-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) ![AppVersion: 0.0.3](https://img.shields.io/badge/AppVersion-0.0.3-informational?style=flat-square) A library chart for Everest containing common resources.