diff --git a/charts/substrate-telemetry/Chart.yaml b/charts/substrate-telemetry/Chart.yaml index fdd172ea..1f3fcc5e 100644 --- a/charts/substrate-telemetry/Chart.yaml +++ b/charts/substrate-telemetry/Chart.yaml @@ -15,7 +15,7 @@ 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: 2.0.0 +version: "2.0.1" # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/substrate-telemetry/templates/core-service.yaml b/charts/substrate-telemetry/templates/core-service.yaml index 4b6b511d..5c4696bf 100644 --- a/charts/substrate-telemetry/templates/core-service.yaml +++ b/charts/substrate-telemetry/templates/core-service.yaml @@ -9,6 +9,24 @@ metadata: {{- toYaml .Values.service.core.annotations | nindent 4 }} spec: type: {{ .Values.service.core.type }} +{{- if (and (eq .Values.service.core.type "ClusterIP") (not (empty .Values.service.core.clusterIP))) }} + clusterIP: {{ .Values.service.clusterIP }} +{{- end }} +{{- if (and (eq .Values.service.core.type "LoadBalancer") (not (empty .Values.service.core.loadBalancerIP))) }} + loadBalancerIP: {{ .Values.service.core.loadBalancerIP }} +{{- end }} +{{- if (and (or (eq .Values.service.core.type "LoadBalancer") (eq .Values.service.core.type "NodePort")) (not (empty .Values.service.core.externalTrafficPolicy))) }} + externalTrafficPolicy: {{ .Values.service.core.externalTrafficPolicy }} +{{- end }} +{{- if (and (or (eq .Values.service.core.type "LoadBalancer") (eq .Values.service.core.type "NodePort")) (not (empty .Values.service.core.sessionAffinity))) }} + sessionAffinity: {{ .Values.service.core.sessionAffinity }} +{{- end }} +{{- if .Values.service.core.loadBalancerSourceRanges }} + loadBalancerSourceRanges: + {{- range $cidr := .Values.service.core.loadBalancerSourceRanges }} + - {{ $cidr }} + {{- end }} +{{- end }} ports: - port: {{ .Values.service.core.port }} targetPort: {{ .Values.service.core.targetPort }} diff --git a/charts/substrate-telemetry/templates/frontend-service.yaml b/charts/substrate-telemetry/templates/frontend-service.yaml index f8ec67a6..ca8ff40b 100644 --- a/charts/substrate-telemetry/templates/frontend-service.yaml +++ b/charts/substrate-telemetry/templates/frontend-service.yaml @@ -9,6 +9,24 @@ metadata: {{- toYaml .Values.service.frontend.annotations | nindent 4 }} spec: type: {{ .Values.service.frontend.type }} +{{- if (and (eq .Values.service.frontend.type "ClusterIP") (not (empty .Values.service.frontend.clusterIP))) }} + clusterIP: {{ .Values.service.clusterIP }} +{{- end }} +{{- if (and (eq .Values.service.frontend.type "LoadBalancer") (not (empty .Values.service.frontend.loadBalancerIP))) }} + loadBalancerIP: {{ .Values.service.frontend.loadBalancerIP }} +{{- end }} +{{- if (and (or (eq .Values.service.frontend.type "LoadBalancer") (eq .Values.service.frontend.type "NodePort")) (not (empty .Values.service.frontend.externalTrafficPolicy))) }} + externalTrafficPolicy: {{ .Values.service.frontend.externalTrafficPolicy }} +{{- end }} +{{- if (and (or (eq .Values.service.frontend.type "LoadBalancer") (eq .Values.service.frontend.type "NodePort")) (not (empty .Values.service.frontend.sessionAffinity))) }} + sessionAffinity: {{ .Values.service.frontend.sessionAffinity }} +{{- end }} +{{- if .Values.service.frontend.loadBalancerSourceRanges }} + loadBalancerSourceRanges: + {{- range $cidr := .Values.service.frontend.loadBalancerSourceRanges }} + - {{ $cidr }} + {{- end }} +{{- end }} ports: - port: {{ .Values.service.frontend.port }} targetPort: {{ .Values.service.frontend.targetPort }} diff --git a/charts/substrate-telemetry/templates/shard-service.yaml b/charts/substrate-telemetry/templates/shard-service.yaml index da3f4614..06336333 100644 --- a/charts/substrate-telemetry/templates/shard-service.yaml +++ b/charts/substrate-telemetry/templates/shard-service.yaml @@ -10,6 +10,24 @@ metadata: spec: type: {{ .Values.service.shard.type }} +{{- if (and (eq .Values.service.shard.type "ClusterIP") (not (empty .Values.service.shard.clusterIP))) }} + clusterIP: {{ .Values.service.clusterIP }} +{{- end }} +{{- if (and (eq .Values.service.shard.type "LoadBalancer") (not (empty .Values.service.shard.loadBalancerIP))) }} + loadBalancerIP: {{ .Values.service.shard.loadBalancerIP }} +{{- end }} +{{- if (and (or (eq .Values.service.shard.type "LoadBalancer") (eq .Values.service.shard.type "NodePort")) (not (empty .Values.service.shard.externalTrafficPolicy))) }} + externalTrafficPolicy: {{ .Values.service.shard.externalTrafficPolicy }} +{{- end }} +{{- if (and (or (eq .Values.service.shard.type "LoadBalancer") (eq .Values.service.shard.type "NodePort")) (not (empty .Values.service.shard.sessionAffinity))) }} + sessionAffinity: {{ .Values.service.shard.sessionAffinity }} +{{- end }} +{{- if .Values.service.shard.loadBalancerSourceRanges }} + loadBalancerSourceRanges: + {{- range $cidr := .Values.service.shard.loadBalancerSourceRanges }} + - {{ $cidr }} + {{- end }} +{{- end }} ports: - port: {{ .Values.service.shard.port }} targetPort: {{ .Values.service.shard.targetPort }} diff --git a/charts/substrate-telemetry/values.yaml b/charts/substrate-telemetry/values.yaml index 8a9cb36d..8ea418ff 100644 --- a/charts/substrate-telemetry/values.yaml +++ b/charts/substrate-telemetry/values.yaml @@ -69,20 +69,26 @@ service: type: ClusterIP port: 80 targetPort: 8000 - # nodePort: 31000 annotations: {} + # nodePort: 31000 + # externalTrafficPolicy: Cluster + # sessionAffinity: None core: type: ClusterIP port: 80 targetPort: 8000 - # nodePort: 31000 annotations: {} + # nodePort: 31000 + # externalTrafficPolicy: Cluster + # sessionAffinity: None frontend: type: ClusterIP port: 80 targetPort: 8000 - # nodePort: 31000 annotations: {} + # nodePort: 31000 + # externalTrafficPolicy: Cluster + # sessionAffinity: None ingress: shard: