Skip to content

Commit

Permalink
add support for other options with PVC (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
edevosc2c authored May 7, 2024
1 parent b626fd8 commit 0b558d3
Show file tree
Hide file tree
Showing 10 changed files with 131 additions and 24 deletions.
16 changes: 14 additions & 2 deletions templates/geonetwork/elasticsearch/es-data-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,21 @@ metadata:
helm.sh/resource-policy: "keep"
spec:
accessModes:
- ReadWriteOnce
{{- if $webapp_storage.storage_class_name }}
{{- if $webapp_storage.accessModes }}
{{- range $webapp_storage.accessModes }}
- {{ . | quote }}
{{- end }}
{{- else }}
{{- range .Values.georchestra.storage.accessModes }}
- {{ . | quote }}
{{- end }}
{{- end }}
{{- if (eq "-" $webapp_storage.storage_class_name) }}
storageClassName: ""
{{- else if $webapp_storage.storage_class_name }}
storageClassName: {{ $webapp_storage.storage_class_name }}
{{- else if (eq "-" .Values.georchestra.storage.storage_class_name) }}
storageClassName: ""
{{- else if .Values.georchestra.storage.storage_class_name }}
storageClassName: {{ .Values.georchestra.storage.storage_class_name }}
{{- end }}
Expand Down
16 changes: 14 additions & 2 deletions templates/geonetwork/geonetwork-datadir-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,21 @@ metadata:
helm.sh/resource-policy: "keep"
spec:
accessModes:
- ReadWriteOnce
{{- if $webapp_storage.storage_class_name }}
{{- if $webapp_storage.accessModes }}
{{- range $webapp_storage.accessModes }}
- {{ . | quote }}
{{- end }}
{{- else }}
{{- range .Values.georchestra.storage.accessModes }}
- {{ . | quote }}
{{- end }}
{{- end }}
{{- if (eq "-" $webapp_storage.storage_class_name) }}
storageClassName: ""
{{- else if $webapp_storage.storage_class_name }}
storageClassName: {{ $webapp_storage.storage_class_name }}
{{- else if (eq "-" .Values.georchestra.storage.storage_class_name) }}
storageClassName: ""
{{- else if .Values.georchestra.storage.storage_class_name }}
storageClassName: {{ .Values.georchestra.storage.storage_class_name }}
{{- end }}
Expand Down
16 changes: 14 additions & 2 deletions templates/geoserver/geoserver-datadir-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,21 @@ metadata:
helm.sh/resource-policy: "keep"
spec:
accessModes:
- ReadWriteOnce
{{- if $webapp_storage.storage_class_name }}
{{- if $webapp_storage.accessModes }}
{{- range $webapp_storage.accessModes }}
- {{ . | quote }}
{{- end }}
{{- else }}
{{- range .Values.georchestra.storage.accessModes }}
- {{ . | quote }}
{{- end }}
{{- end }}
{{- if (eq "-" $webapp_storage.storage_class_name) }}
storageClassName: ""
{{- else if $webapp_storage.storage_class_name }}
storageClassName: {{ $webapp_storage.storage_class_name }}
{{- else if (eq "-" .Values.georchestra.storage.storage_class_name) }}
storageClassName: ""
{{- else if .Values.georchestra.storage.storage_class_name }}
storageClassName: {{ .Values.georchestra.storage.storage_class_name }}
{{- end }}
Expand Down
16 changes: 14 additions & 2 deletions templates/geoserver/geoserver-geodata-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,21 @@ metadata:
helm.sh/resource-policy: "keep"
spec:
accessModes:
- ReadWriteOnce
{{- if $webapp_storage.storage_class_name }}
{{- if $webapp_storage.accessModes }}
{{- range $webapp_storage.accessModes }}
- {{ . | quote }}
{{- end }}
{{- else }}
{{- range .Values.georchestra.storage.accessModes }}
- {{ . | quote }}
{{- end }}
{{- end }}
{{- if (eq "-" $webapp_storage.storage_class_name) }}
storageClassName: ""
{{- else if $webapp_storage.storage_class_name }}
storageClassName: {{ $webapp_storage.storage_class_name }}
{{- else if (eq "-" .Values.georchestra.storage.storage_class_name) }}
storageClassName: ""
{{- else if .Values.georchestra.storage.storage_class_name }}
storageClassName: {{ .Values.georchestra.storage.storage_class_name }}
{{- end }}
Expand Down
16 changes: 14 additions & 2 deletions templates/geoserver/geoserver-tiles-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,21 @@ metadata:
helm.sh/resource-policy: "keep"
spec:
accessModes:
- ReadWriteOnce
{{- if $webapp_storage.storage_class_name }}
{{- if $webapp_storage.accessModes }}
{{- range $webapp_storage.accessModes }}
- {{ . | quote }}
{{- end }}
{{- else }}
{{- range .Values.georchestra.storage.accessModes }}
- {{ . | quote }}
{{- end }}
{{- end }}
{{- if (eq "-" $webapp_storage.storage_class_name) }}
storageClassName: ""
{{- else if $webapp_storage.storage_class_name }}
storageClassName: {{ $webapp_storage.storage_class_name }}
{{- else if (eq "-" .Values.georchestra.storage.storage_class_name) }}
storageClassName: ""
{{- else if .Values.georchestra.storage.storage_class_name }}
storageClassName: {{ .Values.georchestra.storage.storage_class_name }}
{{- end }}
Expand Down
16 changes: 14 additions & 2 deletions templates/ldap/openldap-pvc-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,21 @@ metadata:
helm.sh/resource-policy: "keep"
spec:
accessModes:
- ReadWriteOnce
{{- if $webapp_storage.storage_class_name }}
{{- if $webapp_storage.accessModes }}
{{- range $webapp_storage.accessModes }}
- {{ . | quote }}
{{- end }}
{{- else }}
{{- range .Values.georchestra.storage.accessModes }}
- {{ . | quote }}
{{- end }}
{{- end }}
{{- if (eq "-" $webapp_storage.storage_class_name) }}
storageClassName: ""
{{- else if $webapp_storage.storage_class_name }}
storageClassName: {{ $webapp_storage.storage_class_name }}
{{- else if (eq "-" .Values.georchestra.storage.storage_class_name) }}
storageClassName: ""
{{- else if .Values.georchestra.storage.storage_class_name }}
storageClassName: {{ .Values.georchestra.storage.storage_class_name }}
{{- end }}
Expand Down
16 changes: 14 additions & 2 deletions templates/ldap/openldap-pvc-data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,21 @@ metadata:
helm.sh/resource-policy: "keep"
spec:
accessModes:
- ReadWriteOnce
{{- if $webapp_storage.storage_class_name }}
{{- if $webapp_storage.accessModes }}
{{- range $webapp_storage.accessModes }}
- {{ . | quote }}
{{- end }}
{{- else }}
{{- range .Values.georchestra.storage.accessModes }}
- {{ . | quote }}
{{- end }}
{{- end }}
{{- if (eq "-" $webapp_storage.storage_class_name) }}
storageClassName: ""
{{- else if $webapp_storage.storage_class_name }}
storageClassName: {{ $webapp_storage.storage_class_name }}
{{- else if (eq "-" .Values.georchestra.storage.storage_class_name) }}
storageClassName: ""
{{- else if .Values.georchestra.storage.storage_class_name }}
storageClassName: {{ .Values.georchestra.storage.storage_class_name }}
{{- end }}
Expand Down
16 changes: 14 additions & 2 deletions templates/mapstore/mapstore-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,21 @@ metadata:
helm.sh/resource-policy: "keep"
spec:
accessModes:
- ReadWriteOnce
{{- if $webapp_storage.storage_class_name }}
{{- if $webapp_storage.accessModes }}
{{- range $webapp_storage.accessModes }}
- {{ . | quote }}
{{- end }}
{{- else }}
{{- range .Values.georchestra.storage.accessModes }}
- {{ . | quote }}
{{- end }}
{{- end }}
{{- if (eq "-" $webapp_storage.storage_class_name) }}
storageClassName: ""
{{- else if $webapp_storage.storage_class_name }}
storageClassName: {{ $webapp_storage.storage_class_name }}
{{- else if (eq "-" .Values.georchestra.storage.storage_class_name) }}
storageClassName: ""
{{- else if .Values.georchestra.storage.storage_class_name }}
storageClassName: {{ .Values.georchestra.storage.storage_class_name }}
{{- end }}
Expand Down
19 changes: 13 additions & 6 deletions templates/rabbitmq/rabbitmq-pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- $rabbitmq := .Values.rabbitmq -}}
{{- $rabbitmq_storage := .Values.georchestra.storage.mapstore_datadir -}}
{{- if and $rabbitmq.enabled $rabbitmq.storage -}}
apiVersion: v1
kind: PersistentVolumeClaim
Expand All @@ -9,14 +10,20 @@ metadata:
app.kubernetes.io/component: {{ include "georchestra.fullname" . }}-rabbitmq
spec:
accessModes:
- ReadWriteOnce
{{- if $rabbitmq.storage.storage_class_name }}
storageClassName: {{ $rabbitmq.storage.storage_class_name }}
{{- if $rabbitmq_storage.accessModes }}
{{- range $rabbitmq_storage.accessModes }}
- {{ . | quote }}
{{- end }}
{{- if $rabbitmq.storage.pv_name }}
volumeName: {{ $rabbitmq.storage.pv_name }}
{{- end }}
{{- if (eq "-" $rabbitmq_storage.storage_class_name) }}
storageClassName: ""
{{- else if $rabbitmq_storage.storage_class_name }}
storageClassName: {{ $rabbitmq_storage.storage_class_name }}
{{- end }}
{{- if $rabbitmq_storage.pv_name }}
volumeName: {{ $rabbitmq_storage.pv_name }}
{{- end }}
resources:
requests:
storage: {{ $rabbitmq.storage.size }}
storage: {{ $rabbitmq_storage.size }}
{{- end }}
8 changes: 6 additions & 2 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ georchestra:
geoserver_geodata:
# pv_name: geoserver_geodata
# works for other storage items
# storage_class_name: default
# storage_class_name: default or "-" for empty storageClassName
# accessModes:
# - ReadWriteOnce
size: 2Gi
mapstore_datadir:
# pv_name: mapstore_datadir
Expand All @@ -202,7 +204,9 @@ georchestra:
size: 2Gi
# We also might need to specify a custom storageClass
# Leave it commented if not needed
# storage_class_name: default
# storage_class_name: default or "-" for empty storageClassName
accessModes:
- ReadWriteOnce
smtp_smarthost:
enabled: true
# mailname: georchestra-127-0-1-1.traefik.me
Expand Down

0 comments on commit 0b558d3

Please sign in to comment.