From 54a67ac3d9708b94ac201e07909dd63856386ad8 Mon Sep 17 00:00:00 2001 From: Yitzchak Weiser Date: Thu, 4 May 2023 12:33:16 -0400 Subject: [PATCH] template to set init job annotations --- helm/superset/Chart.yaml | 2 +- helm/superset/README.md | 4 ++-- helm/superset/templates/init-job.yaml | 6 ++---- helm/superset/values.yaml | 4 +++- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/helm/superset/Chart.yaml b/helm/superset/Chart.yaml index bff2f90276b10..c82802ae13281 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.3 +version: 0.10.0 dependencies: - name: postgresql version: 12.1.6 diff --git a/helm/superset/README.md b/helm/superset/README.md index 9a6c334c3bed8..b7dae80a8e608 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.3](https://img.shields.io/badge/Version-0.9.3-informational?style=flat-square) +![Version: 0.10.0](https://img.shields.io/badge/Version-0.10.0-informational?style=flat-square) Apache Superset is a modern, enterprise-ready business intelligence web application @@ -89,7 +89,7 @@ helm install my-superset superset/superset | init.containerSecurityContext | object | `{}` | | | init.createAdmin | bool | `true` | | | init.enabled | bool | `true` | | -| init.helmHook | bool | `true` | | +| init.jobAnnotations | object | `{}` | | | 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 16d452f852f06..0a8c45330d05c 100644 --- a/helm/superset/templates/init-job.yaml +++ b/helm/superset/templates/init-job.yaml @@ -23,10 +23,8 @@ kind: Job metadata: name: {{ template "superset.name" . }}-init-db namespace: {{ .Release.Namespace }} - {{- if .Values.init.helmHook }} - annotations: - "helm.sh/hook": post-install,post-upgrade - "helm.sh/hook-delete-policy": "before-hook-creation" + {{- if .Values.init.jobAnnotations }} + annotations: {{- toYaml .Values.init.jobAnnotations | nindent 4 }} {{- end }} spec: template: diff --git a/helm/superset/values.yaml b/helm/superset/values.yaml index 339833237939d..d645127932c3f 100644 --- a/helm/superset/values.yaml +++ b/helm/superset/values.yaml @@ -621,7 +621,9 @@ init: - "-c" - ". {{ .Values.configMountPath }}/superset_bootstrap.sh; . {{ .Values.configMountPath }}/superset_init.sh" enabled: true - helmHook: true + jobAnnotations: + "helm.sh/hook": post-install,post-upgrade + "helm.sh/hook-delete-policy": "before-hook-creation" loadExamples: false createAdmin: true adminUser: