diff --git a/charts/cluster-autoscaler/Chart.yaml b/charts/cluster-autoscaler/Chart.yaml index c871126adba8..7bbaffd34b6c 100644 --- a/charts/cluster-autoscaler/Chart.yaml +++ b/charts/cluster-autoscaler/Chart.yaml @@ -11,4 +11,4 @@ name: cluster-autoscaler sources: - https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler type: application -version: 9.29.1 +version: 9.29.2 diff --git a/charts/cluster-autoscaler/README.md b/charts/cluster-autoscaler/README.md index ff3aba2e4fff..dd6171b780e7 100644 --- a/charts/cluster-autoscaler/README.md +++ b/charts/cluster-autoscaler/README.md @@ -411,6 +411,7 @@ vpa: | rbac.serviceAccount.name | string | `""` | The name of the ServiceAccount to use. If not set and create is `true`, a name is generated using the fullname template. | | replicaCount | int | `1` | Desired number of pods | | resources | object | `{}` | Pod resource requests and limits. | +| secretKeyRefNameOverride | string | `""` | Overrides the name of the Secret to use when loading the secretKeyRef for AWS and Azure env variables | | securityContext | object | `{}` | [Security context for pod](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) | | service.annotations | object | `{}` | Annotations to add to service | | service.create | bool | `true` | If `true`, a Service will be created. | diff --git a/charts/cluster-autoscaler/templates/deployment.yaml b/charts/cluster-autoscaler/templates/deployment.yaml index ea5ba5c41d50..957398a3bd69 100644 --- a/charts/cluster-autoscaler/templates/deployment.yaml +++ b/charts/cluster-autoscaler/templates/deployment.yaml @@ -132,36 +132,36 @@ spec: valueFrom: secretKeyRef: key: AwsAccessKeyId - name: {{ template "cluster-autoscaler.fullname" . }} + name: {{ default (include "cluster-autoscaler.fullname" .) .Values.secretKeyRefNameOverride }} {{- end }} {{- if .Values.awsSecretAccessKey }} - name: AWS_SECRET_ACCESS_KEY valueFrom: secretKeyRef: key: AwsSecretAccessKey - name: {{ template "cluster-autoscaler.fullname" . }} + name: {{ default (include "cluster-autoscaler.fullname" .) .Values.secretKeyRefNameOverride }} {{- end }} {{- else if eq .Values.cloudProvider "azure" }} - name: ARM_SUBSCRIPTION_ID valueFrom: secretKeyRef: key: SubscriptionID - name: {{ template "cluster-autoscaler.fullname" . }} + name: {{ default (include "cluster-autoscaler.fullname" .) .Values.secretKeyRefNameOverride }} - name: ARM_RESOURCE_GROUP valueFrom: secretKeyRef: key: ResourceGroup - name: {{ template "cluster-autoscaler.fullname" . }} + name: {{ default (include "cluster-autoscaler.fullname" .) .Values.secretKeyRefNameOverride }} - name: ARM_VM_TYPE valueFrom: secretKeyRef: key: VMType - name: {{ template "cluster-autoscaler.fullname" . }} + name: {{ default (include "cluster-autoscaler.fullname" .) .Values.secretKeyRefNameOverride }} - name: AZURE_CLUSTER_NAME valueFrom: secretKeyRef: key: ClusterName - name: {{ template "cluster-autoscaler.fullname" . }} + name: {{ default (include "cluster-autoscaler.fullname" .) .Values.secretKeyRefNameOverride }} {{- if .Values.azureUseWorkloadIdentityExtension }} - name: ARM_USE_WORKLOAD_IDENTITY_EXTENSION value: "true" @@ -173,22 +173,22 @@ spec: valueFrom: secretKeyRef: key: TenantID - name: {{ template "cluster-autoscaler.fullname" . }} + name: {{ default (include "cluster-autoscaler.fullname" .) .Values.secretKeyRefNameOverride }} - name: ARM_CLIENT_ID valueFrom: secretKeyRef: key: ClientID - name: {{ template "cluster-autoscaler.fullname" . }} + name: {{ default (include "cluster-autoscaler.fullname" .) .Values.secretKeyRefNameOverride }} - name: ARM_CLIENT_SECRET valueFrom: secretKeyRef: key: ClientSecret - name: {{ template "cluster-autoscaler.fullname" . }} + name: {{ default (include "cluster-autoscaler.fullname" .) .Values.secretKeyRefNameOverride }} - name: AZURE_NODE_RESOURCE_GROUP valueFrom: secretKeyRef: key: NodeResourceGroup - name: {{ template "cluster-autoscaler.fullname" . }} + name: {{ default (include "cluster-autoscaler.fullname" .) .Values.secretKeyRefNameOverride }} {{- end }} {{- end }} {{- range $key, $value := .Values.extraEnv }} diff --git a/charts/cluster-autoscaler/values.yaml b/charts/cluster-autoscaler/values.yaml index f414ae65e7c6..a7deb24a7e70 100644 --- a/charts/cluster-autoscaler/values.yaml +++ b/charts/cluster-autoscaler/values.yaml @@ -396,3 +396,6 @@ vpa: updateMode: "Auto" # vpa.containerPolicy -- [ContainerResourcePolicy](https://github.com/kubernetes/autoscaler/blob/vertical-pod-autoscaler/v0.13.0/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1/types.go#L159). The containerName is always et to the deployment's container name. This value is required if VPA is enabled. containerPolicy: {} + +# secretKeyRefNameOverride -- Overrides the name of the Secret to use when loading the secretKeyRef for AWS and Azure env variables +secretKeyRefNameOverride: ""