From 64f984f1dd2557c51ba448fe6201d5f067a51ba3 Mon Sep 17 00:00:00 2001 From: Marcel Boehm Date: Wed, 23 Oct 2024 07:56:59 +0200 Subject: [PATCH] Add Service in order to generate correct NetworkPolicies (#8) --- .../templates/service.yaml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 charts/gardener-extension-backup-s3/templates/service.yaml diff --git a/charts/gardener-extension-backup-s3/templates/service.yaml b/charts/gardener-extension-backup-s3/templates/service.yaml new file mode 100644 index 0000000..327abe0 --- /dev/null +++ b/charts/gardener-extension-backup-s3/templates/service.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "name" . }} + namespace: {{ .Release.Namespace }} + annotations: + networking.resources.gardener.cloud/from-all-seed-scrape-targets-allowed-ports: '[{"port":{{ .Values.metricsPort }},"protocol":"TCP"}]' + networking.resources.gardener.cloud/namespace-selectors: '[{"matchLabels":{"kubernetes.io/metadata.name":"garden"}}]' + networking.resources.gardener.cloud/pod-label-selector-namespace-alias: extensions +{{- if .Values.ignoreResources }} + resources.gardener.cloud/ignore: "true" +{{- end }} + labels: +{{ include "labels" . | indent 4 }} +spec: + type: ClusterIP + selector: +{{ include "labels" . | indent 6 }} + ports: + - name: metrics + port: {{ .Values.metricsPort }} + targetPort: {{ .Values.metricsPort }} + protocol: TCP