From d9332ba6592812a836c19002049ed835ac2a9c25 Mon Sep 17 00:00:00 2001 From: ialidzhikov Date: Fri, 18 Aug 2023 12:30:29 +0300 Subject: [PATCH] Make the `gardener-extension-registry-cache-admission` Service topology-aware Similar to https://github.com/gardener/gardener-extension-provider-aws/pull/732 and https://github.com/gardener/gardener-extension-provider-aws/pull/750 --- .../admission/charts/runtime/templates/service.yaml | 11 +++++++++++ charts/admission/values.yaml | 3 +++ 2 files changed, 14 insertions(+) diff --git a/charts/admission/charts/runtime/templates/service.yaml b/charts/admission/charts/runtime/templates/service.yaml index fd76ba72..49225591 100644 --- a/charts/admission/charts/runtime/templates/service.yaml +++ b/charts/admission/charts/runtime/templates/service.yaml @@ -3,8 +3,19 @@ kind: Service metadata: name: {{ include "name" . }} namespace: {{ .Release.Namespace }} + annotations: + {{- if .Values.global.service.topologyAwareRouting.enabled }} + {{- if semverCompare ">= 1.27-0" .Capabilities.KubeVersion.GitVersion }} + service.kubernetes.io/topology-mode: "auto" + {{- else }} + service.kubernetes.io/topology-aware-hints: "auto" + {{- end }} + {{- end }} labels: {{ include "labels" . | indent 4 }} + {{- if .Values.global.service.topologyAwareRouting.enabled }} + endpoint-slice-hints.resources.gardener.cloud/consider: "true" + {{- end }} spec: type: ClusterIP selector: diff --git a/charts/admission/values.yaml b/charts/admission/values.yaml index bbbbaa42..5dcc79a8 100644 --- a/charts/admission/values.yaml +++ b/charts/admission/values.yaml @@ -41,3 +41,6 @@ global: enabled: false expirationSeconds: 43200 audience: "" + service: + topologyAwareRouting: + enabled: false