Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added possibility for additional storage mounts (again) #107

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions chart-source/fmeflow/templates/additional-pv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{ if .Values.additionalStorage.useHostDir }}
apiVersion: v1
kind: PersistentVolume
metadata:
name: {{ .Values.additionalStorage.name | default "geodata"}}
spec:
{{- with .Values.additionalStorage }}
capacity:
storage: {{ .fmeflow.size }}
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: {{ .reclaimPolicy }}
hostPath:
path: {{ .fmeflow.path | default "/tmp/k8s/geodata" }}
type: DirectoryOrCreate
{{- end }}
{{- end}}
20 changes: 20 additions & 0 deletions chart-source/fmeflow/templates/additional-pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{ if .Values.additionalStorage }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
safe.k8s.fmeflow.component: data
{{- include "fmeflow.common.labels" . | indent 4 }}
name: {{ .Values.additionalStorage.name | default "geodata"}}
spec:
{{- with .Values.additionalStorage }}
accessModes:
- {{ .fmeflow.accessMode }}
{{- if and (not .useHostDir) .fmeflow.class }}
storageClassName: {{ .fmeflow.class }}
{{- end }}
resources:
requests:
storage: {{ .fmeflow.size }}
{{- end }}
{{- end }}
13 changes: 13 additions & 0 deletions chart-source/fmeflow/templates/core-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ spec:
volumeMounts:
- mountPath: /data/fmeflowdata
name: fmeflowdata
{{- if .Values.additionalStorage }}
- mountPath: {{ .Values.additionalStorage.mountPath | default "/opt/geodata" }}
name: {{ .Values.additionalStorage.name | default "geodata" }}
{{- end }}
env:
- name: PRIMARY_PROCESS
value: core
Expand Down Expand Up @@ -144,6 +148,10 @@ spec:
volumeMounts:
- mountPath: /data/fmeflowdata
name: fmeflowdata
{{- if .Values.additionalStorage }}
- mountPath: {{ .Values.additionalStorage.mountPath | default "/opt/geodata" }}
name: {{ .Values.additionalStorage.name | default "geodata" }}
{{- end }}
env:
- name: COREHOSTNAME
value: localhost
Expand Down Expand Up @@ -303,6 +311,11 @@ spec:
- name: fmeflowdata
persistentVolumeClaim:
claimName: {{ template "fmeflow.storage.data.claimName" . }}
{{- if $.Values.additionalStorage }}
- name: {{ $.Values.additionalStorage.name | default "geodata" }}
persistentVolumeClaim:
claimName: {{ $.Values.additionalStorage.name | default "geodata" }}
{{- end }}
{{- if .Values.scheduling.core.nodeSelector }}
nodeSelector:
{{ toYaml .Values.scheduling.core.nodeSelector | indent 8 }}
Expand Down
9 changes: 9 additions & 0 deletions chart-source/fmeflow/templates/engine-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ spec:
volumeMounts:
- mountPath: /data/fmeflowdata
name: fmeflowdata
{{- if $.Values.additionalStorage }}
- mountPath: {{ $.Values.additionalStorage.mountPath | default "/opt/geodata" }}
name: {{ $.Values.additionalStorage.name | default "geodata" }}
{{- end }}
env:
- name: EXTERNALHOSTNAME
value: {{ $.Values.deployment.hostname }}
Expand Down Expand Up @@ -172,6 +176,11 @@ spec:
- name: fmeflowdata
persistentVolumeClaim:
claimName: {{ template "fmeflow.storage.data.claimName" $ }}
{{- if $.Values.additionalStorage }}
- name: {{ $.Values.additionalStorage.name | default "geodata" }}
persistentVolumeClaim:
claimName: {{ $.Values.additionalStorage.name | default "geodata" }}
{{- end }}
affinity:
{{- include "fmeflow.deployment.dataVolumeAffinity" $ | indent 8 }}
{{- if .affinity }}
Expand Down
11 changes: 11 additions & 0 deletions chart-source/fmeflow/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,17 @@ storage:
class:
path:

additionalStorage:
useHostDir: false
reclaimPolicy: Delete
mountPath: /opt/geodata
name: geodata
fmeflow:
accessMode: ReadWriteOnce
size: 10Gi
class:
path:

# It is recommended not to modify those parameters
# For more options regarding PostgreSQL deployement, check the helm chart documentation:
# https://github.com/bitnami/charts/tree/master/bitnami/postgresql
Expand Down