mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-26 08:18:18 +00:00
feat(helm): allow overriding Kubernetes cluster domain (#4259)
This commit is contained in:
committed by
GitHub
parent
a9115f729e
commit
b09526c0f5
@@ -18,6 +18,7 @@ RustFS helm chart supports **standalone and distributed mode**. For standalone m
|
||||
| affinity.nodeAffinity | object | `{}` | |
|
||||
| affinity.podAntiAffinity.enabled | bool | `true` | |
|
||||
| affinity.podAntiAffinity.topologyKey | string | `"kubernetes.io/hostname"` | |
|
||||
| clusterDomain | string | `"cluster.local"` | Kubernetes cluster DNS domain used to build in-cluster FQDNs for `RUSTFS_VOLUMES` (distributed mode) and mTLS server certificate SANs. Override for clusters not using the default `cluster.local`. Provide the DNS root only, without a `svc.` prefix or leading/trailing dots. |
|
||||
| commonLabels | object | `{}` | Labels to add to all deployed objects. |
|
||||
| config.rustfs.address | string | `":9000"` | |
|
||||
| config.rustfs.console_address | string | `":9001"` | |
|
||||
|
||||
@@ -159,6 +159,15 @@ Merges (in order of increasing precedence):
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Resolve the Kubernetes cluster DNS domain (defaults to cluster.local).
|
||||
Trims any leading/trailing dots so callers can safely append it after `svc.`,
|
||||
falling back to cluster.local when the value is empty or only dots.
|
||||
*/}}
|
||||
{{- define "rustfs.clusterDomain" -}}
|
||||
{{- .Values.clusterDomain | default "cluster.local" | trimAll "." | default "cluster.local" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Render RUSTFS_VOLUMES
|
||||
*/}}
|
||||
@@ -170,10 +179,10 @@ Render RUSTFS_VOLUMES
|
||||
{{- end -}}
|
||||
|
||||
{{- if eq (int .Values.replicaCount) 4 }}
|
||||
{{- printf "%s://%s-{0...%d}.%s-headless.%s.svc.cluster.local:%d/data/rustfs{0...%d}" $protocol (include "rustfs.fullname" .) (sub (.Values.replicaCount | int) 1) (include "rustfs.fullname" . ) .Release.Namespace (.Values.service.endpoint.port | int) (sub (.Values.replicaCount | int) 1) }}
|
||||
{{- printf "%s://%s-{0...%d}.%s-headless.%s.svc.%s:%d/data/rustfs{0...%d}" $protocol (include "rustfs.fullname" .) (sub (.Values.replicaCount | int) 1) (include "rustfs.fullname" . ) .Release.Namespace (include "rustfs.clusterDomain" .) (.Values.service.endpoint.port | int) (sub (.Values.replicaCount | int) 1) }}
|
||||
{{- end }}
|
||||
{{- if eq (int .Values.replicaCount) 16 }}
|
||||
{{- printf "%s://%s-{0...%d}.%s-headless.%s.svc.cluster.local:%d/data" $protocol (include "rustfs.fullname" .) (sub (.Values.replicaCount | int) 1) (include "rustfs.fullname" .) .Release.Namespace (.Values.service.endpoint.port | int) }}
|
||||
{{- printf "%s://%s-{0...%d}.%s-headless.%s.svc.%s:%d/data" $protocol (include "rustfs.fullname" .) (sub (.Values.replicaCount | int) 1) (include "rustfs.fullname" .) .Release.Namespace (include "rustfs.clusterDomain" .) (.Values.service.endpoint.port | int) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ spec:
|
||||
commonName: {{ include "rustfs.fullname" . }}-cluster
|
||||
dnsNames:
|
||||
- "*.{{ include "rustfs.fullname" . }}-headless"
|
||||
- "*.{{ include "rustfs.fullname" . }}-headless.{{ .Release.Namespace }}.svc.cluster.local"
|
||||
- "{{ include "rustfs.fullname" . }}-svc.{{ .Release.Namespace }}.svc.cluster.local"
|
||||
- "*.{{ include "rustfs.fullname" . }}-headless.{{ .Release.Namespace }}.svc.{{ include "rustfs.clusterDomain" . }}"
|
||||
- "{{ include "rustfs.fullname" . }}-svc.{{ .Release.Namespace }}.svc.{{ include "rustfs.clusterDomain" . }}"
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- {{ .host | quote }}
|
||||
- {{ printf "*.%s" .host | quote }}
|
||||
|
||||
@@ -5,6 +5,13 @@
|
||||
# This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/
|
||||
replicaCount: 4
|
||||
|
||||
# Kubernetes cluster DNS domain used to build in-cluster FQDNs for
|
||||
# RUSTFS_VOLUMES (distributed mode) and mTLS server certificate SANs.
|
||||
# Override this only if your cluster does not use the default `cluster.local`
|
||||
# (for example, on-premise clusters configured with a custom domain).
|
||||
# Provide the DNS root only, without a `svc.` prefix or leading/trailing dots.
|
||||
clusterDomain: cluster.local
|
||||
|
||||
# This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/
|
||||
image:
|
||||
rustfs: # This sets the rustfs image repository and tag.
|
||||
|
||||
Reference in New Issue
Block a user