From c665faae032319a8e46fde6888dcdecb011be1a0 Mon Sep 17 00:00:00 2001 From: Tigran Mkrtchyan Date: Thu, 20 Jun 2024 23:53:29 +0200 Subject: [PATCH] allow pool-only deployments --- README.md | 19 ++++++++++++++++++- templates/configmap.yaml | 3 ++- templates/door-svc.yaml | 6 +++++- templates/door.yaml | 7 ++++++- templates/pool.yaml | 2 ++ values.yaml | 2 ++ 6 files changed, 35 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0a63dbf..46d71f3 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,29 @@ ## TL;DR -``` +```bash helm repo add dcache https://gitlab.desy.de/api/v4/projects/7648/packages/helm/test helm repo update helm install my-release dcache/dcache ``` +## Run special version + +```bash +helm install --set image.tag=10.0.3 my-release dcache/dcache +``` + +## Run only pools + +Start pools `d` and `f` + +```bash +helm install --set image.tag=10.0.3 \ + --set dcache.door.enabled=false \ + --set "dcache.pools={d,f}" my-release dcache/dcache +``` + + ## Acknowledgement This project is based on work done by Michael Schuh, DESY-IT diff --git a/templates/configmap.yaml b/templates/configmap.yaml index eafdddf..f7d3eb5 100644 --- a/templates/configmap.yaml +++ b/templates/configmap.yaml @@ -4,6 +4,7 @@ metadata: name: {{ .Release.Name }}-configmap data: dcache-k8s-door: |- +{{ if .Values.dcache.door.enabled }} [door-svc] dcache.broker.scheme = core dcache.java.options.extra=-Dorg.dcache.net.localaddresses={{ $.Release.Name }}-door-svc.{{ $.Release.Namespace }}.svc.cluster.local @@ -116,7 +117,7 @@ data: [door-svc/admin] admin.paths.host-keys=/etc/grid-security/ssh_host_rsa_key {{- end }} - +{{ end }} {{- range .Values.dcache.pools }} diff --git a/templates/door-svc.yaml b/templates/door-svc.yaml index cd55fb9..3b0ba89 100644 --- a/templates/door-svc.yaml +++ b/templates/door-svc.yaml @@ -1,3 +1,5 @@ +{{- if .Values.dcache.door.enabled }} + apiVersion: v1 kind: Service metadata: @@ -85,4 +87,6 @@ spec: - name: wan-port-{{ $port_index }} port: {{ $port }} targetPort: {{ $port }} - {{- end }} \ No newline at end of file + {{- end }} + +{{ end }} \ No newline at end of file diff --git a/templates/door.yaml b/templates/door.yaml index 9014c79..68cc4b1 100644 --- a/templates/door.yaml +++ b/templates/door.yaml @@ -1,3 +1,6 @@ +{{- if .Values.dcache.door.enabled }} + + apiVersion: apps/v1 kind: StatefulSet metadata: @@ -146,4 +149,6 @@ spec: name: {{ $.Release.Name }}-configmap items: - key: "poolmanager.conf" - path: "poolmanager.conf" \ No newline at end of file + path: "poolmanager.conf" + +{{ end }} \ No newline at end of file diff --git a/templates/pool.yaml b/templates/pool.yaml index cf53d30..78d9d90 100644 --- a/templates/pool.yaml +++ b/templates/pool.yaml @@ -49,9 +49,11 @@ spec: volumeMounts: - mountPath: /etc/grid-security name: certs-store-{{ . }} + {{- if $.Values.dcache.door.enabled }} - name: wait-for-core image: busybox:1.28 command: ['sh', '-c', "until nc -z -v {{ $.Release.Name }}-door-svc.{{ $.Release.Namespace }}.svc.cluster.local {{ $.Values.cell.tunnel }}; do echo waiting for core to start; sleep 2; done"] + {{ end }} volumes: {{ include "dcache.conf.volume" $ | indent 6 }} - name: certs-store-{{ . }} diff --git a/values.yaml b/values.yaml index d238223..2dce381 100644 --- a/values.yaml +++ b/values.yaml @@ -10,6 +10,8 @@ image: dcache: + door: + enabled: true pools: - a - b