Skip to content

Commit 09555f3

Browse files
authored
chore(kubernetes): Add helm chart support for extraVolumes and extraVolumeMounts. (#114)
Allows mounting custom filters in a kubernetes setup. Precondition for developmentseed/eoapi-k8s#388 Related: EOEPCA/resource-discovery#198 and IFRCGo/go-deploy#144
1 parent 73b8156 commit 09555f3

File tree

4 files changed

+56
-1
lines changed

4 files changed

+56
-1
lines changed

helm/Chart.yaml

Lines changed: 1 addition & 1 deletion
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.1
5+
version: 0.1.2
66
appVersion: "1.0.0"

helm/templates/deployment.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,15 @@ spec:
3838
- name: {{ $key }}
3939
value: {{ include "stac-auth-proxy.envValue" $value }}
4040
{{- end }}
41+
{{- with .Values.extraVolumeMounts }}
42+
volumeMounts:
43+
{{- toYaml . | nindent 12 }}
44+
{{- end }}
4145

46+
{{- with .Values.extraVolumes }}
47+
volumes:
48+
{{- toYaml . | nindent 8 }}
49+
{{- end }}
4250
{{- with .Values.nodeSelector }}
4351
nodeSelector:
4452
{{- toYaml . | nindent 8 }}

helm/values.schema.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,36 @@ properties:
236236
additionalProperties: true
237237
description: "Init containers to run before the main container starts"
238238

239+
extraVolumes:
240+
type: array
241+
items:
242+
type: object
243+
additionalProperties: true
244+
description: "Additional volumes to mount (e.g., ConfigMaps for custom filter files)"
245+
default: []
246+
247+
extraVolumeMounts:
248+
type: array
249+
items:
250+
type: object
251+
required: ["name", "mountPath"]
252+
properties:
253+
name:
254+
type: string
255+
description: "Name of the volume to mount"
256+
mountPath:
257+
type: string
258+
description: "Path within the container at which the volume should be mounted"
259+
subPath:
260+
type: string
261+
description: "Path within the volume from which the container's volume should be mounted"
262+
readOnly:
263+
type: boolean
264+
description: "Mounted read-only if true, read-write otherwise"
265+
additionalProperties: true
266+
description: "Additional volume mounts for the container"
267+
default: []
268+
239269
serviceAccount:
240270
type: object
241271
properties:

helm/values.yaml

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

49+
# Additional volumes to mount
50+
extraVolumes: []
51+
# Example:
52+
# extraVolumes:
53+
# - name: filters
54+
# configMap:
55+
# name: stac-auth-proxy-filters
56+
57+
# Additional volume mounts for the container
58+
extraVolumeMounts: []
59+
# Example:
60+
# extraVolumeMounts:
61+
# - name: filters
62+
# mountPath: /app/src/stac_auth_proxy/custom_filters.py
63+
# subPath: custom_filters.py
64+
# readOnly: true
65+
4966
# Init containers to run before the main container starts
5067
# initContainers: []
5168
# Example:

0 commit comments

Comments
 (0)