mirror of
https://github.com/rocky-linux/peridot.git
synced 2024-12-19 01:18:30 +00:00
80 lines
2.8 KiB
YAML
80 lines
2.8 KiB
YAML
|
{{- if $.Values.server.enabled }}
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: {{ include "temporal.componentname" (list . "frontend") }}
|
||
|
labels:
|
||
|
app.kubernetes.io/name: {{ include "temporal.name" . }}
|
||
|
helm.sh/chart: {{ include "temporal.chart" . }}
|
||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||
|
app.kubernetes.io/version: {{ .Chart.AppVersion | replace "+" "_" }}
|
||
|
app.kubernetes.io/component: frontend
|
||
|
app.kubernetes.io/part-of: {{ .Chart.Name }}
|
||
|
{{- if .Values.server.frontend.service.annotations }}
|
||
|
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.server.frontend.service.annotations "context" $) | nindent 4 }}
|
||
|
{{- end }}
|
||
|
spec:
|
||
|
type: {{ .Values.server.frontend.service.type }}
|
||
|
ports:
|
||
|
- port: {{ .Values.server.frontend.service.port }}
|
||
|
targetPort: rpc
|
||
|
protocol: TCP
|
||
|
name: grpc-rpc
|
||
|
{{- if hasKey .Values.server.frontend.service "nodePort" }}
|
||
|
nodePort: {{ .Values.server.frontend.service.nodePort }}
|
||
|
{{- end }}
|
||
|
selector:
|
||
|
app.kubernetes.io/name: {{ include "temporal.name" . }}
|
||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||
|
app.kubernetes.io/component: frontend
|
||
|
|
||
|
---
|
||
|
{{- range $service := (list "frontend" "matching" "history" "worker") }}
|
||
|
{{- $serviceValues := index $.Values.server $service -}}
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: {{ include "temporal.componentname" (list $ (printf "%s-headless" $service)) }}
|
||
|
labels:
|
||
|
app.kubernetes.io/name: {{ include "temporal.name" $ }}
|
||
|
helm.sh/chart: {{ include "temporal.chart" $ }}
|
||
|
app.kubernetes.io/managed-by: {{ $.Release.Service }}
|
||
|
app.kubernetes.io/instance: {{ $.Release.Name }}
|
||
|
app.kubernetes.io/version: {{ $.Chart.AppVersion | replace "+" "_" }}
|
||
|
app.kubernetes.io/component: {{ $service }}
|
||
|
app.kubernetes.io/part-of: {{ $.Chart.Name }}
|
||
|
app.kubernetes.io/headless: 'true'
|
||
|
prometheus.io/job: {{ $.Chart.Name }}-{{ $service }}
|
||
|
prometheus.io/scrape: 'true'
|
||
|
prometheus.io/scheme: http
|
||
|
prometheus.io/port: "9090"
|
||
|
|
||
|
annotations:
|
||
|
# Use this annotation in addition to the actual field below because the
|
||
|
# annotation will stop being respected soon but the field is broken in
|
||
|
# some versions of Kubernetes:
|
||
|
# https://github.com/kubernetes/kubernetes/issues/58662
|
||
|
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
|
||
|
spec:
|
||
|
type: ClusterIP
|
||
|
clusterIP: None
|
||
|
publishNotReadyAddresses: true
|
||
|
ports:
|
||
|
- port: {{ $serviceValues.service.port }}
|
||
|
targetPort: rpc
|
||
|
protocol: TCP
|
||
|
name: grpc-rpc
|
||
|
- port: 9090
|
||
|
targetPort: metrics
|
||
|
protocol: TCP
|
||
|
name: metrics
|
||
|
selector:
|
||
|
app.kubernetes.io/name: {{ include "temporal.name" $ }}
|
||
|
app.kubernetes.io/instance: {{ $.Release.Name }}
|
||
|
app.kubernetes.io/component: {{ $service }}
|
||
|
|
||
|
---
|
||
|
{{- end }}
|
||
|
{{- end }}
|