diff --git a/helm/charts/hydra/templates/deployment.yaml b/helm/charts/hydra/templates/deployment.yaml index 0b91b510d9..5c6b3d493e 100644 --- a/helm/charts/hydra/templates/deployment.yaml +++ b/helm/charts/hydra/templates/deployment.yaml @@ -47,6 +47,9 @@ spec: - name: {{ include "hydra.name" . }}-config-volume mountPath: /etc/config readOnly: true + {{- if .Values.deployment.extraVolumeMounts }} +{{ toYaml .Values.deployment.extraVolumeMounts | indent 12 }} + {{- end }} env: - name: DSN valueFrom: @@ -58,6 +61,10 @@ spec: - name: {{ include "hydra.name" . }}-config-volume configMap: name: {{ include "hydra.fullname" . }} + {{- if .Values.deployment.extraVolumes }} +{{ toYaml .Values.deployment.extraVolumes | indent 8 }} + {{- end }} + {{- if .Values.deployment.serviceAccountName }} serviceAccountName: {{ .Values.deployment.serviceAccountName }} {{- end }} @@ -70,6 +77,9 @@ spec: - name: {{ include "hydra.name" . }}-config-volume mountPath: /etc/config readOnly: true + {{- if .Values.deployment.extraVolumeMounts }} +{{ toYaml .Values.deployment.extraVolumeMounts | indent 12 }} + {{- end }} args: [ "serve", "all", diff --git a/helm/charts/hydra/values.yaml b/helm/charts/hydra/values.yaml index c9375395e8..8fbdd4d33a 100644 --- a/helm/charts/hydra/values.yaml +++ b/helm/charts/hydra/values.yaml @@ -142,6 +142,20 @@ deployment: ## Uncoment if it is needed to provide a ServiceAccount for the Hydra deployment. # serviceAccountName: + extraVolumes: [] + extraVolumeMounts: [] + # If yout want to mount external volume + # For example, mount a secret containing Certificate root CA to verify database + # TLS connection. + # extraVolumes: + # - name: postgresql-tls + # secret: + # secretName: postgresql-root-ca + # extraVolumeMounts: + # - name: postgresql-tls + # mountPath: "/etc/postgresql-tls" + # readOnly: true + # Configure node affinity affinity: {}