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 creationTimestamp: null
spec: spec:
volumes: volumes:
- name: molgenis-nexus-data - name: {{ .Values.persistance.name }}
persistentVolumeClaim: persistentVolumeClaim:
claimName: molgenis-nexus-data claimName: {{ .Values.persistance.name }}
restartPolicy: {{ .Values.nexus.restartPolicy }} restartPolicy: {{ .Values.nexus.restartPolicy }}
initContainers: initContainers:
- name: volume-mount-nexus - name: volume-mount-nexus
image: busybox image: busybox
command: ["sh", "-c", "chown -R 200:200 /gcc/molgenis/nexus"] command: ["sh", "-c", "chown -R 200:200 {{ .Values.persistance.mountPath }}"]
volumeMounts: volumeMounts:
- name: molgenis-nexus-data - name: {{ .Values.persistance.name }}
mountPath: "/gcc/molgenis/nexus" mountPath: "{{ .Values.persistance.mountPath }}"
containers: containers:
- name: {{ .Values.nexus.name }} - name: {{ .Values.nexus.name }}
image: "{{ .Values.nexus.image.repository }}:{{ .Values.nexus.image.tag }}" image: "{{ .Values.nexus.image.repository }}:{{ .Values.nexus.image.tag }}"
@ -39,6 +39,6 @@ spec:
- containerPort: {{ .Values.nexus.port.ui }} - containerPort: {{ .Values.nexus.port.ui }}
- containerPort: {{ .Values.nexus.port.docker }} - containerPort: {{ .Values.nexus.port.docker }}
volumeMounts: volumeMounts:
- name: molgenis-nexus-data - name: {{ .Values.persistance.name }}
mountPath: "/nexus-data" 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 kind: PersistentVolumeClaim
apiVersion: v1 apiVersion: v1
metadata: metadata:
name: molgenis-nexus-data name: {{ .Values.persistance.name }}
spec: spec:
storageClassName: nfs-class storageClassName: nfs-class
accessModes: accessModes:
- ReadWriteMany - {{ .Values.persistance.accessMode }}
resources: resources:
requests: requests:
storage: 50Gi storage: {{ .Values.persistance.size }}

View File

@ -53,6 +53,15 @@ ingress:
# hosts: # hosts:
# - chart-example.local # - chart-example.local
persistence:
name: molgenis-nexus-data
size: 30G
reclaimPolicy: Retain
server: 192.168.64.12
accessMode: ReadWriteMany
mountPath: /gcc/molgenis/nexus
resources: {} resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious # 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 # 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