From 70503a04832d262aafd9cfba746f7c81cf7b96f0 Mon Sep 17 00:00:00 2001 From: Jasper Bernhardt Date: Tue, 3 Nov 2026 18:58:23 +0000 Subject: [PATCH] Add optional Helm DNS and workload settings Allow fully qualified peer and provisioning hostnames using clusterDomain, with matching TLS server names for metrics. Expose Kubernetes probe specs, shutdown grace, Console Service enablement, and provisioning Job TTL. Preserve existing defaults and resource identities so deployments can replace common overrides without changing runtime behavior. Signed-off-by: Jasper Bernhardt --- helm/silo/README.md | 15 +++++++++++++++ helm/silo/templates/_helpers.tpl | 8 ++++++++ helm/silo/templates/console-ingress.yaml | 3 +++ helm/silo/templates/console-service.yaml | 2 ++ helm/silo/templates/deployment.yaml | 12 ++++++++++++ helm/silo/templates/post-job.yaml | 13 ++++++++----- helm/silo/templates/servicemonitor.yaml | 4 ++-- helm/silo/templates/statefulset.yaml | 14 +++++++++++++- helm/silo/values.yaml | 15 +++++++++++++++ 9 files changed, 78 insertions(+), 8 deletions(-) diff --git a/helm/silo/README.md b/helm/silo/README.md index bbe43ac51a35c..7330fbf7106b1 100644 --- a/helm/silo/README.md +++ b/helm/silo/README.md @@ -139,6 +139,21 @@ helm upgrade --install silo ./helm/silo \ Additional trusted CAs can be supplied through `trustedCertsSecret`. +Set `useFQDN: true` to use the existing `clusterDomain` in peer and provisioning +hostnames. Certificates must cover `..svc.` +and the distributed peers `-.-svc..svc.`. +Changing peer addresses requires coordinated restarts. Short names remain the +default for compatibility. Provisioning scripts retain their existing TLS behavior. + +`startupProbe`, `readinessProbe`, and `livenessProbe` accept complete Kubernetes +probe specifications; empty maps omit them. For HTTP probes, use port `http` +and scheme `HTTP`, or port `https` and scheme `HTTPS` when TLS is enabled. +`terminationGracePeriodSeconds` sets the server Pod shutdown grace period. + +Set `consoleService.enabled: false` to omit the Console Service (also disable +`consoleIngress`). Set `postJob.ttlSecondsAfterFinished` for Job cleanup. Both +timeout settings accept zero; null preserves the Kubernetes default. + ## Existing Secrets and post-install resources Set `existingSecret` to a Secret containing `rootUser` and `rootPassword`. diff --git a/helm/silo/templates/_helpers.tpl b/helm/silo/templates/_helpers.tpl index 5ce8ab39b7089..009f4b12ee63f 100644 --- a/helm/silo/templates/_helpers.tpl +++ b/helm/silo/templates/_helpers.tpl @@ -214,3 +214,11 @@ otherwise it generates a random value. {{- include "silo.getValueFromSecret" (dict "Namespace" .Release.Namespace "Name" (include "silo.fullname" .) "Length" 40 "Key" "rootPassword") }} {{- end }} {{- end -}} + +{{/* Internal API hostname, optionally qualified for certificate validation. */}} +{{- define "silo.serviceHost" -}} +{{- include "silo.fullname" . -}} +{{- if .Values.useFQDN -}} +{{- printf ".%s.svc.%s" .Release.Namespace (trimSuffix "." .Values.clusterDomain) -}} +{{- end -}} +{{- end -}} diff --git a/helm/silo/templates/console-ingress.yaml b/helm/silo/templates/console-ingress.yaml index 248d9ce703220..c878882b29e07 100644 --- a/helm/silo/templates/console-ingress.yaml +++ b/helm/silo/templates/console-ingress.yaml @@ -1,3 +1,6 @@ +{{- if and .Values.consoleIngress.enabled (not .Values.consoleService.enabled) }} +{{- fail "consoleIngress.enabled requires consoleService.enabled" }} +{{- end }} {{- if .Values.consoleIngress.enabled -}} {{- $fullName := printf "%s-console" (include "silo.fullname" .) -}} {{- $servicePort := .Values.consoleService.port -}} diff --git a/helm/silo/templates/console-service.yaml b/helm/silo/templates/console-service.yaml index f7f488e0fc3fd..eea3861fc19d1 100644 --- a/helm/silo/templates/console-service.yaml +++ b/helm/silo/templates/console-service.yaml @@ -1,3 +1,4 @@ +{{- if .Values.consoleService.enabled }} {{ $scheme := .Values.tls.enabled | ternary "https" "http" }} apiVersion: v1 kind: Service @@ -43,3 +44,4 @@ spec: selector: app: {{ template "silo.name" . }} release: {{ .Release.Name }} +{{- end }} diff --git a/helm/silo/templates/deployment.yaml b/helm/silo/templates/deployment.yaml index 259890fabbc68..bdf16f0ca68f5 100644 --- a/helm/silo/templates/deployment.yaml +++ b/helm/silo/templates/deployment.yaml @@ -47,6 +47,9 @@ spec: {{- toYaml .Values.podAnnotations | trimSuffix "\n" | nindent 8 }} {{- end }} spec: + {{- if ne .Values.terminationGracePeriodSeconds nil }} + terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} + {{- end }} {{- if .Values.priorityClassName }} priorityClassName: "{{ .Values.priorityClassName }}" {{- end }} @@ -68,6 +71,15 @@ spec: - "/bin/sh" - "-ce" - "/usr/bin/docker-entrypoint.sh silo server {{ $bucketRoot }} -S {{ .Values.certsPath }} --address :{{ .Values.minioAPIPort }} --console-address :{{ .Values.minioConsolePort }} {{- template "silo.extraArgs" . }}" + {{- with .Values.startupProbe }} + startupProbe: {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.readinessProbe }} + readinessProbe: {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.livenessProbe }} + livenessProbe: {{- toYaml . | nindent 12 }} + {{- end }} volumeMounts: - name: silo-user mountPath: "/tmp/credentials" diff --git a/helm/silo/templates/post-job.yaml b/helm/silo/templates/post-job.yaml index 33fda394a3003..dea0dad452aff 100644 --- a/helm/silo/templates/post-job.yaml +++ b/helm/silo/templates/post-job.yaml @@ -15,6 +15,9 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: + {{- if ne .Values.postJob.ttlSecondsAfterFinished nil }} + ttlSecondsAfterFinished: {{ .Values.postJob.ttlSecondsAfterFinished }} + {{- end }} template: metadata: labels: @@ -103,7 +106,7 @@ spec: {{- end }} env: - name: MINIO_ENDPOINT - value: {{ template "silo.fullname" . }} + value: {{ include "silo.serviceHost" . | quote }} - name: MINIO_PORT value: {{ .Values.service.port | quote }} volumeMounts: @@ -137,7 +140,7 @@ spec: {{- end }} env: - name: MINIO_ENDPOINT - value: {{ template "silo.fullname" . }} + value: {{ include "silo.serviceHost" . | quote }} - name: MINIO_PORT value: {{ .Values.service.port | quote }} volumeMounts: @@ -170,7 +173,7 @@ spec: {{- end }} env: - name: MINIO_ENDPOINT - value: {{ template "silo.fullname" . }} + value: {{ include "silo.serviceHost" . | quote }} - name: MINIO_PORT value: {{ .Values.service.port | quote }} volumeMounts: @@ -203,7 +206,7 @@ spec: {{- end }} env: - name: MINIO_ENDPOINT - value: {{ template "silo.fullname" . }} + value: {{ include "silo.serviceHost" . | quote }} - name: MINIO_PORT value: {{ .Values.service.port | quote }} volumeMounts: @@ -239,7 +242,7 @@ spec: {{- end }} env: - name: MINIO_ENDPOINT - value: {{ template "silo.fullname" . }} + value: {{ include "silo.serviceHost" . | quote }} - name: MINIO_PORT value: {{ .Values.service.port | quote }} volumeMounts: diff --git a/helm/silo/templates/servicemonitor.yaml b/helm/silo/templates/servicemonitor.yaml index 8bd15eb5b5644..133339aff05eb 100644 --- a/helm/silo/templates/servicemonitor.yaml +++ b/helm/silo/templates/servicemonitor.yaml @@ -27,7 +27,7 @@ spec: secret: name: {{ .Values.tls.certSecret }} key: {{ .Values.tls.publicCrt }} - serverName: {{ template "silo.fullname" . }} + serverName: {{ include "silo.serviceHost" . }} {{- else }} - port: http scheme: http @@ -81,7 +81,7 @@ spec: secret: name: {{ .Values.tls.certSecret }} key: {{ .Values.tls.publicCrt }} - serverName: {{ template "silo.fullname" . }} + serverName: {{ include "silo.serviceHost" . }} {{- end }} prober: url: {{ template "silo.fullname" . }}.{{ .Release.Namespace }}:{{ .Values.service.port }} diff --git a/helm/silo/templates/statefulset.yaml b/helm/silo/templates/statefulset.yaml index 0258a7ee3c248..71396273cc974 100644 --- a/helm/silo/templates/statefulset.yaml +++ b/helm/silo/templates/statefulset.yaml @@ -75,6 +75,9 @@ spec: {{- toYaml .Values.podAnnotations | nindent 8 }} {{- end }} spec: + {{- if ne .Values.terminationGracePeriodSeconds nil }} + terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} + {{- end }} {{- if .Values.priorityClassName }} priorityClassName: "{{ .Values.priorityClassName }}" {{- end }} @@ -95,8 +98,17 @@ spec: command: [ "/bin/sh", "-ce", - "/usr/bin/docker-entrypoint.sh silo server {{- range $i := until $poolCount }}{{ $factor := mul $i $nodeCount }}{{ $endIndex := add $factor $nodeCount }}{{ $beginIndex := mul $i $nodeCount }} {{ $scheme }}://{{ template `silo.fullname` $ }}-{{ `{` }}{{ $beginIndex }}...{{ sub $endIndex 1 }}{{ `}`}}.{{ template `silo.fullname` $ }}-svc.{{ $.Release.Namespace }}.svc{{if (gt $drivesPerNode 1)}}{{ $bucketRoot }}-{{ `{` }}0...{{ sub $drivesPerNode 1 }}{{ `}` }}{{ else }}{{ $bucketRoot }}{{end }}{{- end }} -S {{ .Values.certsPath }} --address :{{ .Values.minioAPIPort }} --console-address :{{ .Values.minioConsolePort }} {{- template `silo.extraArgs` . }}" + "/usr/bin/docker-entrypoint.sh silo server {{- range $i := until $poolCount }}{{ $factor := mul $i $nodeCount }}{{ $endIndex := add $factor $nodeCount }}{{ $beginIndex := mul $i $nodeCount }} {{ $scheme }}://{{ template `silo.fullname` $ }}-{{ `{` }}{{ $beginIndex }}...{{ sub $endIndex 1 }}{{ `}`}}.{{ template `silo.fullname` $ }}-svc.{{ $.Release.Namespace }}.svc{{ if $.Values.useFQDN }}.{{ trimSuffix `.` $.Values.clusterDomain }}:{{ $.Values.minioAPIPort }}{{ end }}{{if (gt $drivesPerNode 1)}}{{ $bucketRoot }}-{{ `{` }}0...{{ sub $drivesPerNode 1 }}{{ `}` }}{{ else }}{{ $bucketRoot }}{{end }}{{- end }} -S {{ .Values.certsPath }} --address :{{ .Values.minioAPIPort }} --console-address :{{ .Values.minioConsolePort }} {{- template `silo.extraArgs` . }}" ] + {{- with .Values.startupProbe }} + startupProbe: {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.readinessProbe }} + readinessProbe: {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.livenessProbe }} + livenessProbe: {{- toYaml . | nindent 12 }} + {{- end }} volumeMounts: {{- if $penabled }} {{- if (gt $drivesPerNode 1) }} diff --git a/helm/silo/values.yaml b/helm/silo/values.yaml index 52d8df3b150bb..43ff6d3882ef4 100644 --- a/helm/silo/values.yaml +++ b/helm/silo/values.yaml @@ -11,6 +11,10 @@ fullnameOverride: "" ## clusterDomain: cluster.local +## Use full DNS names for peer and provisioning connections. Existing releases +## retain short names by default; coordinate peer restarts when enabling this. +useFQDN: false + ## Set default Silo server image repository, tag, and pull policy. ## image: @@ -58,6 +62,14 @@ extraVolumeMounts: [] ## Additional sidecar containers extraContainers: [] +## Optional Kubernetes probe specifications for the server container. +startupProbe: {} +readinessProbe: {} +livenessProbe: {} + +## Server Pod shutdown grace period. Null uses the Kubernetes default. +terminationGracePeriodSeconds: null + ## Internal port number for the Silo S3 API container. ## Change service.port to change external port number minioAPIPort: "9000" @@ -221,6 +233,7 @@ ingress: # - chart-example.local consoleService: + enabled: true type: ClusterIP clusterIP: ~ port: "9001" @@ -503,6 +516,8 @@ customCommandJob: ## Merge jobs postJob: + ## Null disables TTL cleanup; zero requests immediate cleanup. + ttlSecondsAfterFinished: null podAnnotations: {} annotations: {} securityContext: