Files
infra-prod/deploy/rocket-chat/charts/nats/templates/service.yaml
2025-04-03 15:16:10 +02:00

74 lines
1.8 KiB
YAML

---
apiVersion: v1
kind: Service
metadata:
name: {{ include "nats.fullname" . }}
namespace: {{ include "nats.namespace" . }}
labels:
{{- include "nats.labels" . | nindent 4 }}
{{- if .Values.serviceAnnotations}}
annotations:
{{- toYaml .Values.serviceAnnotations | nindent 4 }}
{{- end }}
spec:
selector:
{{- include "nats.selectorLabels" . | nindent 4 }}
clusterIP: None
publishNotReadyAddresses: true
{{- if .Values.topologyKeys }}
topologyKeys:
{{- toYaml .Values.topologyKeys | nindent 4 }}
{{- end }}
ports:
{{- if .Values.websocket.enabled }}
- name: websocket
port: {{ .Values.websocket.port }}
{{- if .Values.appProtocol.enabled }}
appProtocol: tcp
{{- end }}
{{- end }}
{{- if .Values.nats.profiling.enabled }}
- name: profiling
port: {{ .Values.nats.profiling.port }}
{{- if .Values.appProtocol.enabled }}
appProtocol: http
{{- end }}
{{- end }}
- name: {{ .Values.nats.client.portName }}
port: {{ .Values.nats.client.port }}
{{- if .Values.appProtocol.enabled }}
appProtocol: tcp
{{- end }}
- name: cluster
port: 6222
{{- if .Values.appProtocol.enabled }}
appProtocol: tcp
{{- end }}
- name: monitor
port: 8222
{{- if .Values.appProtocol.enabled }}
appProtocol: http
{{- end }}
- name: metrics
port: 7777
{{- if .Values.appProtocol.enabled }}
appProtocol: http
{{- end }}
- name: leafnodes
port: {{ .Values.leafnodes.port }}
{{- if .Values.appProtocol.enabled }}
appProtocol: tcp
{{- end }}
- name: gateways
port: {{ .Values.gateway.port }}
{{- if .Values.appProtocol.enabled }}
appProtocol: tcp
{{- end }}
{{- if .Values.mqtt.enabled }}
- name: mqtt
port: 1883
{{- if .Values.appProtocol.enabled }}
appProtocol: tcp
{{- end }}
{{- end }}