Skip to content

Commit a7ca408

Browse files
pantierraalukach
andauthored
feat(helm): Add support for initContainers. (#104)
This could be useful when the auth server is deployed with stac-auth-proxy and we need to wait. At least in eoAPI would be good for testing (developmentseed/eoapi-k8s#358). --------- Co-authored-by: Anthony Lukach <[email protected]>
1 parent 5ce9487 commit a7ca408

File tree

4 files changed

+21
-2
lines changed

4 files changed

+21
-2
lines changed

helm/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ apiVersion: v2
22
name: stac-auth-proxy
33
description: A Helm chart for stac-auth-proxy
44
type: application
5-
version: 0.1.0
6-
appVersion: "1.0.0"
5+
version: 0.1.1
6+
appVersion: "1.0.0"

helm/templates/deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ spec:
1717
serviceAccountName: {{ include "stac-auth-proxy.serviceAccountName" . }}
1818
securityContext:
1919
{{- toYaml .Values.securityContext | nindent 8 }}
20+
{{- with .Values.initContainers }}
21+
initContainers:
22+
{{- toYaml . | nindent 8 }}
23+
{{- end }}
2024
containers:
2125
- name: {{ .Chart.Name }}
2226
securityContext:

helm/values.schema.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,13 @@ properties:
229229
additionalProperties: true
230230
description: "Pod affinity rules"
231231

232+
initContainers:
233+
type: array
234+
items:
235+
type: object
236+
additionalProperties: true
237+
description: "Init containers to run before the main container starts"
238+
232239
serviceAccount:
233240
type: object
234241
properties:

helm/values.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ nodeSelector: {}
4646
tolerations: []
4747
affinity: {}
4848

49+
# Init containers to run before the main container starts
50+
# initContainers: []
51+
# Example:
52+
# initContainers:
53+
# - name: wait-for-oidc
54+
# image: busybox:1.35
55+
# command: ['sh', '-c', 'until nc -z oidc-server 8080; do sleep 2; done']
56+
4957
# Environment variables for the application
5058
env:
5159
# Required configuration

0 commit comments

Comments
 (0)