Skip to content

Commit

Permalink
Helm: Added support to mount sftp.json instead of using the generated…
Browse files Browse the repository at this point in the history
… value
  • Loading branch information
winromulus committed Nov 12, 2019
1 parent dc588b2 commit f0314c7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions deploy/helm/sftp/templates/config-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.configuration }}
apiVersion: v1
kind: Secret
metadata:
Expand All @@ -8,4 +9,5 @@ type: Opaque
stringData:
sftp.json: |-
{{ .Values.configuration | toPrettyJson | nindent 4 }}
{{- end }}

8 changes: 8 additions & 0 deletions deploy/helm/sftp/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,33 @@ spec:
- name: ssh
containerPort: 22
protocol: TCP
{{- if or .Values.configuration .Values.storage.volumeMounts }}
volumeMounts:
{{- if .Values.configuration }}
- name: sftp-json
mountPath: "/app"
readOnly: true
{{- end }}
{{- with .Values.storage.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- if or .Values.configuration .Values.storage.volumes }}
volumes:
{{- if .Values.configuration }}
- name: sftp-json
secret:
secretName: {{ include "sftp.fullname" . }}
items:
- key: sftp.json
path: sftp.json
{{- end }}
{{- with .Values.storage.volumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down

0 comments on commit f0314c7

Please sign in to comment.