Skip to content

Commit ea5c937

Browse files
authored
fix: duplicate volumes (#183)
* fix: improve PVC handling logic in deployment template * chore: update version to 2.1.6 in Chart.yaml
1 parent 07310f3 commit ea5c937

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

helm/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ apiVersion: v2
22
name: gpkg-merger
33
description: A Helm chart for gpkg-merger service # refers to MergerService
44
type: application
5-
version: 2.1.5
6-
appVersion: 2.1.5
5+
version: 2.1.6
6+
appVersion: 2.1.6
77
dependencies:
88
- name: mclabels
99
version: 1.0.1

helm/templates/deployment.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
{{- $s3 := (include "common.s3.merged" .) | fromYaml }}
1111
{{- $fs := (include "common.fs.merged" .) | fromYaml }}
1212
{{- $storage := (include "common.storage.merged" .) | fromYaml }}
13+
14+
{{- /* PVC handling - check if both PVCs point to the same claim */ -}}
15+
{{- $samePvc := and $fs.ingestionSourcePvc.enabled $fs.internalPvc.enabled (eq $fs.internalPvc.name $fs.ingestionSourcePvc.name) }}
16+
{{- $internalVolumeName := ternary "ingestion-storage" "internal-storage" $samePvc }}
17+
1318
{{ $gpkgPath := clean (printf "/%s/%s" $fs.internalPvc.mountPath $fs.ingestionSourcePvc.gpkgSubPath) }}
1419
{{ $tilePath := clean (printf "/%s/%s" $fs.internalPvc.mountPath $fs.internalPvc.tilesSubPath) }}
1520
{{ $ingestionSourcePath := clean (printf "/%s/%s" $fs.ingestionSourcePvc.mountPath $fs.ingestionSourcePvc.subPath) }}
@@ -72,7 +77,7 @@ spec:
7277
persistentVolumeClaim:
7378
claimName: {{ $fs.ingestionSourcePvc.name }}
7479
{{- end }}
75-
{{- if $fs.internalPvc.enabled }}
80+
{{- if and $fs.internalPvc.enabled (not $samePvc) }}
7681
- name: internal-storage
7782
persistentVolumeClaim:
7883
claimName: {{ $fs.internalPvc.name }}
@@ -134,7 +139,7 @@ spec:
134139
mountPath: {{ $fs.ingestionSourcePvc.mountPath }}
135140
{{- end }}
136141
{{- if $fs.internalPvc.enabled }}
137-
- name: internal-storage
142+
- name: {{ $internalVolumeName }}
138143
mountPath: {{ $fs.internalPvc.mountPath }}
139144
{{- end }}
140145
{{- if .Values.global.ca.secretName }}

0 commit comments

Comments
 (0)