Skip to content

Commit e6ab860

Browse files
committed
fix(chart): do not render annotations as null in APIService template
Signed-off-by: Julian van den Berkmortel <7153670+Serializator@users.noreply.github.com>
1 parent 415f828 commit e6ab860

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

charts/metrics-server/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
### Fixed
1818

1919
- Conditionally render `insecureSkipTLSVerify` field in APIService template to prevent GitOps sync drift when value is `false`. ([#1727](https://github.com/kubernetes-sigs/metrics-server/pull/1727)) _@pawl_
20+
- Do not render annotations as null in APIService template to prevent permanent OutOfSync in ArgoCD. ([#1752](https://github.com/kubernetes-sigs/metrics-server/pull/1752)) _@Serializator_
2021

2122
## [3.13.0] - 2025-07-22
2223

charts/metrics-server/templates/apiservice.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ metadata:
3838
name: v1beta1.metrics.k8s.io
3939
labels:
4040
{{- include "metrics-server.labels" . | nindent 4 }}
41-
{{- if or .Values.apiService.annotations .Values.tls.certManager.addInjectorAnnotations }}
41+
{{- $includeCertManagerAnnotations := (and .Values.tls.certManager.addInjectorAnnotations (eq .Values.tls.type "cert-manager")) }}
42+
{{- if or .Values.apiService.annotations $includeCertManagerAnnotations }}
4243
annotations:
43-
{{- if and (eq .Values.tls.type "cert-manager") .Values.tls.certManager.addInjectorAnnotations }}
44+
{{- if $includeCertManagerAnnotations }}
4445
cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "metrics-server.fullname" . }}
4546
{{- end }}
4647
{{- with .Values.apiService.annotations }}

0 commit comments

Comments
 (0)