From 411acf6497bf4beee939ec6beabdb1da7ab79501 Mon Sep 17 00:00:00 2001 From: Tigran Mkrtchyan Date: Thu, 5 Sep 2024 18:04:08 +0200 Subject: [PATCH] add hsm setup --- templates/configmap.yaml | 6 ++++++ templates/pool.yaml | 14 ++++++++++++++ values.yaml | 2 ++ 3 files changed, 22 insertions(+) diff --git a/templates/configmap.yaml b/templates/configmap.yaml index e042a2b..421c19c 100644 --- a/templates/configmap.yaml +++ b/templates/configmap.yaml @@ -238,6 +238,12 @@ data: htpasswd: |- admin:$apr1$nq7.vQxE$tvmghVXGplwv/SNpNYGiC1 +{{- if .Values.dcache.hsm.enabled }} + pool-setup: |- + queue define class -expire=0 -pending=0 -total=0 -open osm * + hsm create osm s3 script -command=/usr/bin/s3hsm -debuglog=/dev/null -s3bucket=hsm -s3config=/opt/dcache/etc/s3-tape.yml +{{- end }} + poolmanager.conf: |- psu create unit -store *@* psu create unit -net 0.0.0.0/0.0.0.0 diff --git a/templates/pool.yaml b/templates/pool.yaml index 78d9d90..34ec246 100644 --- a/templates/pool.yaml +++ b/templates/pool.yaml @@ -43,6 +43,12 @@ spec: readOnly: true - name: pool-data mountPath: /pool + {{- if $.Values.dcache.hsm.enabled}} + - name: pool-hsm-config + mountPath: /pool/setup + subPath: setup + readOnly: true + {{- end}} initContainers: {{ $host := print $.Release.Name "-pool-" . "-svc." $.Release.Namespace ".svc.cluster.local" -}} {{ include "dcache.certs.init" $host }} @@ -59,6 +65,14 @@ spec: - name: certs-store-{{ . }} persistentVolumeClaim: claimName: {{ $.Release.Name }}-pool-{{ . }}-certs-store + {{- if $.Values.dcache.hsm.enabled}} + - name: pool-hsm-config + configMap: + name: {{ $.Release.Name }}-configmap + items: + - key: "pool-setup" + path: "setup" + {{- end}} volumeClaimTemplates: - metadata: name: pool-data diff --git a/values.yaml b/values.yaml index d34719f..fcdf9d8 100644 --- a/values.yaml +++ b/values.yaml @@ -12,6 +12,8 @@ image: dcache: door: enabled: true + hsm: + enabled: false pools: - a - b