Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
feat: extraVolume and extraVolumeMounts
Browse files Browse the repository at this point in the history
  • Loading branch information
mloiseleur committed Dec 1, 2023
1 parent ec36512 commit c100b26
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
6 changes: 6 additions & 0 deletions traefik-hub/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ spec:
- name: plugins
mountPath: /plugins-storage
{{- end }}
{{- with .Values.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
securityContext:
fsGroup: 65532
volumes:
Expand All @@ -183,3 +186,6 @@ spec:
- name: plugins
emptyDir: { }
{{- end }}
{{- with .Values.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
21 changes: 21 additions & 0 deletions traefik-hub/tests/deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,24 @@ tests:
- equal:
path: spec.template.spec.imagePullSecrets[0].name
value: regcred
- it: should add and mount an extraVolume when set
set:
extraVolumes:
- name: certificates
secret:
secretNames: certificates
extraVolumeMounts:
- name: certificates
mountPath: /etc/traefik-hub/certs
asserts:
- contains:
path: spec.template.spec.volumes
content:
name: certificates
secret:
secretNames: certificates
- contains:
path: spec.template.spec.containers[0].volumeMounts
content:
name: certificates
mountPath: /etc/traefik-hub/certs
3 changes: 3 additions & 0 deletions traefik-hub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ additionalArguments: []
additionalEnvVars: []
additionalLabels: {}

extraVolumes: []
extraVolumeMounts: []

service:
# common use:
# type: LoadBalancer
Expand Down

0 comments on commit c100b26

Please sign in to comment.