prole/infrastructure/roles/k3s/tasks/kong.yml
chrisfu 765aa0b926 Checkpoint: cluster env UI layout + k3s common services
- Tighten Cluster Environment screen layout; switch Service/Prod to kubectx context selection; keep namespace and key controls on one line; ensure Repair button remains reachable.

- Add UI layout regression test to render with large mock data and assert key widgets remain visible and console is scrollable.

- Make kubeconfig generation deterministic under tests by avoiding overwriting cert-based kubeconfigs; write token sidecar kubeconfig when needed.

- Update common-services init scripts and add k3s/Helm deployment bits (svc-check, Kong/CertMgr tasks).
2026-02-27 14:35:14 -08:00

26 lines
891 B
YAML

---
- name: Check for Kong deployment
ansible.builtin.command: k3s kubectl get deployment {{ k3s_kong_deployment }} -n {{ k3s_kong_namespace }}
register: k3s_kong_deploy
changed_when: false
failed_when: false
run_once: true
- name: Install Kong when missing (common core)
ansible.builtin.shell: |
kubectl config use-context prole-k3s >/dev/null 2>&1 || true
bash {{ playbook_dir }}/../../etc/init_kong.sh -n {{ k3s_kong_namespace }} update
environment:
PROLE_MODE: k3s
KUBECONFIG: "{{ playbook_dir }}/../../prole-k3s.kubeconfig"
delegate_to: localhost
become: false
when: k3s_kong_deploy.rc != 0
run_once: true
- name: Restart Kong to reload declarative config
ansible.builtin.command: k3s kubectl rollout restart deployment/{{ k3s_kong_deployment }} -n {{ k3s_kong_namespace }}
changed_when: true
when: k3s_kong_deploy.rc == 0
run_once: true