Skip to content

Commit a73bc0f

Browse files
feat: add support for job annotations in pgstac bootstrap configuration
1 parent f8a378e commit a73bc0f

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

charts/eoapi/templates/database/pgstacbootstrap/job.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ metadata:
3030
helm.sh/hook: "post-install,post-upgrade"
3131
helm.sh/hook-weight: "-5"
3232
helm.sh/hook-delete-policy: "before-hook-creation"
33+
{{- with .Values.pgstacBootstrap.jobAnnotations }}
34+
{{- toYaml . | nindent 4 }}
35+
{{- end }}
3336
spec:
3437
template:
3538
metadata:
@@ -98,6 +101,9 @@ metadata:
98101
helm.sh/hook: "post-install,post-upgrade"
99102
helm.sh/hook-weight: "-4"
100103
helm.sh/hook-delete-policy: "before-hook-creation"
104+
{{- with .Values.pgstacBootstrap.jobAnnotations }}
105+
{{- toYaml . | nindent 4 }}
106+
{{- end }}
101107
spec:
102108
template:
103109
metadata:
@@ -169,6 +175,9 @@ metadata:
169175
helm.sh/hook: "post-install,post-upgrade"
170176
helm.sh/hook-weight: "-3"
171177
helm.sh/hook-delete-policy: "before-hook-creation"
178+
{{- with .Values.pgstacBootstrap.jobAnnotations }}
179+
{{- toYaml . | nindent 4 }}
180+
{{- end }}
172181
spec:
173182
template:
174183
metadata:
@@ -221,7 +230,7 @@ spec:
221230
{{- toYaml .Values.pgstacBootstrap.settings.resources | nindent 12 }}
222231
volumeMounts:
223232
{{- range $idx, $config := .Values.pgstacBootstrap.settings.queryables }}
224-
{{- if $config.file }}
233+
{{- if and $config.file (typeIs "string" $config.file) }}
225234
- mountPath: /opt/queryables/{{ $config.name }}
226235
name: {{ $.Release.Name }}-queryables-volume
227236
subPath: {{ $config.name }}
@@ -236,7 +245,7 @@ spec:
236245
volumes:
237246
{{- $hasFileBasedQueryables := false }}
238247
{{- range $config := .Values.pgstacBootstrap.settings.queryables }}
239-
{{- if $config.file }}
248+
{{- if and $config.file (typeIs "string" $config.file) }}
240249
{{- $hasFileBasedQueryables = true }}
241250
{{- end }}
242251
{{- end }}

charts/eoapi/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ pgstacBootstrap:
153153
image:
154154
name: ghcr.io/stac-utils/pgstac-pypgstac
155155
tag: v0.9.8
156+
# Annotations to add to the pgstac bootstrap job
157+
jobAnnotations: {}
156158
settings:
157159
# General configuration options
158160
loadSamples: true # Set to false to disable sample data loading

0 commit comments

Comments
 (0)