From c2b46c45ff5693a677ea2ff020a3da43cd34f1f0 Mon Sep 17 00:00:00 2001 From: Charles SENGES Date: Fri, 26 Apr 2024 09:49:13 +0200 Subject: [PATCH] chore(chart): add conditional include on optional Deployment schedulerName --- charts/metrics-server/CHANGELOG.md | 1 + charts/metrics-server/templates/deployment.yaml | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/charts/metrics-server/CHANGELOG.md b/charts/metrics-server/CHANGELOG.md index 735a0e369..3a47d15fb 100644 --- a/charts/metrics-server/CHANGELOG.md +++ b/charts/metrics-server/CHANGELOG.md @@ -19,6 +19,7 @@ ### Changed - Updated the _Metrics Server_ OCI image to [v0.7.1](https://github.com/kubernetes-sigs/metrics-server/releases/tag/v0.7.1). ([#1461](https://github.com/kubernetes-sigs/metrics-server/pull/1461)) _@stevehipwell_ +- Changed `Deployment` templating to ignore `schedulerName` when value is empty. ([#1475](https://github.com/kubernetes-sigs/metrics-server/pull/1475)) _@senges_ ## [3.12.0] - 2024-02-07 diff --git a/charts/metrics-server/templates/deployment.yaml b/charts/metrics-server/templates/deployment.yaml index 48cda7feb..dd628f9bd 100644 --- a/charts/metrics-server/templates/deployment.yaml +++ b/charts/metrics-server/templates/deployment.yaml @@ -33,7 +33,9 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} spec: - schedulerName: {{ .Values.schedulerName }} + {{- with .Values.schedulerName }} + schedulerName: {{ . }} + {{- end }} {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }}