From 0a543e1793299aa3e95657441da62580127f12e6 Mon Sep 17 00:00:00 2001 From: Remi Rampin Date: Wed, 30 Oct 2024 11:06:22 -0400 Subject: [PATCH] Allow selecting the service's ClusterIP (#375) This is mostly useful to be able to set it to "None", creating a headless service that can be scraped using DNS discovery (dns_sd_configs). Signed-off-by: Remi Rampin --- deployment/templates/service.yaml | 3 +++ deployment/values.yaml | 1 + 2 files changed, 4 insertions(+) diff --git a/deployment/templates/service.yaml b/deployment/templates/service.yaml index 0ea2e34a..ac142fb3 100644 --- a/deployment/templates/service.yaml +++ b/deployment/templates/service.yaml @@ -27,6 +27,9 @@ metadata: {{- end }} spec: type: {{ .Values.service.type }} + {{- if eq .Values.service.type "ClusterIP" }} + clusterIP: {{ .Values.service.clusterIP | quote }} + {{- end }} ports: - name: "metrics" port: {{ .Values.service.port }} diff --git a/deployment/values.yaml b/deployment/values.yaml index 6ed07443..8a81d661 100644 --- a/deployment/values.yaml +++ b/deployment/values.yaml @@ -93,6 +93,7 @@ service: # When enabled, the helm chart will create service enable: true type: ClusterIP + clusterIP: "" port: 9400 address: ":9400" # Annotations to add to the service