Skip to content

Commit 9cc5541

Browse files
committed
back to hooks
1 parent cf267b2 commit 9cc5541

4 files changed

Lines changed: 27 additions & 3 deletions

File tree

Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ description: >
1212
# This is the chart version. This version number should be incremented each time you make changes
1313
# to the chart and its templates, including the app version.
1414
# Versions are expected to follow Semantic Versioning (https://semver.org/)
15-
version: 0.5.3
15+
version: 0.5.4
1616

1717
# This is the version number of the application being deployed. This version number should be
1818
# incremented each time you make changes to the application. Versions are not expected to
@@ -43,4 +43,4 @@ annotations:
4343
- name: Helm Chart
4444
url: https://github.com/pecanproject/bety-helm
4545
artifacthub.io/changes: |
46-
- need to check for table before start bety application
46+
- back to hooks since job completion requires RBAC role

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ The command removes all the Kubernetes components associated with the chart and
124124

125125
## ChangeLog
126126

127+
### 0.5.4
128+
- back to hooks since job completion requires RBAC role
129+
127130
### 0.5.3
128131
- need to check for table before start bety application
129132

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ metadata:
99
name: {{ include "betydb.fullname" . }}-add-user
1010
labels:
1111
{{- include "betydb.labels" . | nindent 4 }}
12+
annotations:
13+
# This is what defines this resource as a hook. Without this line, the
14+
# job is considered part of the release.
15+
# TODO once we have RBAC we can use initContainers to wait for a job
16+
"helm.sh/hook": "post-install"
17+
"helm.sh/hook-delete-policy": "pre-delete"
18+
"helm.sh/hook-weight": "10"
1219
spec:
1320
template:
1421
metadata:
@@ -26,6 +33,14 @@ spec:
2633
{{- toYaml . | nindent 8 }}
2734
{{- end }}
2835
initContainers:
36+
#{{- if or .Values.dburl .Values.dbtag }}
37+
# - name: check-job
38+
# image: ghcr.io/groundnuty/k8s-wait-for:v1.6
39+
# imagePullPolicy: {{ .Values.image.pullPolicy }}
40+
# args:
41+
# - "job"
42+
# - "{{ include "betydb.fullname" . }}-load-db"
43+
#{{- end }}
2944
- name: check-postgresql
3045
image: "{{ $.Values.image.checks }}"
3146
imagePullPolicy: {{ .Values.image.pullPolicy }}
@@ -34,7 +49,7 @@ spec:
3449
- name: PGDATABASE
3550
value: {{ .Values.betyDatabase | quote }}
3651
- name: PG_TABLE
37-
value: "sessions"
52+
value: "yields"
3853
containers:
3954
{{- range $index, $element := .Values.users }}
4055
- name: bety-add-user-{{ $index }}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ metadata:
55
name: {{ include "betydb.fullname" . }}-load-db
66
labels:
77
{{- include "betydb.labels" . | nindent 4 }}
8+
annotations:
9+
# This is what defines this resource as a hook. Without this line, the
10+
# job is considered part of the release.
11+
"helm.sh/hook": "post-install"
12+
"helm.sh/hook-delete-policy": "pre-delete"
13+
"helm.sh/hook-weight": "5"
814
spec:
915
template:
1016
metadata:

0 commit comments

Comments
 (0)