From 8e1fcd479272d9a13bc7fd2521ae57cb00713779 Mon Sep 17 00:00:00 2001 From: shadow1runner Date: Sat, 14 Feb 2026 03:25:13 +0100 Subject: [PATCH] fix(helm): add {{ .Release.Namespace }} for kustomize v5.8 compat, closes #1808 (#1809) Co-authored-by: Helmut Wolf <3902045+shadow1runner@users.noreply.github.com> Co-authored-by: loverustfs --- helm/rustfs/templates/cert-manager-mtls/02-ca-cert.yaml | 1 + helm/rustfs/templates/cert-manager-mtls/03-rustfs-issuer.yaml | 1 + helm/rustfs/templates/cert-manager-mtls/04-server-cert.yaml | 1 + helm/rustfs/templates/cert-manager-mtls/05-client-cert.yaml | 1 + helm/rustfs/templates/cert-manager-mtls/servers-transport.yaml | 1 + helm/rustfs/templates/configmap.yaml | 1 + helm/rustfs/templates/deployment.yaml | 1 + helm/rustfs/templates/gateway-api/gateway.yml | 1 + helm/rustfs/templates/gateway-api/httproute.yml | 2 ++ helm/rustfs/templates/gateway-api/traefik-service.yaml | 1 + helm/rustfs/templates/ingress.yaml | 1 + helm/rustfs/templates/poddisruptionbudget.yaml | 1 + helm/rustfs/templates/pvc.yaml | 2 ++ helm/rustfs/templates/secret-tls.yaml | 1 + helm/rustfs/templates/secret.yaml | 2 ++ helm/rustfs/templates/service.yaml | 2 ++ helm/rustfs/templates/serviceaccount.yaml | 1 + helm/rustfs/templates/statefulset.yaml | 1 + helm/rustfs/templates/tests/test-connection.yaml | 1 + 19 files changed, 23 insertions(+) diff --git a/helm/rustfs/templates/cert-manager-mtls/02-ca-cert.yaml b/helm/rustfs/templates/cert-manager-mtls/02-ca-cert.yaml index 9015834a6..67d0d57e5 100644 --- a/helm/rustfs/templates/cert-manager-mtls/02-ca-cert.yaml +++ b/helm/rustfs/templates/cert-manager-mtls/02-ca-cert.yaml @@ -3,6 +3,7 @@ apiVersion: cert-manager.io/v1 kind: Certificate metadata: name: {{ include "rustfs.fullname" . }}-root-ca + namespace: {{ .Release.Namespace }} spec: isCA: true commonName: {{ include "rustfs.fullname" . }}-root-ca diff --git a/helm/rustfs/templates/cert-manager-mtls/03-rustfs-issuer.yaml b/helm/rustfs/templates/cert-manager-mtls/03-rustfs-issuer.yaml index c41c6430b..cc067b8b0 100644 --- a/helm/rustfs/templates/cert-manager-mtls/03-rustfs-issuer.yaml +++ b/helm/rustfs/templates/cert-manager-mtls/03-rustfs-issuer.yaml @@ -3,6 +3,7 @@ apiVersion: cert-manager.io/v1 kind: Issuer metadata: name: {{ include "rustfs.fullname" . }}-ca-issuer + namespace: {{ .Release.Namespace }} spec: ca: secretName: {{ include "rustfs.fullname" . }}-root-ca-secret diff --git a/helm/rustfs/templates/cert-manager-mtls/04-server-cert.yaml b/helm/rustfs/templates/cert-manager-mtls/04-server-cert.yaml index 6bf062967..6bbd97799 100644 --- a/helm/rustfs/templates/cert-manager-mtls/04-server-cert.yaml +++ b/helm/rustfs/templates/cert-manager-mtls/04-server-cert.yaml @@ -3,6 +3,7 @@ apiVersion: cert-manager.io/v1 kind: Certificate metadata: name: {{ include "rustfs.fullname" . }}-server-tls + namespace: {{ .Release.Namespace }} spec: secretName: {{ include "rustfs.fullname" . }}-server-tls issuerRef: diff --git a/helm/rustfs/templates/cert-manager-mtls/05-client-cert.yaml b/helm/rustfs/templates/cert-manager-mtls/05-client-cert.yaml index 41fc8dc35..dad4b14ef 100644 --- a/helm/rustfs/templates/cert-manager-mtls/05-client-cert.yaml +++ b/helm/rustfs/templates/cert-manager-mtls/05-client-cert.yaml @@ -3,6 +3,7 @@ apiVersion: cert-manager.io/v1 kind: Certificate metadata: name: {{ include "rustfs.fullname" . }}-client-tls + namespace: {{ .Release.Namespace }} spec: secretName: {{ include "rustfs.fullname" . }}-client-tls issuerRef: diff --git a/helm/rustfs/templates/cert-manager-mtls/servers-transport.yaml b/helm/rustfs/templates/cert-manager-mtls/servers-transport.yaml index b26f5457f..b7a8b3996 100644 --- a/helm/rustfs/templates/cert-manager-mtls/servers-transport.yaml +++ b/helm/rustfs/templates/cert-manager-mtls/servers-transport.yaml @@ -3,6 +3,7 @@ apiVersion: traefik.io/v1alpha1 kind: ServersTransport metadata: name: {{ include "rustfs.fullname" . }}-transport + namespace: {{ .Release.Namespace }} spec: rootcas: - {{ include "rustfs.fullname" . }}-root-ca-secret diff --git a/helm/rustfs/templates/configmap.yaml b/helm/rustfs/templates/configmap.yaml index 065e7e851..fc9596f7a 100644 --- a/helm/rustfs/templates/configmap.yaml +++ b/helm/rustfs/templates/configmap.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: {{ include "rustfs.fullname" . }}-config + namespace: {{ .Release.Namespace }} labels: {{- toYaml .Values.commonLabels | nindent 4 }} data: diff --git a/helm/rustfs/templates/deployment.yaml b/helm/rustfs/templates/deployment.yaml index 4c88bfd4a..533975448 100644 --- a/helm/rustfs/templates/deployment.yaml +++ b/helm/rustfs/templates/deployment.yaml @@ -5,6 +5,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "rustfs.fullname" . }} + namespace: {{ .Release.Namespace }} labels: {{- include "rustfs.labels" . | nindent 4 }} {{- with .Values.commonLabels }} diff --git a/helm/rustfs/templates/gateway-api/gateway.yml b/helm/rustfs/templates/gateway-api/gateway.yml index 6f5419566..dd5e46d69 100644 --- a/helm/rustfs/templates/gateway-api/gateway.yml +++ b/helm/rustfs/templates/gateway-api/gateway.yml @@ -3,6 +3,7 @@ apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: {{ include "rustfs.fullname" . }}-gateway + namespace: {{ .Release.Namespace }} spec: gatewayClassName: {{ .Values.gatewayApi.gatewayClass }} {{- with .Values.gatewayApi.listeners }} diff --git a/helm/rustfs/templates/gateway-api/httproute.yml b/helm/rustfs/templates/gateway-api/httproute.yml index 74ff2d2fc..dc48f32fc 100644 --- a/helm/rustfs/templates/gateway-api/httproute.yml +++ b/helm/rustfs/templates/gateway-api/httproute.yml @@ -3,6 +3,7 @@ apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: {{ include "rustfs.fullname" . }}-route + namespace: {{ .Release.Namespace }} annotations: {{- if eq .Values.gatewayApi.gatewayClass "contour" }} projectcontour.io/upstream-hash-policy: "cookie" @@ -42,6 +43,7 @@ apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: {{ include "rustfs.fullname" . }}-redirect + namespace: {{ .Release.Namespace }} spec: parentRefs: {{- if .Values.gatewayApi.existingGateway.name }} diff --git a/helm/rustfs/templates/gateway-api/traefik-service.yaml b/helm/rustfs/templates/gateway-api/traefik-service.yaml index cf1cd3b70..e1c539a3a 100644 --- a/helm/rustfs/templates/gateway-api/traefik-service.yaml +++ b/helm/rustfs/templates/gateway-api/traefik-service.yaml @@ -3,6 +3,7 @@ apiVersion: traefik.io/v1alpha1 kind: TraefikService metadata: name: {{ include "rustfs.fullname" . }}-sticky-svc + namespace: {{ .Release.Namespace }} spec: weighted: services: diff --git a/helm/rustfs/templates/ingress.yaml b/helm/rustfs/templates/ingress.yaml index 026f5559e..c1b3a9d62 100644 --- a/helm/rustfs/templates/ingress.yaml +++ b/helm/rustfs/templates/ingress.yaml @@ -9,6 +9,7 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ include "rustfs.fullname" . }} + namespace: {{ .Release.Namespace }} labels: {{- include "rustfs.labels" . | nindent 4 }} {{- with .Values.commonLabels }} diff --git a/helm/rustfs/templates/poddisruptionbudget.yaml b/helm/rustfs/templates/poddisruptionbudget.yaml index 085c25717..01bf73372 100644 --- a/helm/rustfs/templates/poddisruptionbudget.yaml +++ b/helm/rustfs/templates/poddisruptionbudget.yaml @@ -4,6 +4,7 @@ apiVersion: policy/v1 kind: PodDisruptionBudget metadata: name: {{ include "rustfs.fullname" . }} + namespace: {{ .Release.Namespace }} labels: {{- include "rustfs.labels" . | nindent 4 }} {{- with .Values.commonLabels }} diff --git a/helm/rustfs/templates/pvc.yaml b/helm/rustfs/templates/pvc.yaml index 1942a6854..f602eec9b 100644 --- a/helm/rustfs/templates/pvc.yaml +++ b/helm/rustfs/templates/pvc.yaml @@ -6,6 +6,7 @@ metadata: annotations: helm.sh/resource-policy: keep name: {{ include "rustfs.fullname" $ }}-data + namespace: {{ $.Release.Namespace }} labels: {{- toYaml $.Values.commonLabels | nindent 4 }} spec: @@ -25,6 +26,7 @@ metadata: annotations: helm.sh/resource-policy: keep name: {{ include "rustfs.fullname" $ }}-logs + namespace: {{ $.Release.Namespace }} labels: {{- toYaml $.Values.commonLabels | nindent 4 }} spec: diff --git a/helm/rustfs/templates/secret-tls.yaml b/helm/rustfs/templates/secret-tls.yaml index b271ee4b5..562724855 100644 --- a/helm/rustfs/templates/secret-tls.yaml +++ b/helm/rustfs/templates/secret-tls.yaml @@ -3,6 +3,7 @@ apiVersion: v1 kind: Secret metadata: name: {{ include "rustfs.fullname" . }}-tls + namespace: {{ .Release.Namespace }} labels: {{- toYaml .Values.commonLabels | nindent 4 }} type: kubernetes.io/tls diff --git a/helm/rustfs/templates/secret.yaml b/helm/rustfs/templates/secret.yaml index 2caa85093..76348c202 100644 --- a/helm/rustfs/templates/secret.yaml +++ b/helm/rustfs/templates/secret.yaml @@ -3,6 +3,7 @@ apiVersion: v1 kind: Secret metadata: name: {{ include "rustfs.secretName" . }} + namespace: {{ .Release.Namespace }} labels: {{- toYaml .Values.commonLabels | nindent 4 }} type: Opaque @@ -17,6 +18,7 @@ apiVersion: v1 kind: Secret metadata: name: {{ include "rustfs.imagePullSecret.name" . }} + namespace: {{ .Release.Namespace }} labels: {{- toYaml .Values.commonLabels | nindent 4 }} type: kubernetes.io/dockerconfigjson diff --git a/helm/rustfs/templates/service.yaml b/helm/rustfs/templates/service.yaml index ce824fc86..7b6eca2f7 100644 --- a/helm/rustfs/templates/service.yaml +++ b/helm/rustfs/templates/service.yaml @@ -3,6 +3,7 @@ apiVersion: v1 kind: Service metadata: name: {{ include "rustfs.fullname" . }}-headless + namespace: {{ .Release.Namespace }} labels: {{- include "rustfs.labels" . | nindent 4 }} {{- with .Values.commonLabels }} @@ -27,6 +28,7 @@ apiVersion: v1 kind: Service metadata: name: {{ include "rustfs.fullname" . }}-svc + namespace: {{ .Release.Namespace }} {{- if and .Values.mode.distributed.enabled (eq .Values.ingress.className "traefik")}} annotations: {{- toYaml .Values.ingress.traefikAnnotations | nindent 4 }} diff --git a/helm/rustfs/templates/serviceaccount.yaml b/helm/rustfs/templates/serviceaccount.yaml index 9edd6d7ba..f87127ed7 100644 --- a/helm/rustfs/templates/serviceaccount.yaml +++ b/helm/rustfs/templates/serviceaccount.yaml @@ -3,6 +3,7 @@ apiVersion: v1 kind: ServiceAccount metadata: name: {{ include "rustfs.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} labels: {{- include "rustfs.labels" . | nindent 4 }} {{- with .Values.commonLabels }} diff --git a/helm/rustfs/templates/statefulset.yaml b/helm/rustfs/templates/statefulset.yaml index 6c55bbbb9..f62fd619b 100644 --- a/helm/rustfs/templates/statefulset.yaml +++ b/helm/rustfs/templates/statefulset.yaml @@ -6,6 +6,7 @@ apiVersion: apps/v1 kind: StatefulSet metadata: name: {{ include "rustfs.fullname" . }} + namespace: {{ .Release.Namespace }} labels: {{- include "rustfs.labels" . | nindent 4 }} {{- with .Values.commonLabels }} diff --git a/helm/rustfs/templates/tests/test-connection.yaml b/helm/rustfs/templates/tests/test-connection.yaml index d22ecfa83..867104a32 100644 --- a/helm/rustfs/templates/tests/test-connection.yaml +++ b/helm/rustfs/templates/tests/test-connection.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: Pod metadata: name: "{{ include "rustfs.fullname" . }}-test-connection" + namespace: {{ .Release.Namespace }} labels: {{- include "rustfs.labels" . | nindent 4 }} annotations: