From a0ea28b0da2d148e7190ade3c81fbc87aa33641d Mon Sep 17 00:00:00 2001 From: babykart Date: Sun, 23 Feb 2025 15:45:55 +0100 Subject: [PATCH 1/2] Add headless service for statefulSet serviceName Signed-off-by: babykart --- .../garage/templates/service-headless.yaml | 21 +++++++++++++++++++ script/helm/garage/templates/workload.yaml | 3 +-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 script/helm/garage/templates/service-headless.yaml diff --git a/script/helm/garage/templates/service-headless.yaml b/script/helm/garage/templates/service-headless.yaml new file mode 100644 index 00000000..43d8dfa2 --- /dev/null +++ b/script/helm/garage/templates/service-headless.yaml @@ -0,0 +1,21 @@ +{{- if eq .Values.deployment.kind "StatefulSet" -}} +apiVersion: v1 +kind: Service +metadata: + name: {{ include "garage.fullname" . }}-headless + labels: + {{- include "garage.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.s3.api.port }} + targetPort: 3900 + protocol: TCP + name: s3-api + - port: {{ .Values.service.s3.web.port }} + targetPort: 3902 + protocol: TCP + name: s3-web + selector: + {{- include "garage.selectorLabels" . | nindent 4 }} +{{- end }} \ No newline at end of file diff --git a/script/helm/garage/templates/workload.yaml b/script/helm/garage/templates/workload.yaml index 251813e4..cb9e76a2 100644 --- a/script/helm/garage/templates/workload.yaml +++ b/script/helm/garage/templates/workload.yaml @@ -10,12 +10,11 @@ spec: {{- include "garage.selectorLabels" . | nindent 6 }} {{- if eq .Values.deployment.kind "StatefulSet" }} replicas: {{ .Values.deployment.replicaCount }} - serviceName: {{ include "garage.fullname" . }} + serviceName: {{ include "garage.fullname" . }}-headless podManagementPolicy: {{ .Values.deployment.podManagementPolicy }} {{- end }} template: metadata: - annotations: checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{- with .Values.podAnnotations }} From 09ed5ab8ccccc3cfe423aca93e334a4a6a8ae02a Mon Sep 17 00:00:00 2001 From: babykart Date: Sun, 23 Feb 2025 15:55:01 +0100 Subject: [PATCH 2/2] Fix documentation link Signed-off-by: babykart --- script/helm/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/helm/README.md b/script/helm/README.md index 5f919a23..1b22e604 100644 --- a/script/helm/README.md +++ b/script/helm/README.md @@ -1,3 +1,3 @@ # Garage helm3 chart -Documentation is located [here](/doc/book/cookbook/kubernetes.md). +Documentation is located [here](https://garagehq.deuxfleurs.fr/documentation/cookbook/kubernetes/).