feat(helm): ability to disable helm hooks (#23601)
Co-authored-by: Mike Joseph <mikejoseph@Mikes-MacBook-Pro.local>
diff --git a/helm/superset/Chart.yaml b/helm/superset/Chart.yaml
index c0e3708..b94fe6e 100644
--- a/helm/superset/Chart.yaml
+++ b/helm/superset/Chart.yaml
@@ -29,7 +29,7 @@
- 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 fa34bad..a4ed197 100644
--- a/helm/superset/README.md
+++ b/helm/superset/README.md
@@ -23,7 +23,7 @@
# 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 @@
| 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 266c22a..1f4ba57 100644
--- a/helm/superset/templates/init-job.yaml
+++ b/helm/superset/templates/init-job.yaml
@@ -19,9 +19,11 @@
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 29f0d86..b04dc66 100644
--- a/helm/superset/values.yaml
+++ b/helm/superset/values.yaml
@@ -638,6 +638,7 @@
- "-c"
- ". {{ .Values.configMountPath }}/superset_bootstrap.sh; . {{ .Values.configMountPath }}/superset_init.sh"
enabled: true
+ helmHook: true
loadExamples: false
createAdmin: true
adminUser: