prole/deploy/opentofu/k3s/manifests/knoe/kong-deployment.yaml
chrisfu 82c1ff555f fix(k3d): rename prole-svc-kong → knoe-svc-kong, clean up stale resources
k3s manifests still used prole-svc-kong after the rebrand; init_kong.sh
was waiting on `rollout status deployment/knoe-svc-kong` which never
existed, hanging the Common Services milestone.

- Rename kong-deployment.yaml and kong-service.yaml: prole-svc-kong →
  knoe-svc-kong (labels, selector, configmap volume ref)
- Remove prole-svc-kong-configmap.yaml (static file replaced by
  init_kong.sh dynamic ConfigMap generation; hardcoded namespace and
  prole-branded routes were dead weight)
- init_kong.sh: add cleanup_legacy_prole_kong() called from action_update()
  to remove stale prole-era resources before deploying knoe-svc-kong
- init_kong.sh: add _is_host_claimed_by_other_ingress() helper; set
  include_gitea_host=0 for k3d mode (git is port-forward only, no public
  hostname) — keeps the safety-net pre-check for k3s
- actions.py: extend legacy namespace dedupe to sweep prole-svc-kong from
  both default and service_ns

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-03 00:24:02 -07:00

71 lines
1.8 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: knoe-svc-kong
annotations:
argocd.argoproj.io/sync-wave: "1"
labels:
app: knoe-svc-kong
spec:
replicas: 1
selector:
matchLabels:
app: knoe-svc-kong
template:
metadata:
labels:
app: knoe-svc-kong
spec:
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: knoe-svc-kong-config