From 5fb5cd40f9d413057d9c67bb0dfa15b0a7d4ff54 Mon Sep 17 00:00:00 2001 From: Chris Marslender Date: Thu, 2 May 2024 14:31:05 -0700 Subject: [PATCH] Split metrics/local service types in values (#47) * Split metrics/local service types in values * Add external traffic policy option --- charts/chia-blockchain/Chart.yaml | 2 +- charts/chia-blockchain/templates/service-local.yaml | 2 +- charts/chia-blockchain/templates/service-metrics.yaml | 2 +- charts/chia-blockchain/templates/service.yaml | 3 +++ charts/chia-blockchain/values.yaml | 7 +++++++ 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/charts/chia-blockchain/Chart.yaml b/charts/chia-blockchain/Chart.yaml index 7e85892..fcf7204 100644 --- a/charts/chia-blockchain/Chart.yaml +++ b/charts/chia-blockchain/Chart.yaml @@ -15,4 +15,4 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.6.1 +version: 0.7.0 diff --git a/charts/chia-blockchain/templates/service-local.yaml b/charts/chia-blockchain/templates/service-local.yaml index a5aaf03..f99a5bb 100644 --- a/charts/chia-blockchain/templates/service-local.yaml +++ b/charts/chia-blockchain/templates/service-local.yaml @@ -5,7 +5,7 @@ metadata: labels: {{- include "chia-blockchain.labels" . | nindent 4 }} spec: - type: {{ .Values.service.type }} + type: {{ .Values.localService.type }} internalTrafficPolicy: Local ports: - port: {{ .Values.chia.daemonPort }} diff --git a/charts/chia-blockchain/templates/service-metrics.yaml b/charts/chia-blockchain/templates/service-metrics.yaml index 612e392..7c5316b 100644 --- a/charts/chia-blockchain/templates/service-metrics.yaml +++ b/charts/chia-blockchain/templates/service-metrics.yaml @@ -9,7 +9,7 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: - type: {{ .Values.service.type }} + type: {{ .Values.metricsService.type }} ports: - port: 9914 targetPort: metrics diff --git a/charts/chia-blockchain/templates/service.yaml b/charts/chia-blockchain/templates/service.yaml index 8f2bbc8..9b6ff14 100644 --- a/charts/chia-blockchain/templates/service.yaml +++ b/charts/chia-blockchain/templates/service.yaml @@ -6,6 +6,9 @@ metadata: {{- include "chia-blockchain.labels" . | nindent 4 }} spec: type: {{ .Values.service.type }} + {{- if .Values.service.externalTrafficPolicy }} + externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }} + {{- end }} ports: - port: {{ .Values.chia.daemonPort }} targetPort: daemon diff --git a/charts/chia-blockchain/values.yaml b/charts/chia-blockchain/values.yaml index d520281..9e5a616 100644 --- a/charts/chia-blockchain/values.yaml +++ b/charts/chia-blockchain/values.yaml @@ -132,6 +132,13 @@ chiaExporter: service: type: ClusterIP + externalTrafficPolicy: "" + +localService: + type: ClusterIP + +metricsService: + type: ClusterIP resources: {} # We usually recommend not to specify default resources and to leave this as a conscious