mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-01-27 18:18:41 +00:00
If running in Hetzner and using Hetzner's cloud load balancers, node ports need to be allocated for the load balancer to function correctly. Therefore if RobotLB is enabled, we probably need to assign node ports. Release note: [platform] Autodetect if node ports should be assigned to load balancer services. Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
21 lines
518 B
YAML
21 lines
518 B
YAML
{{- if .Values.external }}
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ .Release.Name }}-external-write
|
|
spec:
|
|
type: {{ ternary "LoadBalancer" "ClusterIP" .Values.external }}
|
|
{{- if .Values.external }}
|
|
externalTrafficPolicy: Local
|
|
{{- if (include "cozy-lib.network.disableLoadBalancerNodePorts" $ | fromYaml) }}
|
|
allocateLoadBalancerNodePorts: false
|
|
{{- end }}
|
|
{{- end }}
|
|
ports:
|
|
- name: postgres
|
|
port: 5432
|
|
selector:
|
|
cnpg.io/cluster: {{ .Release.Name }}
|
|
role: primary
|
|
{{- end }}
|