Skip to content

Commit 7f1552c

Browse files
committed
server: add option to set policy package PVC name via values; #238
1 parent 0bde3ac commit 7f1552c

File tree

5 files changed

+22
-4
lines changed

5 files changed

+22
-4
lines changed

charts/rucio-server/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: rucio-server
2-
version: 36.0.8
2+
version: 36.0.9
33
apiVersion: v1
44
description: A Helm chart to deploy servers for Rucio
55
keywords:

charts/rucio-server/templates/_helpers.tpl

+12
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,15 @@ Ensures the registry ends with a `/` if set.
6262
{{- trimSuffix "/" .Values.imageRegistry }}/
6363
{{- end -}}
6464
{{- end -}}
65+
66+
{{/*
67+
Generate policy package PVC Name
68+
Prepends the release name to the policy package PVC name if specified in values.
69+
*/}}
70+
{{- define "rucio.pvc.claimName" -}}
71+
{{- if and .Values.policyPackages.enabled .Values.policyPackages.pvc.prependReleaseName -}}
72+
{{ .Release.Name }}-{{ .Values.policyPackages.pvc.name }}
73+
{{- else -}}
74+
{{ .Values.policyPackages.pvc.name }}
75+
{{- end -}}
76+
{{- end -}}

charts/rucio-server/templates/deployment.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ spec:
6969
{{- if .Values.policyPackages.enabled }}
7070
- name: policy-package-volume
7171
persistentVolumeClaim:
72-
claimName: policy-package-volume
72+
claimName: {{ include "rucio.pvc.claimName" . }}
7373
{{- end }}
7474
{{- range $key, $val := .Values.secretMounts }}
7575
- name: {{ coalesce $val.volumeName $val.secretName $val.secretFullName }}

charts/rucio-server/templates/policy-package-storage.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
{{- if .Values.policyPackages.enabled }}
1+
{{- if .Values.policyPackages.pvc.createPvc }}
22
apiVersion: v1
33
kind: PersistentVolumeClaim
44
metadata:
5-
name: policy-package-volume
5+
name: {{ include "rucio.pvc.claimName" . }}
66
spec:
77
storageClassName: {{ .Values.policyPackages.storageClass.name }}
88
accessModes:

charts/rucio-server/values.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,12 @@ policyPackages:
178178
# - moduleName: vo_2_policy_package
179179
# requirement: git+https://github.com/vo-2/[email protected]
180180
# version: 0.1.0
181+
pvc:
182+
# Set true to create a PVC for the policy packages; leave false if providing it separately.
183+
createPvc: false
184+
name: policy-package-volume
185+
# Whether to prepend the release name to the PVC name provided.
186+
prependReleaseName: true
181187
resources:
182188
requests:
183189
# Storage required by the policy packages - resize if needed

0 commit comments

Comments
 (0)