Files
charts/bitnami/geode/templates/locator/service.yaml
Miguel Ruiz d63c64504c [bitnami/geode] Add missing values and features (#10179)
* [bitnami/geode] Add missing values and features

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Apply suggestions

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>
2022-05-16 10:04:49 +02:00

60 lines
3.1 KiB
YAML

apiVersion: v1
kind: Service
metadata:
name: {{ printf "%s-locator" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: locator
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if or .Values.locator.service.annotations .Values.commonAnnotations }}
annotations:
{{- if .Values.locator.service.annotations }}
{{- include "common.tplvalues.render" (dict "value" .Values.locator.service.annotations "context" $) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
spec:
type: {{ .Values.locator.service.type }}
sessionAffinity: {{ .Values.locator.service.sessionAffinity }}
{{- if .Values.locator.service.sessionAffinityConfig }}
sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.locator.service.sessionAffinityConfig "context" $) | nindent 4 }}
{{- end }}
{{- if and (eq .Values.locator.service.type "ClusterIP") .Values.locator.service.clusterIP }}
clusterIP: {{ .Values.locator.service.clusterIP }}
{{- end }}
{{- if or (eq .Values.locator.service.type "LoadBalancer") (eq .Values.locator.service.type "NodePort") }}
externalTrafficPolicy: {{ .Values.locator.service.externalTrafficPolicy | quote }}
{{- end }}
{{- if and (eq .Values.locator.service.type "LoadBalancer") .Values.locator.service.loadBalancerSourceRanges }}
loadBalancerSourceRanges: {{ .Values.locator.service.loadBalancerSourceRanges }}
{{ end }}
{{- if and (eq .Values.locator.service.type "LoadBalancer") (not (empty .Values.locator.service.loadBalancerIP)) }}
loadBalancerIP: {{ .Values.locator.service.loadBalancerIP }}
{{- end }}
ports:
- name: locator
port: {{ .Values.locator.service.ports.locator }}
targetPort: locator
{{- if and (or (eq .Values.locator.service.type "NodePort") (eq .Values.locator.service.type "LoadBalancer")) (not (empty .Values.locator.service.nodePorts.locator)) }}
nodePort: {{ .Values.locator.service.nodePorts.locator }}
{{- else if eq .Values.locator.service.type "ClusterIP" }}
nodePort: null
{{- end }}
- name: http
port: {{ .Values.locator.service.ports.http }}
targetPort: http
{{- if and (or (eq .Values.locator.service.type "NodePort") (eq .Values.locator.service.type "LoadBalancer")) (not (empty .Values.locator.service.nodePorts.http)) }}
nodePort: {{ .Values.locator.service.nodePorts.http }}
{{- else if eq .Values.locator.service.type "ClusterIP" }}
nodePort: null
{{- end }}
{{- if .Values.locator.service.extraPorts }}
{{- include "common.tplvalues.render" (dict "value" .Values.locator.service.extraPorts "context" $) | nindent 4 }}
{{- end }}
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
app.kubernetes.io/component: locator