charts/charts-wip/matrix-synapse/templates/service.yaml

59 lines
1.4 KiB
YAML
Raw Normal View History

2020-08-07 21:23:34 +00:00
---
apiVersion: v1
kind: Service
metadata:
name: {{ include "matrix-synapse.fullname" . }}
labels:
{{- include "matrix-synapse.labels" . | nindent 4 }}
spec:
type: ClusterIP
ports:
- port: 8008
targetPort: http
protocol: TCP
name: http
selector:
2020-08-08 22:15:10 +00:00
app.kubernetes.io/component: synapse
2020-08-07 21:23:34 +00:00
{{- include "matrix-synapse.selectorLabels" . | nindent 4 }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ include "matrix-synapse.replicationname" . }}
labels:
{{- include "matrix-synapse.labels" . | nindent 4 }}
spec:
type: ClusterIP
ports:
- port: 9093
targetPort: replication
protocol: TCP
name: replication
selector:
{{- include "matrix-synapse.selectorLabels" . | nindent 4 }}
2020-08-08 22:15:10 +00:00
app.kubernetes.io/component: synapse
2020-08-07 21:23:34 +00:00
{{- $default := .Values.workers.default }}
{{- range $worker, $config := .Values.workers }}
{{- if and $config.enabled $config.listeners }}
{{- $name := $worker | replace "_" "-" }}
{{- $release := $.Release.Name }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ include "matrix-synapse.workername" (dict "global" $ "worker" $name) }}
labels:
{{- include "matrix-synapse.labels" $ | nindent 4 }}
spec:
type: ClusterIP
ports:
- port: 8083
targetPort: listener
protocol: TCP
name: listener
selector:
{{- include "matrix-synapse.selectorLabels" $ | nindent 4 }}
2020-08-08 22:15:10 +00:00
app.kubernetes.io/component: {{ $name }}
2020-08-07 21:23:34 +00:00
{{- end }}
{{- end }}