From 436bdc991b945d14dbda779be7cad5207972b2b8 Mon Sep 17 00:00:00 2001 From: Mike Joseph Date: Thu, 6 Apr 2023 02:33:04 +0300 Subject: [PATCH] feat(helm): ability to toggle off helm hooks --- helm/superset/Chart.yaml | 2 +- helm/superset/README.md | 3 ++- helm/superset/templates/init-job.yaml | 2 ++ helm/superset/values.yaml | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/helm/superset/Chart.yaml b/helm/superset/Chart.yaml index c0e3708918fdd..b94fe6efc70b5 100644 --- a/helm/superset/Chart.yaml +++ b/helm/superset/Chart.yaml @@ -29,7 +29,7 @@ maintainers: - name: craig-rueda email: craig@craigrueda.com url: https://github.com/craig-rueda -version: 0.9.0 +version: 0.9.1 dependencies: - name: postgresql version: 12.1.6 diff --git a/helm/superset/README.md b/helm/superset/README.md index fa34bad4f73bb..a4ed197f6315f 100644 --- a/helm/superset/README.md +++ b/helm/superset/README.md @@ -23,7 +23,7 @@ NOTE: This file is generated by helm-docs: https://github.com/norwoodj/helm-docs # superset -![Version: 0.9.0](https://img.shields.io/badge/Version-0.9.0-informational?style=flat-square) +![Version: 0.9.1](https://img.shields.io/badge/Version-0.9.1-informational?style=flat-square) Apache Superset is a modern, enterprise-ready business intelligence web application @@ -89,6 +89,7 @@ helm install my-superset superset/superset | init.containerSecurityContext | object | `{}` | | | init.createAdmin | bool | `true` | | | init.enabled | bool | `true` | | +| init.helmHook | bool | `true` | | | init.initContainers | list | a container waiting for postgres | List of initContainers | | init.initscript | string | a script to create admin user and initailize roles | A Superset init script | | init.loadExamples | bool | `false` | | diff --git a/helm/superset/templates/init-job.yaml b/helm/superset/templates/init-job.yaml index 266c22a6370e5..1f4ba57ae54ea 100644 --- a/helm/superset/templates/init-job.yaml +++ b/helm/superset/templates/init-job.yaml @@ -19,9 +19,11 @@ apiVersion: batch/v1 kind: Job metadata: name: {{ template "superset.name" . }}-init-db + {{- if .Values.init.helmHook }} annotations: "helm.sh/hook": post-install,post-upgrade "helm.sh/hook-delete-policy": "before-hook-creation" + {{- end }} namespace: {{ .Release.Namespace }} spec: template: diff --git a/helm/superset/values.yaml b/helm/superset/values.yaml index 29f0d8643b034..b04dc6693497b 100644 --- a/helm/superset/values.yaml +++ b/helm/superset/values.yaml @@ -638,6 +638,7 @@ init: - "-c" - ". {{ .Values.configMountPath }}/superset_bootstrap.sh; . {{ .Values.configMountPath }}/superset_init.sh" enabled: true + helmHook: true loadExamples: false createAdmin: true adminUser: