From 31776dfe9814e34fd30f7b5d0440cad72de24cdd Mon Sep 17 00:00:00 2001 From: Matt Campbell Date: Mon, 18 Mar 2024 12:52:07 -0400 Subject: [PATCH] FEATURE/MINOR: kubernetes-ingress: Add metrics service-specific metadata (#229) Adds `controller.service.metrics.labels` and `controller.service.metrics.annotations` so that the metrics service can have its metadata templated using metadata not shared by the main service. --- .../templates/controller-service-metrics.yaml | 6 +++--- kubernetes-ingress/values.yaml | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/kubernetes-ingress/templates/controller-service-metrics.yaml b/kubernetes-ingress/templates/controller-service-metrics.yaml index 2c0f52a..7c97cea 100644 --- a/kubernetes-ingress/templates/controller-service-metrics.yaml +++ b/kubernetes-ingress/templates/controller-service-metrics.yaml @@ -40,11 +40,11 @@ metadata: app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/version: {{ .Chart.AppVersion }} -{{- if .Values.controller.service.labels }} -{{ toYaml .Values.controller.service.labels | indent 4 }} +{{- if .Values.controller.service.metrics.labels }} +{{ toYaml .Values.controller.service.metrics.labels | indent 4 }} {{- end }} annotations: -{{- range $key, $value := .Values.controller.service.annotations }} +{{- range $key, $value := .Values.controller.service.metrics.annotations }} {{ $key }}: {{ $value | quote }} {{- end }} spec: diff --git a/kubernetes-ingress/values.yaml b/kubernetes-ingress/values.yaml index b3bdb01..3cd4ffd 100644 --- a/kubernetes-ingress/values.yaml +++ b/kubernetes-ingress/values.yaml @@ -460,6 +460,17 @@ controller: ## ref: https://kubernetes.io/docs/concepts/services-networking/service/ # sessionAffinity: "" + ## Controller Metrics Service configuration + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/ + metrics: + ## Service annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + annotations: {} + + ## Service labels + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + labels: {} + ## Controller DaemonSet configuration ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ daemonset: