diff --git a/charts/netbox/Chart.yaml b/charts/netbox/Chart.yaml index 2723bf9..bff179b 100644 --- a/charts/netbox/Chart.yaml +++ b/charts/netbox/Chart.yaml @@ -1,6 +1,7 @@ --- apiVersion: v1 appVersion: "2.6.1" -description: A Helm chart for Kubernetes +description: An IP address management (IPAM) and data center infrastructure management (DCIM) tool. +icon: https://raw.githubusercontent.com/digitalocean/netbox/develop/netbox/project-static/img/netbox.ico name: netbox -version: 0.1.1 +version: 0.1.2 diff --git a/charts/netbox/templates/deployment.yaml b/charts/netbox/templates/deployment.yaml index a2e5269..e8b0886 100644 --- a/charts/netbox/templates/deployment.yaml +++ b/charts/netbox/templates/deployment.yaml @@ -49,7 +49,16 @@ spec: protocol: TCP resources: {{- toYaml .Values.resources | nindent 12 }} - volumeMounts: [] + {{- if or .Values.persistence.enabled .Values.extraVolumeMounts }} + volumeMounts: + {{- if .Values.persistence.enabled }} + - name: data + mountPath: /etc/netbox/media + {{- end }} +{{- if .Values.extraVolumeMounts }} +{{ toYaml .Values.extraVolumeMounts | indent 10 }} +{{- end }} + {{- end }} # - name: netbox-configuration # path: /etc/netbox/config # readOnly: true @@ -79,8 +88,14 @@ spec: # - name: netbox-startup-scripts # configMap: # name: {{ .Chart.Name }}-startup-scripts - - name: netbox-media-files - emptyDir: {} + {{- if .Values.persistence.enabled }} + - name: data + persistentVolumeClaim: + claimName: {{ include "netbox.fullname" . }} + {{- end }} +{{- if .Values.extraVolumes }} +{{ toYaml .Values.extraVolumes | indent 8 }} +{{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} diff --git a/charts/netbox/values.yaml b/charts/netbox/values.yaml index c4003a9..c2c3008 100644 --- a/charts/netbox/values.yaml +++ b/charts/netbox/values.yaml @@ -100,6 +100,17 @@ tolerations: [] affinity: {} +extraVolumes: [] + +extraVolumeMounts: [] + # - name: extra-music-data + # mountPath: /srv/funkwhale/data/music + # readOnly: true + # existingClaim: volume-claim + +persistence: + enabled: false + worker: enabled: false