From e536fbc2213c71d2faa1ced1c3e565de7c4043ff Mon Sep 17 00:00:00 2001 From: "william.lin" Date: Fri, 13 Mar 2026 12:16:17 -0700 Subject: [PATCH] NVSHAS-10244: Set env var RANCHER_CLUSTER_NAME for deployment on Rancher env --- charts/core/templates/controller-deployment.yaml | 2 ++ charts/core/values.schema.json | 7 ++++++- charts/core/values.yaml | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/charts/core/templates/controller-deployment.yaml b/charts/core/templates/controller-deployment.yaml index 6d49d333..51e8e6ec 100644 --- a/charts/core/templates/controller-deployment.yaml +++ b/charts/core/templates/controller-deployment.yaml @@ -154,6 +154,8 @@ spec: valueFrom: fieldRef: fieldPath: status.podIP + - name: RANCHER_CLUSTER_NAME + value: "{{ .Values.global.cattle.clusterName }}" {{- if .Values.controller.ranchersso.enabled }} - name: RANCHER_SSO value: "1" diff --git a/charts/core/values.schema.json b/charts/core/values.schema.json index d4ef6212..df7ca5e1 100644 --- a/charts/core/values.schema.json +++ b/charts/core/values.schema.json @@ -41,11 +41,16 @@ "properties": { "cattle": { "type": "object", - "description": "required for rancher authentication", "properties": { + "description": "required for rancher authentication", + "properties": { "url": { "type": ["string", "null"], "description": "Set the Rancher Server URL; Required for Rancher Authentication. https:///", "format": "uri" + }, + "clusterName": { + "type": ["string", "null"], + "description": "Rancher management cluster name" } } }, diff --git a/charts/core/values.yaml b/charts/core/values.yaml index d203fe01..b9e7de7d 100644 --- a/charts/core/values.yaml +++ b/charts/core/values.yaml @@ -15,6 +15,7 @@ leastPrivilege: false global: # required for rancher authentication (https:///) cattle: url: + clusterName: azure: enabled: false identity: