1
0

volumes: make volumes abstract

This commit is contained in:
sido 2018-06-27 18:02:30 +02:00
parent 09c762c1b3
commit ccc3be8a9d
13 changed files with 34 additions and 25 deletions

View File

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View File

@ -20,17 +20,17 @@ spec:
creationTimestamp: null
spec:
volumes:
- name: molgenis-nexus-data
- name: {{ .Values.persistance.name }}
persistentVolumeClaim:
claimName: molgenis-nexus-data
claimName: {{ .Values.persistance.name }}
restartPolicy: {{ .Values.nexus.restartPolicy }}
initContainers:
- name: volume-mount-nexus
image: busybox
command: ["sh", "-c", "chown -R 200:200 /gcc/molgenis/nexus"]
command: ["sh", "-c", "chown -R 200:200 {{ .Values.persistance.mountPath }}"]
volumeMounts:
- name: molgenis-nexus-data
mountPath: "/gcc/molgenis/nexus"
- name: {{ .Values.persistance.name }}
mountPath: "{{ .Values.persistance.mountPath }}"
containers:
- name: {{ .Values.nexus.name }}
image: "{{ .Values.nexus.image.repository }}:{{ .Values.nexus.image.tag }}"
@ -39,6 +39,6 @@ spec:
- containerPort: {{ .Values.nexus.port.ui }}
- containerPort: {{ .Values.nexus.port.docker }}
volumeMounts:
- name: molgenis-nexus-data
- name: {{ .Values.persistance.name }}
mountPath: "/nexus-data"

View File

@ -0,0 +1,16 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: {{ .Values.persistance.volumeName }}
labels:
name: nfs2
spec:
storageClassName: nfs-class
capacity:
storage: {{ .Values.persistance.size }}
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: {{ .Values.persistance.reclaimPolicy }}
nfs:
server: {{ .Values.persistance.server }}
path: {{ .Values.persistance.mountPath }}

View File

@ -1,11 +1,11 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: molgenis-nexus-data
name: {{ .Values.persistance.name }}
spec:
storageClassName: nfs-class
accessModes:
- ReadWriteMany
- {{ .Values.persistance.accessMode }}
resources:
requests:
storage: 50Gi
storage: {{ .Values.persistance.size }}

View File

@ -53,6 +53,15 @@ ingress:
# hosts:
# - chart-example.local
persistence:
name: molgenis-nexus-data
size: 30G
reclaimPolicy: Retain
server: 192.168.64.12
accessMode: ReadWriteMany
mountPath: /gcc/molgenis/nexus
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little

View File

@ -1,16 +0,0 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: molgenis-nexus-data
labels:
name: nfs2
spec:
storageClassName: nfs-class
capacity:
storage: 50Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
nfs:
server: 192.168.64.12
path: /gcc/molgenis/nexus