Skip to content

Commit

Permalink
build: helm template to set init job annotations (#23941)
Browse files Browse the repository at this point in the history
Co-authored-by: Yitzchak Weiser <yweiser@redseal.net>
  • Loading branch information
ybudweiser and Yitzchak Weiser committed May 18, 2023
1 parent 8fb0d6e commit ea5d0cc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion helm/superset/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ maintainers:
- name: craig-rueda
email: craig@craigrueda.com
url: https://github.com/craig-rueda
version: 0.9.4
version: 0.10.0
dependencies:
- name: postgresql
version: 12.1.6
Expand Down
5 changes: 3 additions & 2 deletions helm/superset/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ NOTE: This file is generated by helm-docs: https://github.com/norwoodj/helm-docs

# superset

![Version: 0.9.4](https://img.shields.io/badge/Version-0.9.4-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

Expand Down Expand Up @@ -91,9 +91,10 @@ 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.jobAnnotations."helm.sh/hook" | string | `"post-install,post-upgrade"` | |
| init.jobAnnotations."helm.sh/hook-delete-policy" | string | `"before-hook-creation"` | |
| init.loadExamples | bool | `false` | |
| init.podAnnotations | object | `{}` | |
| init.podSecurityContext | object | `{}` | |
Expand Down
6 changes: 2 additions & 4 deletions helm/superset/templates/init-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion helm/superset/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,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:
Expand Down

0 comments on commit ea5d0cc

Please sign in to comment.