Files
charts/bitnami/nats/templates/client-svc.yaml
Juan Ariza Toledano ab944a997b [bitnami/nats] New major version (#4515)
* [bitnami/nats] New major version

Signed-off-by: juan131 <juanariza@vmware.com>

* Fix linting issues

Signed-off-by: juan131 <juanariza@vmware.com>
2020-11-30 11:06:46 +01:00

32 lines
1.4 KiB
YAML

apiVersion: v1
kind: Service
metadata:
name: {{ printf "%s-client" (include "common.names.fullname" .) }}
namespace: {{ .Release.Namespace }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if or .Values.client.service.annotations .Values.commonAnnotations }}
annotations:
{{- if .Values.client.service.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.client.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.client.service.type }}
{{- if and (eq .Values.client.service.type "LoadBalancer") .Values.client.service.loadBalancerIP }}
loadBalancerIP: {{ .Values.client.service.loadBalancerIP }}
{{- end }}
ports:
- port: {{ .Values.client.service.port }}
targetPort: client
name: client
{{- if and (eq .Values.client.service.type "NodePort") (not (empty .Values.client.service.nodePort)) }}
nodePort: {{ .Values.client.service.nodePort }}
{{- end }}
selector: {{ include "common.labels.matchLabels" . | nindent 4 }}