diff options
Diffstat (limited to 'kubernetes/contrib/charts')
6 files changed, 13 insertions, 34 deletions
diff --git a/kubernetes/contrib/charts/netbox/charts/netbox-app/templates/pv.yaml b/kubernetes/contrib/charts/netbox/charts/netbox-app/templates/pv.yaml index eacd4959e8..f741cba64c 100755 --- a/kubernetes/contrib/charts/netbox/charts/netbox-app/templates/pv.yaml +++ b/kubernetes/contrib/charts/netbox/charts/netbox-app/templates/pv.yaml @@ -15,6 +15,7 @@ */}} {{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}} +{{- if not .Values.persistence.storageClass -}} kind: PersistentVolume apiVersion: v1 metadata: @@ -35,3 +36,4 @@ spec: hostPath: path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}/app {{- end -}} +{{- end -}} diff --git a/kubernetes/contrib/charts/netbox/charts/netbox-app/templates/pvc.yaml b/kubernetes/contrib/charts/netbox/charts/netbox-app/templates/pvc.yaml index b911d239e5..8fbd4544dc 100755 --- a/kubernetes/contrib/charts/netbox/charts/netbox-app/templates/pvc.yaml +++ b/kubernetes/contrib/charts/netbox/charts/netbox-app/templates/pvc.yaml @@ -27,12 +27,14 @@ metadata: heritage: "{{ .Release.Service }}" {{- if .Values.persistence.annotations }} annotations: -{{ toYaml .Values.persistence.annotations | indent 4 }} +{{ .Values.persistence.annotations | indent 4 }} {{- end }} spec: +{{- if not .Values.persistence.storageClass -}} selector: matchLabels: name: {{ .Release.Name }}-{{ .Values.persistence.staticPvName }} +{{- end }} accessModes: - {{ .Values.persistence.accessMode }} resources: diff --git a/kubernetes/contrib/charts/netbox/charts/netbox-app/values.yaml b/kubernetes/contrib/charts/netbox/charts/netbox-app/values.yaml index 9d5060de03..49a96eb053 100755 --- a/kubernetes/contrib/charts/netbox/charts/netbox-app/values.yaml +++ b/kubernetes/contrib/charts/netbox/charts/netbox-app/values.yaml @@ -77,25 +77,10 @@ affinity: {} ## Persist data to a persitent volume persistence: enabled: true - - ## A manually managed Persistent Volume and Claim - ## Requires persistence.enabled: true - ## If defined, PVC must be created manually before volume will be bound - # existingClaim: volumeReclaimPolicy: Retain - - ## database data Persistent Volume Storage Class - ## If defined, storageClassName: <storageClass> - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" accessMode: ReadWriteMany size: 100Mi - mountPath: /dockerdata-nfs - mountSubPath: netbox/shared + storageClass: "nfs-dev-sc" # Names used for shared pv/pvcs across App & Nginx containers staticPvName: netbox-static diff --git a/kubernetes/contrib/charts/netbox/charts/netbox-postgres/templates/pv.yaml b/kubernetes/contrib/charts/netbox/charts/netbox-postgres/templates/pv.yaml index 882aed7cef..a19f5001e5 100755 --- a/kubernetes/contrib/charts/netbox/charts/netbox-postgres/templates/pv.yaml +++ b/kubernetes/contrib/charts/netbox/charts/netbox-postgres/templates/pv.yaml @@ -15,6 +15,7 @@ */}} {{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}} +{{- if not .Values.persistence.storageClass -}} kind: PersistentVolume apiVersion: v1 metadata: @@ -35,3 +36,4 @@ spec: hostPath: path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }} {{- end -}} +{{- end -}}
\ No newline at end of file diff --git a/kubernetes/contrib/charts/netbox/charts/netbox-postgres/templates/pvc.yaml b/kubernetes/contrib/charts/netbox/charts/netbox-postgres/templates/pvc.yaml index a3813f1af8..77602117a6 100755 --- a/kubernetes/contrib/charts/netbox/charts/netbox-postgres/templates/pvc.yaml +++ b/kubernetes/contrib/charts/netbox/charts/netbox-postgres/templates/pvc.yaml @@ -27,12 +27,14 @@ metadata: heritage: "{{ .Release.Service }}" {{- if .Values.persistence.annotations }} annotations: -{{ toYaml .Values.persistence.annotations | indent 4 }} +{{ .Values.persistence.annotations | indent 4 }} {{- end }} spec: +{{- if not .Values.persistence.storageClass -}} selector: matchLabels: name: {{ include "common.fullname" . }} +{{- end }} accessModes: - {{ .Values.persistence.accessMode }} resources: diff --git a/kubernetes/contrib/charts/netbox/charts/netbox-postgres/values.yaml b/kubernetes/contrib/charts/netbox/charts/netbox-postgres/values.yaml index 06127e3a1f..c54c3a68f5 100755 --- a/kubernetes/contrib/charts/netbox/charts/netbox-postgres/values.yaml +++ b/kubernetes/contrib/charts/netbox/charts/netbox-postgres/values.yaml @@ -56,25 +56,11 @@ readiness: ## Persist data to a persitent volume persistence: enabled: true - - ## A manually managed Persistent Volume and Claim - ## Requires persistence.enabled: true - ## If defined, PVC must be created manually before volume will be bound - # existingClaim: volumeReclaimPolicy: Retain - - ## database data Persistent Volume Storage Class - ## If defined, storageClassName: <storageClass> - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" + storageClass: "nfs-dev-sc" accessMode: ReadWriteMany size: 1Gi - mountPath: /dockerdata-nfs - mountSubPath: netbox/postgres/data + service: type: ClusterIP name: netbox-postgres |