netbox: Finish persistence configuration
This commit is contained in:
parent
726dbbbf97
commit
c78d430e68
4 changed files with 34 additions and 6 deletions
|
@ -4,4 +4,4 @@ appVersion: "2.6.1"
|
||||||
description: An IP address management (IPAM) and data center infrastructure management (DCIM) tool.
|
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
|
icon: https://raw.githubusercontent.com/digitalocean/netbox/develop/netbox/project-static/img/netbox.ico
|
||||||
name: netbox
|
name: netbox
|
||||||
version: 0.2.3
|
version: 0.3.0
|
||||||
|
|
|
@ -44,10 +44,8 @@ spec:
|
||||||
readOnly: true
|
readOnly: true
|
||||||
- name: netbox-socket
|
- name: netbox-socket
|
||||||
mountPath: /tmp/netbox
|
mountPath: /tmp/netbox
|
||||||
{{- if .Values.persistence.enabled }}
|
|
||||||
- name: data
|
- name: data
|
||||||
mountPath: /etc/netbox/media
|
mountPath: /etc/netbox/media
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.extraVolumeMounts }}
|
{{- if .Values.extraVolumeMounts }}
|
||||||
{{ toYaml .Values.extraVolumeMounts | indent 12 }}
|
{{ toYaml .Values.extraVolumeMounts | indent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -93,11 +91,13 @@ spec:
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
- name: netbox-socket
|
- name: netbox-socket
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
{{- if .Values.persistence.enabled }}
|
|
||||||
- name: data
|
- name: data
|
||||||
|
{{- if .Values.persistence.enabled }}
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: {{ include "netbox.fullname" . }}
|
claimName: {{ .Values.persistence.existingClaim | default (include "netbox.fullname" .) }}
|
||||||
{{- end }}
|
{{- else }}
|
||||||
|
emptyDir: {}
|
||||||
|
{{- end }}
|
||||||
{{- if .Values.extraVolumes }}
|
{{- if .Values.extraVolumes }}
|
||||||
{{ toYaml .Values.extraVolumes | indent 8 }}
|
{{ toYaml .Values.extraVolumes | indent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
24
charts/netbox/templates/pvc.yaml
Normal file
24
charts/netbox/templates/pvc.yaml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: {{ template "netbox.fullname" . }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: {{ include "netbox.name" . }}
|
||||||
|
helm.sh/chart: {{ include "netbox.chart" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- {{ .Values.persistence.accessMode | quote }}
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.persistence.size | quote }}
|
||||||
|
{{- if .Values.persistence.storageClass }}
|
||||||
|
{{- if (eq "-" .Values.persistence.storageClass) }}
|
||||||
|
storageClassName: ""
|
||||||
|
{{- else }}
|
||||||
|
storageClassName: "{{ .Values.persistence.storageClass }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
|
@ -110,6 +110,10 @@ extraVolumeMounts: []
|
||||||
|
|
||||||
persistence:
|
persistence:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
# existingClaim: netbox-data
|
||||||
|
# storageClass: "-"
|
||||||
|
accessMode: ReadWriteOnce
|
||||||
|
size: 10Gi
|
||||||
|
|
||||||
worker:
|
worker:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
Loading…
Reference in a new issue