Skip to content

Commit a3ae8f1

Browse files
authored
Merge pull request #81 from PrivateBin/feat/additional-mounts
feat: add extra volumes mount
2 parents 21a13ae + af47ea5 commit a3ae8f1

File tree

6 files changed

+43
-1
lines changed

6 files changed

+43
-1
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ See values.yaml for full documentation
6161
| `configs` | Optional Privatebin configuration file | `{}` |
6262
| `podAnnotations` | Additional annotations to add to the pods | `{}` |
6363
| `additionalLabels` | Additional labels to add to resources | `{}` |
64+
| `extraVolumes` | Additional volumes to add to the pods | `[]` |
65+
| `extraVolumeMounts` | Additional volume mounts to add to the pods | `[]` |
66+
6467

6568
## Upgrades
6669

charts/privatebin/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ name: privatebin
66
home: https://privatebin.info/
77
icon: https://raw.githubusercontent.com/PrivateBin/assets/master/images/preview/icon.png
88
type: application
9-
version: 0.16.0
9+
version: 0.17.0
1010
maintainers:
1111
- name: bdashrad
1212

charts/privatebin/templates/_helpers.tpl

+13
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,16 @@ Return the appropriate apiVersion for podsecuritypolicy.
5252
{{- print "policy/v1beta1" -}}
5353
{{- end -}}
5454
{{- end -}}
55+
56+
{{/*
57+
Renders a value that contains template.
58+
Usage:
59+
{{ include "privatebin.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $) }}
60+
*/}}
61+
{{- define "privatebin.tplvalues.render" -}}
62+
{{- if typeIs "string" .value }}
63+
{{- tpl .value .context }}
64+
{{- else }}
65+
{{- tpl (.value | toYaml) .context }}
66+
{{- end }}
67+
{{- end -}}

charts/privatebin/templates/deployment.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ spec:
7979
mountPath: /tmp
8080
- name: nginx-cache
8181
mountPath: /var/lib/nginx/tmp
82+
{{- if .Values.extraVolumeMounts }}
83+
{{- include "privatebin.tplvalues.render" (dict "value" .Values.extraVolumeMounts "context" $) | nindent 12 }}
84+
{{- end }}
8285
{{- with .Values.nodeSelector }}
8386
nodeSelector:
8487
{{- toYaml . | nindent 8 }}
@@ -107,4 +110,7 @@ spec:
107110
medium: "Memory"
108111
- name: nginx-cache
109112
emptyDir: {}
113+
{{- if .Values.extraVolumes }}
114+
{{- include "privatebin.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 8 }}
115+
{{- end }}
110116
{{- end }}

charts/privatebin/templates/statefulset.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ spec:
7878
mountPath: /tmp
7979
- name: nginx-cache
8080
mountPath: /var/lib/nginx/tmp
81+
{{- if .Values.extraVolumeMounts }}
82+
{{- include "privatebin.tplvalues.render" (dict "value" .Values.extraVolumeMounts "context" $) | nindent 12 }}
83+
{{- end }}
8184
{{- with .Values.nodeSelector }}
8285
nodeSelector:
8386
{{- toYaml . | nindent 8 }}
@@ -102,6 +105,9 @@ spec:
102105
medium: "Memory"
103106
- name: nginx-cache
104107
emptyDir: {}
108+
{{- if .Values.extraVolumes }}
109+
{{- include "privatebin.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 8 }}
110+
{{- end }}
105111
volumeClaimTemplates:
106112
- metadata:
107113
name: storage

charts/privatebin/values.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,20 @@ securityContext:
5959
fsGroup: 82
6060
readOnlyRootFilesystem: true
6161

62+
extraVolumes: []
63+
# Optionally specify extra list of additional volumes for PrivateBin pod.
64+
# Example
65+
# - name: nginx-params
66+
# configMap:
67+
# name: nginx-params
68+
69+
extraVolumeMounts: []
70+
# Optionally specify extra list of additional volumeMounts for PrivateBin pod.
71+
# Example
72+
# - mountPath: /etc/nginx/server.d
73+
# name: nginx-params
74+
75+
6276
ingress:
6377
enabled: false
6478
annotations: {}

0 commit comments

Comments
 (0)