summaryrefslogtreecommitdiffstats
path: root/kubernetes/contrib
diff options
context:
space:
mode:
authorMandeep Khinda <Mandeep.Khinda@amdocs.com>2018-08-29 22:06:13 +0000
committerGerrit Code Review <gerrit@onap.org>2018-08-29 22:06:13 +0000
commit46d5a428bd65625d130e2474c3c9c1b910abaf12 (patch)
treeb7d9b87326c8448ddd5a1e1518aa04ebb5bd3ebd /kubernetes/contrib
parent71bd84c0aa9d1c87a7e6a66ed9d9a40f4de72461 (diff)
parent8f0d2e828eeb0a35e3b45d92fa0c9c726a0f70c5 (diff)
Merge "Example of NFS storage class for netbox chart"
Diffstat (limited to 'kubernetes/contrib')
-rwxr-xr-xkubernetes/contrib/charts/netbox/charts/netbox-app/templates/pv.yaml2
-rwxr-xr-xkubernetes/contrib/charts/netbox/charts/netbox-app/templates/pvc.yaml4
-rwxr-xr-xkubernetes/contrib/charts/netbox/charts/netbox-app/values.yaml17
-rwxr-xr-xkubernetes/contrib/charts/netbox/charts/netbox-postgres/templates/pv.yaml2
-rwxr-xr-xkubernetes/contrib/charts/netbox/charts/netbox-postgres/templates/pvc.yaml4
-rwxr-xr-xkubernetes/contrib/charts/netbox/charts/netbox-postgres/values.yaml18
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