Files
cozystack/packages/apps/http-cache/templates/haproxy/deployment.yaml
Andrei Kvapil 7cd7de73ee Introduce replicas options
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-04-26 15:19:25 +02:00

46 lines
1.2 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-haproxy
labels:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
replicas: {{ .Values.haproxy.replicas }}
selector:
matchLabels:
app: {{ .Release.Name }}-haproxy
template:
metadata:
labels:
app: {{ .Release.Name }}-haproxy
annotations:
checksum/config: {{ include (print $.Template.BasePath "/haproxy/configmap.yaml") . | sha256sum }}
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- {{ .Release.Name }}-haproxy
topologyKey: kubernetes.io/hostname
containers:
- image: haproxy:latest
name: haproxy
ports:
- containerPort: 8080
name: http
volumeMounts:
- mountPath: /usr/local/etc/haproxy
name: config
volumes:
- configMap:
name: {{ .Release.Name }}-haproxy
name: config