diff --git a/flux/clusters/k8s-01/basemap/dev/kustomization.yaml b/flux/clusters/k8s-01/basemap/dev/kustomization.yaml index 377f2c5d8..336085e5e 100644 --- a/flux/clusters/k8s-01/basemap/dev/kustomization.yaml +++ b/flux/clusters/k8s-01/basemap/dev/kustomization.yaml @@ -16,4 +16,20 @@ patches: value: - ./helm/basemap/values.yaml - ./helm/basemap/values/values-dev.yaml ---- \ No newline at end of file + - target: + kind: CronJob + name: 'dev-basemap' + group: batch + version: v1 + patch: |- + - op: add + path: /spec/jobTemplate/spec/template/spec/affinity/nodeAffinity + value: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - hwn02.k8s-01.kontur.io +--- diff --git a/flux/clusters/k8s-01/basemap/prod/kustomization.yaml b/flux/clusters/k8s-01/basemap/prod/kustomization.yaml index 8e8e7918b..5c477ed27 100644 --- a/flux/clusters/k8s-01/basemap/prod/kustomization.yaml +++ b/flux/clusters/k8s-01/basemap/prod/kustomization.yaml @@ -16,4 +16,36 @@ patches: value: - ./helm/basemap/values.yaml - ./helm/basemap/values/values-prod.yaml ---- \ No newline at end of file + - target: + kind: Deployment + name: 'prod-basemap-tileserver' + group: apps + version: v1 + patch: |- + - op: add + path: /spec/template/spec/affinity/nodeAffinity + value: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: NotIn + values: + - hwn01.k8s-01.kontur.io + - target: + kind: CronJob + name: 'prod-basemap' + group: batch + version: v1 + patch: |- + - op: add + path: /spec/jobTemplate/spec/template/spec/affinity/nodeAffinity + value: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - hwn02.k8s-01.kontur.io +--- diff --git a/flux/clusters/k8s-01/basemap/test/kustomization.yaml b/flux/clusters/k8s-01/basemap/test/kustomization.yaml index 71c9ab096..1c97f3dfb 100644 --- a/flux/clusters/k8s-01/basemap/test/kustomization.yaml +++ b/flux/clusters/k8s-01/basemap/test/kustomization.yaml @@ -16,4 +16,36 @@ patches: value: - ./helm/basemap/values.yaml - ./helm/basemap/values/values-test.yaml ---- \ No newline at end of file + - target: # temporary stick to hwn02 + kind: CronJob + name: 'test-basemap' + group: batch + version: v1 + patch: |- + - op: add + path: /spec/jobTemplate/spec/template/spec/affinity/nodeAffinity + value: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - hwn02.k8s-01.kontur.io + - target: # temporary move out from hwn01 + kind: Deployment + name: 'test-basemap-tileserver' + group: apps + version: v1 + patch: |- + - op: add + path: /spec/template/spec/affinity/nodeAffinity + value: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: NotIn + values: + - hwn01.k8s-01.kontur.io +--- diff --git a/flux/clusters/k8s-01/event-api-db/overlays/DEV/kustomization.yaml b/flux/clusters/k8s-01/event-api-db/overlays/DEV/kustomization.yaml index a6fe18d4c..a4636b385 100644 --- a/flux/clusters/k8s-01/event-api-db/overlays/DEV/kustomization.yaml +++ b/flux/clusters/k8s-01/event-api-db/overlays/DEV/kustomization.yaml @@ -21,18 +21,12 @@ patchesJson6902: kind: PostgresCluster name: db-event-api path: postgrescluster-custom-image.yaml -# - target: -# group: postgres-operator.crunchydata.com -# version: v1beta1 -# kind: PostgresCluster -# name: db-event-api -# path: postgrescluster-resource-adjustment.yaml - - target: + - target: # new config for instances management group: postgres-operator.crunchydata.com version: v1beta1 kind: PostgresCluster name: db-event-api - path: postgrescluster-assigning.yaml + path: postgrescluster-instances.yaml generatorOptions: disableNameSuffixHash: true diff --git a/flux/clusters/k8s-01/event-api-db/overlays/DEV/postgrescluster-assigning.yaml b/flux/clusters/k8s-01/event-api-db/overlays/DEV/postgrescluster-assigning.yaml deleted file mode 100644 index 6c797c553..000000000 --- a/flux/clusters/k8s-01/event-api-db/overlays/DEV/postgrescluster-assigning.yaml +++ /dev/null @@ -1,10 +0,0 @@ -- op: add - path: /spec/instances/0/affinity/nodeAffinity - value: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/hostname - operator: In - values: - - hwn03.k8s-01.kontur.io diff --git a/flux/clusters/k8s-01/event-api-db/overlays/DEV/postgrescluster-instances.yaml b/flux/clusters/k8s-01/event-api-db/overlays/DEV/postgrescluster-instances.yaml new file mode 100644 index 000000000..c73eb6369 --- /dev/null +++ b/flux/clusters/k8s-01/event-api-db/overlays/DEV/postgrescluster-instances.yaml @@ -0,0 +1,71 @@ +# Always replace placeholder instances from `base` +- op: replace + path: /spec/instances + value: + - name: hwn04 + replicas: 1 + resources: &resources + limits: + memory: 512Gi # # let Postres use the page cache + cpu: '64' # set as event-api pool size + autovacuum workers + a bit for parallel workers + # empyrical recommendations below + # memory: 100Gi + # cpu: '5' + requests: + memory: 22Gi # roughly shared_buffers + pool size * work_mem + cpu: '2' # if we don't have CPU we can run on potato + # empyrical recommendations below + # memory: 7Gi + # cpu: '1' + dataVolumeClaimSpec: &storage + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Gi + # empyrical recommendations below -- actual storage varies from 2300Gi to 6200Gi + # storage: 2500Gi + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - hwn04.k8s-01.kontur.io + - name: hwn03 + replicas: 1 + resources: + <<: *resources + dataVolumeClaimSpec: + <<: *storage + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - hwn03.k8s-01.kontur.io + +# Switchover section +# https://access.crunchydata.com/documentation/postgres-operator/latest/tutorials/cluster-management/administrative-tasks#changing-the-primary +# https://access.crunchydata.com/documentation/postgres-operator/latest/tutorials/cluster-management/administrative-tasks#targeting-an-instance +# 1. Requires fully-qualified instance id of new master +# 2. New master must be in sink with current master (check via `patronictl list`) +# 3. Its recommended to retain switchover section, to keep track of last desired master both in code and k8s +- op: add + path: /spec/patroni/switchover + value: + enabled: true + targetInstance: db-event-api-hwn04-OVERRIDEME + #type: Failover +# trigger-switchover annotation triggers actual switchover whenever its updated +# value is arbitrary, but it's recommended to reference the date of switchover +# special syntax is used to escape slash with sequence ~1 +# See https://windsock.io/json-pointer-syntax-in-json-patches-with-kustomize/ +- op: add + path: /metadata/annotations/postgres-operator.crunchydata.com~1trigger-switchover + value: OVERRIDEME diff --git a/flux/clusters/k8s-01/event-api-db/overlays/DEV/postgrescluster-resource-adjustment.yaml b/flux/clusters/k8s-01/event-api-db/overlays/DEV/postgrescluster-resource-adjustment.yaml deleted file mode 100644 index e69de29bb..000000000 diff --git a/flux/clusters/k8s-01/event-api-db/overlays/PROD/kustomization.yaml b/flux/clusters/k8s-01/event-api-db/overlays/PROD/kustomization.yaml index 25ed121a1..312919611 100644 --- a/flux/clusters/k8s-01/event-api-db/overlays/PROD/kustomization.yaml +++ b/flux/clusters/k8s-01/event-api-db/overlays/PROD/kustomization.yaml @@ -9,12 +9,12 @@ patchesJson6902: kind: PostgresCluster name: db-event-api path: postgrescluster-s3-backups.yaml - - target: + - target: # new config for instances management group: postgres-operator.crunchydata.com version: v1beta1 kind: PostgresCluster name: db-event-api - path: postgrescluster-resource-adjustment.yaml + path: postgrescluster-instances.yaml - target: group: postgres-operator.crunchydata.com version: v1beta1 diff --git a/flux/clusters/k8s-01/event-api-db/overlays/PROD/postgrescluster-instances.yaml b/flux/clusters/k8s-01/event-api-db/overlays/PROD/postgrescluster-instances.yaml new file mode 100644 index 000000000..c73eb6369 --- /dev/null +++ b/flux/clusters/k8s-01/event-api-db/overlays/PROD/postgrescluster-instances.yaml @@ -0,0 +1,71 @@ +# Always replace placeholder instances from `base` +- op: replace + path: /spec/instances + value: + - name: hwn04 + replicas: 1 + resources: &resources + limits: + memory: 512Gi # # let Postres use the page cache + cpu: '64' # set as event-api pool size + autovacuum workers + a bit for parallel workers + # empyrical recommendations below + # memory: 100Gi + # cpu: '5' + requests: + memory: 22Gi # roughly shared_buffers + pool size * work_mem + cpu: '2' # if we don't have CPU we can run on potato + # empyrical recommendations below + # memory: 7Gi + # cpu: '1' + dataVolumeClaimSpec: &storage + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Gi + # empyrical recommendations below -- actual storage varies from 2300Gi to 6200Gi + # storage: 2500Gi + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - hwn04.k8s-01.kontur.io + - name: hwn03 + replicas: 1 + resources: + <<: *resources + dataVolumeClaimSpec: + <<: *storage + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - hwn03.k8s-01.kontur.io + +# Switchover section +# https://access.crunchydata.com/documentation/postgres-operator/latest/tutorials/cluster-management/administrative-tasks#changing-the-primary +# https://access.crunchydata.com/documentation/postgres-operator/latest/tutorials/cluster-management/administrative-tasks#targeting-an-instance +# 1. Requires fully-qualified instance id of new master +# 2. New master must be in sink with current master (check via `patronictl list`) +# 3. Its recommended to retain switchover section, to keep track of last desired master both in code and k8s +- op: add + path: /spec/patroni/switchover + value: + enabled: true + targetInstance: db-event-api-hwn04-OVERRIDEME + #type: Failover +# trigger-switchover annotation triggers actual switchover whenever its updated +# value is arbitrary, but it's recommended to reference the date of switchover +# special syntax is used to escape slash with sequence ~1 +# See https://windsock.io/json-pointer-syntax-in-json-patches-with-kustomize/ +- op: add + path: /metadata/annotations/postgres-operator.crunchydata.com~1trigger-switchover + value: OVERRIDEME diff --git a/flux/clusters/k8s-01/event-api-db/overlays/PROD/postgrescluster-resource-adjustment.yaml b/flux/clusters/k8s-01/event-api-db/overlays/PROD/postgrescluster-resource-adjustment.yaml deleted file mode 100644 index b6c5932f4..000000000 --- a/flux/clusters/k8s-01/event-api-db/overlays/PROD/postgrescluster-resource-adjustment.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- op: replace - path: /spec/instances/0/replicas - value: 2 diff --git a/flux/clusters/k8s-01/raster-tiler/dev/kustomization.yaml b/flux/clusters/k8s-01/raster-tiler/dev/kustomization.yaml index 54be53429..162b165fa 100644 --- a/flux/clusters/k8s-01/raster-tiler/dev/kustomization.yaml +++ b/flux/clusters/k8s-01/raster-tiler/dev/kustomization.yaml @@ -16,4 +16,20 @@ patches: value: - ./helm/raster-tiler/values.yaml - ./helm/raster-tiler/values/values-dev.yaml + - target: + kind: Deployment + name: 'dev-raster-tiler' + group: apps + version: v1 + patch: |- + - op: add + path: /spec/template/spec/affinity/nodeAffinity + value: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: NotIn + values: + - hwn01.k8s-01.kontur.io --- diff --git a/flux/clusters/k8s-01/raster-tiler/geocint/kustomization.yaml b/flux/clusters/k8s-01/raster-tiler/geocint/kustomization.yaml index aeede1870..a098e44cd 100644 --- a/flux/clusters/k8s-01/raster-tiler/geocint/kustomization.yaml +++ b/flux/clusters/k8s-01/raster-tiler/geocint/kustomization.yaml @@ -16,4 +16,20 @@ patches: value: - ./helm/raster-tiler/values.yaml - ./helm/raster-tiler/values/values-geocint.yaml + - target: + kind: Deployment + name: 'geocint-raster-tiler' + group: apps + version: v1 + patch: |- + - op: add + path: /spec/template/spec/affinity/nodeAffinity + value: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: NotIn + values: + - hwn01.k8s-01.kontur.io --- diff --git a/helm/basemap/Chart.yaml b/helm/basemap/Chart.yaml index bdc11605a..ee6d3de6a 100644 --- a/helm/basemap/Chart.yaml +++ b/helm/basemap/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.0.37 +version: 0.0.45 #Don't use appVersion, use {{ .Values.images...tag's. }} instead. That's required for Flux automation - so that different # stages can have different versions within the same branch watched by Flux. diff --git a/helm/basemap/templates/cronjobs.yaml b/helm/basemap/templates/cronjobs.yaml index 4e4bf6d1f..261b14f96 100644 --- a/helm/basemap/templates/cronjobs.yaml +++ b/helm/basemap/templates/cronjobs.yaml @@ -16,8 +16,12 @@ spec: concurrencyPolicy: "Forbid" jobTemplate: spec: + {{- if .Values.basemap.suspend }} + suspend: true + {{- end }} template: spec: + {{- if eq .Values.basemap.storageType "pvc" }} initContainers: - name: check-pvc-usage image: nexus.kontur.io:8085/konturdev/check-pod-pvc:1.12 @@ -44,6 +48,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.name + {{- end }} shareProcessNamespace: true # required to shut down postgres when pipeline is done restartPolicy: Never {{ if .Values.images.usePullSecret }} @@ -55,7 +60,7 @@ spec: image: {{ .Values.basemap.renderer.image }}:{{ .Values.basemap.renderer.tag }} imagePullPolicy: Always volumeMounts: - - name: {{ .Values.envName }}-basemap-processor-pvc + - name: {{ .Values.envName }}-basemap-processor-{{ .Values.basemap.storageType }} mountPath: /persisted-volume env: - name: ENV_NAME @@ -115,7 +120,7 @@ spec: - name: PGDATA value: /var/lib/postgresql/data/pgdata volumeMounts: - - name: {{ .Values.envName }}-basemap-postgres-pvc + - name: {{ .Values.envName }}-basemap-postgres-{{ .Values.basemap.storageType }} mountPath: /var/lib/postgresql/data resources: limits: @@ -125,12 +130,22 @@ spec: memory: {{ .Values.resources.db.requests.memory | quote }} cpu: {{ .Values.resources.db.requests.cpu | quote }} volumes: - - name: {{ .Values.envName }}-basemap-processor-pvc + - name: {{ .Values.envName }}-basemap-processor-{{ .Values.basemap.storageType }} + {{- if eq .Values.basemap.storageType "pvc" }} persistentVolumeClaim: - claimName: {{ .Values.envName }}-basemap-processor-pvc - - name: {{ .Values.envName }}-basemap-postgres-pvc + claimName: {{ .Values.envName }}-basemap-processor-{{ .Values.basemap.storageType }} + {{- else }} + emptyDir: + sizeLimit: {{ .Values.pvc.processorStorageSize }} + {{- end }} + - name: {{ .Values.envName }}-basemap-postgres-{{ .Values.basemap.storageType }} + {{- if eq .Values.basemap.storageType "pvc" }} persistentVolumeClaim: - claimName: {{ .Values.envName }}-basemap-postgres-pvc + claimName: {{ .Values.envName }}-basemap-postgres-{{ .Values.basemap.storageType }} + {{- else }} + emptyDir: + sizeLimit: {{ .Values.pvc.postgresStorageSize }} + {{- end }} - name: kubeconfig-volume secret: secretName: {{ .Values.envName }}-basemap-kubeconfig diff --git a/helm/basemap/templates/deployment.yaml b/helm/basemap/templates/deployment.yaml index 10a7d254d..36c14acf4 100644 --- a/helm/basemap/templates/deployment.yaml +++ b/helm/basemap/templates/deployment.yaml @@ -43,9 +43,14 @@ spec: - name: {{ .Values.images.pullSecretName }} {{ end }} volumes: - - name: {{ .Values.envName }}-basemap-tileserver-pvc + - name: {{ .Values.envName }}-basemap-tileserver-{{ .Values.tileserver.storageType }} + {{- if eq .Values.tileserver.storageType "pvc" }} persistentVolumeClaim: - claimName: {{ .Values.envName }}-basemap-tileserver-pvc + claimName: {{ .Values.envName }}-basemap-tileserver-{{ .Values.tileserver.storageType }} + {{- else }} + emptyDir: + sizeLimit: {{ .Values.pvc.tileStorageSize }} + {{- end }} initContainers: - command: - aws @@ -63,7 +68,7 @@ spec: name: download-basemap-from-s3 volumeMounts: - mountPath: /data - name: {{ .Values.envName }}-basemap-tileserver-pvc + name: {{ .Values.envName }}-basemap-tileserver-{{ .Values.tileserver.storageType }} containers: - name: tileserver-gl args: @@ -105,7 +110,7 @@ spec: protocol: TCP volumeMounts: - mountPath: /data - name: {{ .Values.envName }}-basemap-tileserver-pvc + name: {{ .Values.envName }}-basemap-tileserver-{{ .Values.tileserver.storageType }} resources: requests: cpu: {{ .Values.resources.tileserver.requests.cpu | quote }} diff --git a/helm/basemap/templates/pvc.yaml b/helm/basemap/templates/pvc.yaml index bbfc0b7c7..79202f767 100644 --- a/helm/basemap/templates/pvc.yaml +++ b/helm/basemap/templates/pvc.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.tileserver.storageType "pvc" }} apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -11,7 +12,9 @@ spec: storage: {{ .Values.pvc.tileStorageSize }} limits: storage: {{ .Values.pvc.tileStorageSize }} +{{- end }} --- +{{- if eq .Values.basemap.storageType "pvc" }} apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -40,4 +43,4 @@ spec: limits: storage: {{ .Values.pvc.postgresStorageSize }} --- - +{{- end }} diff --git a/helm/basemap/values.yaml b/helm/basemap/values.yaml index 56027bda9..f550c998f 100644 --- a/helm/basemap/values.yaml +++ b/helm/basemap/values.yaml @@ -23,8 +23,11 @@ tileserver: image: 'nexus.kontur.io:8084/maptiler/tileserver-gl' tag: 'v4.4.0' port: 8080 + storageType: pvc basemap: + suspend: false + storageType: pvc processingSchedule: "0 0 */2 * *" # Run once in 2 days at midnight renderer: image: "nexus.kontur.io:8084/konturdev/build-basemap" diff --git a/helm/basemap/values/values-dev.yaml b/helm/basemap/values/values-dev.yaml index 4581fdb80..f05405076 100644 --- a/helm/basemap/values/values-dev.yaml +++ b/helm/basemap/values/values-dev.yaml @@ -10,6 +10,7 @@ tileserver: replicas: 1 image: 'nexus.kontur.io:8084/maptiler/tileserver-gl' tag: 'v4.4.0' + storageType: emptydir basemap: processingSchedule: "0 0 */2 * *" # Run once in 2 days at midnight @@ -22,3 +23,4 @@ basemap: db: image: "nexus.kontur.io:8084/postgis/postgis" tag: "15-3.3" + storageType: emptydir diff --git a/helm/basemap/values/values-prod.yaml b/helm/basemap/values/values-prod.yaml index 5f2cb136f..c85c47000 100644 --- a/helm/basemap/values/values-prod.yaml +++ b/helm/basemap/values/values-prod.yaml @@ -10,6 +10,7 @@ tileserver: replicas: 1 image: 'nexus.kontur.io:8084/maptiler/tileserver-gl' tag: 'v4.4.0' + storageType: emptydir basemap: processingSchedule: "0 0 */2 * *" # Run once in 2 days at midnight @@ -22,3 +23,4 @@ basemap: db: image: "nexus.kontur.io:8084/postgis/postgis" tag: "15-3.3" + storageType: emptydir diff --git a/helm/basemap/values/values-test.yaml b/helm/basemap/values/values-test.yaml index 9660fd65c..94a19f09c 100644 --- a/helm/basemap/values/values-test.yaml +++ b/helm/basemap/values/values-test.yaml @@ -10,6 +10,7 @@ tileserver: replicas: 1 image: 'nexus.kontur.io:8084/maptiler/tileserver-gl' tag: 'v4.4.0' + storageType: emptydir basemap: processingSchedule: "0 0 */2 * *" # Run once in 2 days at midnight @@ -22,3 +23,4 @@ basemap: db: image: "nexus.kontur.io:8084/postgis/postgis" tag: "15-3.3" + storageType: emptydir diff --git a/helm/raster-tiler/Chart.yaml b/helm/raster-tiler/Chart.yaml index 4397ba9b9..106924395 100644 --- a/helm/raster-tiler/Chart.yaml +++ b/helm/raster-tiler/Chart.yaml @@ -7,5 +7,5 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.0.77 +version: 0.0.79 # don't use appVersion, use {{Values.image.tag}} instead diff --git a/helm/raster-tiler/templates/deployment.yaml b/helm/raster-tiler/templates/deployment.yaml index 69c651732..314737220 100644 --- a/helm/raster-tiler/templates/deployment.yaml +++ b/helm/raster-tiler/templates/deployment.yaml @@ -125,5 +125,10 @@ spec: terminationGracePeriodSeconds: 30 volumes: - name: raster-tiler-storage-vol + {{- if eq .Values.storageType "pvc" }} persistentVolumeClaim: claimName: {{ .Values.envName }}-raster-tiler + {{- else }} + emptyDir: + sizeLimit: {{ .Values.storage_size }} + {{- end }} diff --git a/helm/raster-tiler/templates/pvc.yaml b/helm/raster-tiler/templates/pvc.yaml index b2af25f61..becb898c9 100644 --- a/helm/raster-tiler/templates/pvc.yaml +++ b/helm/raster-tiler/templates/pvc.yaml @@ -1,3 +1,4 @@ +{{ if eq .Values.storageType "pvc" }} apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -21,3 +22,4 @@ spec: storage: {{ .Values.storage_size }} storageClassName: {{ .Values.storageClass }} volumeMode: Filesystem +{{ end }} diff --git a/helm/raster-tiler/values.yaml b/helm/raster-tiler/values.yaml index 39824250b..b332da0fd 100644 --- a/helm/raster-tiler/values.yaml +++ b/helm/raster-tiler/values.yaml @@ -17,6 +17,7 @@ pg_database: layers-db pg_host: milan.k8s-01.kontur.io storage_size: 5Gi storageClass: standard +storageType: pvc createResource: ingress: false diff --git a/helm/raster-tiler/values/values-dev.yaml b/helm/raster-tiler/values/values-dev.yaml index d4f821cf8..0a647b9cb 100644 --- a/helm/raster-tiler/values/values-dev.yaml +++ b/helm/raster-tiler/values/values-dev.yaml @@ -32,3 +32,5 @@ resources: memory: 4Gi limits: memory: 512Gi + +storageType: emptydir diff --git a/helm/raster-tiler/values/values-geocint.yaml b/helm/raster-tiler/values/values-geocint.yaml index 7f1a0cc71..46323a4cb 100644 --- a/helm/raster-tiler/values/values-geocint.yaml +++ b/helm/raster-tiler/values/values-geocint.yaml @@ -32,3 +32,5 @@ resources: memory: 4Gi limits: memory: 512Gi + +storageType: emptydir