Skip to content

Commit c8cd938

Browse files
anael-lAnaël LATASSA
andauthored
chore(#94): allow specifying other custom volumes (#95)
closes #94 Implemented with the same values as when you create a new helm chart with the latest version of helm `helm create mychart` Co-authored-by: Anaël LATASSA <[email protected]>
1 parent 590fadd commit c8cd938

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

helm/templates/deployment.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,17 @@ spec:
2525
{{- toYaml . | nindent 8 }}
2626
{{- end }}
2727
serviceAccountName: {{ include "code-marketplace.serviceAccountName" . }}
28-
{{- if not .Values.persistence.artifactory.enabled }}
28+
{{- if or (.Values.volumes) (not .Values.persistence.artifactory.enabled) }}
2929
volumes:
30+
{{- if not .Values.persistence.artifactory.enabled }}
3031
- name: extensions
3132
persistentVolumeClaim:
3233
claimName: {{ include "code-marketplace.fullname" . }}
3334
{{- end }}
35+
{{- with .Values.volumes }}
36+
{{- toYaml . | nindent 8 }}
37+
{{- end }}
38+
{{- end }}
3439
securityContext:
3540
{{- toYaml .Values.podSecurityContext | nindent 8 }}
3641
containers:
@@ -63,11 +68,16 @@ spec:
6368
- --extensions-dir
6469
- /extensions
6570
{{- end }}
66-
{{- if not .Values.persistence.artifactory.enabled }}
71+
{{- if or (.Values.volumeMounts) (not .Values.persistence.artifactory.enabled) }}
6772
volumeMounts:
73+
{{- if not .Values.persistence.artifactory.enabled }}
6874
- name: extensions
6975
mountPath: /extensions
7076
{{- end }}
77+
{{- with .Values.volumeMounts }}
78+
{{- toYaml . | nindent 12 }}
79+
{{- end }}
80+
{{- end }}
7181
livenessProbe:
7282
httpGet:
7383
path: /healthz

helm/values.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,19 @@ autoscaling:
7777
targetCPUUtilizationPercentage: 80
7878
# targetMemoryUtilizationPercentage: 80
7979

80+
# Additional volumes on the output Deployment definition.
81+
volumes: []
82+
# - name: foo
83+
# secret:
84+
# secretName: mysecret
85+
# optional: false
86+
87+
# Additional volumeMounts on the output Deployment definition.
88+
volumeMounts: []
89+
# - name: foo
90+
# mountPath: "/etc/foo"
91+
# readOnly: true
92+
8093
nodeSelector: {}
8194

8295
tolerations: []

0 commit comments

Comments
 (0)