prole/deploy/opentofu/k3s/manifests/knoe/kong-deployment.yaml

89 lines
2.5 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: prole-svc-kong
annotations:
argocd.argoproj.io/sync-wave: "1"
labels:
app: prole-svc-kong
spec:
replicas: 1
selector:
matchLabels:
app: prole-svc-kong
template:
metadata:
labels:
app: prole-svc-kong
spec:
affinity:
nodeAffinity:
# Never schedule on pi.prole.org — pihole-FTL owns ports 80/443 there
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: NotIn
values:
- pi.prole.org
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 80
preference:
matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- gandalf.prole.org
containers:
- name: kong
image: kong:3.9
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8000
name: proxy
- containerPort: 8001
name: admin
- containerPort: 3022
name: ssh-proxy
env:
- name: KONG_DATABASE
value: "off"
- name: KONG_PROXY_LISTEN
value: "0.0.0.0:8000"
- name: KONG_ADMIN_LISTEN
value: "0.0.0.0:8001"
- name: KONG_STREAM_LISTEN
value: "0.0.0.0:3022 reuseport backlog=16384"
- name: KONG_DECLARATIVE_CONFIG
value: "/etc/kong/declarative/kong.yml"
- name: KONG_NGINX_WORKER_PROCESSES
value: "1"
- name: KONG_MEM_CACHE_SIZE
value: "64m"
volumeMounts:
- name: kong-config
mountPath: /etc/kong/declarative
readinessProbe:
httpGet:
path: /status
port: admin
initialDelaySeconds: 5
periodSeconds: 10
livenessProbe:
httpGet:
path: /status
port: admin
initialDelaySeconds: 10
periodSeconds: 30
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 500m
memory: 1Gi
volumes:
- name: kong-config
configMap:
name: prole-svc-kong-config