Enable adding annotations to apiservice resources (#865)

Signed-off-by: Jens Hausherr <jens.hausherr@pflege.de>
This commit is contained in:
Jens Hausherr
2026-02-16 09:06:54 +01:00
committed by GitHub
parent 170faf8809
commit 0e52e076c1
3 changed files with 27 additions and 0 deletions
@@ -3,6 +3,13 @@ apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
name: v1beta1.custom.metrics.k8s.io
{{- with .Values.customMetricsApi.annotations }}
annotations:
{{- range $k, $v := . }}
{{- $value := $v | quote }}
{{- printf "%s: %s" (tpl $k $) (tpl $value $) | nindent 4 }}
{{- end }}
{{- end }}
spec:
service:
name: kube-metrics-adapter
@@ -13,3 +20,4 @@ spec:
groupPriorityMinimum: 100
versionPriority: 100
{{- end}}
""
@@ -3,6 +3,13 @@ apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
name: v1beta1.external.metrics.k8s.io
{{- with .Values.externalMetricsApi.annotations }}
annotations:
{{- range $k, $v := . }}
{{- $value := $v | quote }}
{{- printf "%s: %s" (tpl $k $) (tpl $value $) | nindent 4 }}
{{- end }}
{{- end }}
spec:
service:
name: kube-metrics-adapter
+12
View File
@@ -15,7 +15,19 @@ addDirectoryHeader:
contentionProfiling:
profiling:
enableCustomMetricsApi: true
# -- add annotations to the custom metrics apiservice resource, e.g.
# cert-manager.io/inject-ca-from: {{.Release.Namespace}}/kube-metrics-adapter to inject the CA certificate form a cert-manager-issued cert used for the deployment
customMetricsApi:
annotations: {}
enableExternalMetricsApi: true
# -- add annotations to the custom metrics apiservice resource, e.g.
# cert-manager.io/inject-ca-from: {{.Release.Namespace}}/kube-metrics-adapter to inject the CA certificate form a cert-manager-issued cert used for the deployment
externalMetricsApi:
annotations: {}
credentialsDirectory:
disregardIncompatibleHPAs:
http2MaxStreamsPerConnection: