Files
cozystack/packages/apps/http-cache/templates/haproxy/service.yaml
T
Timofei Larkin 917a6f354d [platform] Autodetect RobotLB
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>
2025-07-24 18:55:30 +03:00

24 lines
607 B
YAML

---
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}-haproxy
labels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
type: {{ ternary "LoadBalancer" "ClusterIP" .Values.external }}
{{- if .Values.external }}
externalTrafficPolicy: Local
{{- if (include "cozy-lib.network.disableLoadBalancerNodePorts" $ | fromYaml) }}
allocateLoadBalancerNodePorts: false
{{- end }}
{{- end }}
selector:
app: {{ .Release.Name }}-haproxy
ports:
- name: http
protocol: TCP
port: 80
targetPort: http