Files
DongHyeonka c2a3f75bc3 feat(priority): add platform-critical and platform-low PriorityClasses
Every platform pod runs at priority 0. During the 2026-11-09 disk
eviction the tech-log production pods were ranked with Grafana and
kube-state-metrics. The kubelet ranks evictions by usage over requests
and then by priority, so without classes the database and the
production app have no head start.

Add two classes and attach nothing yet: platform-critical (1000000,
may preempt) for platform-postgres, Gitea, Keycloak and tech-log, and
platform-low (-1000, never preempts) for Grafana, pgAdmin, Loki and
Tempo. Neither is the global default, so no pod changes silently.

Risk: creating the classes changes no pod. Attaching them restarts the
pods, so that is left for the k3s restart window.

Verification: render-tenants-and-policies.sh (added later in this
series) checks the values, the preemption policy and globalDefault.
2026-11-12 00:28:57 +09:00

1.1 KiB

플랫폼 PriorityClass

노드가 한 대라 자원이 모자라면 kubelet이 파드를 내보낸다. 내보낼 순서는 requests를 넘었는지, 그다음 우선순위로 정한다. 2026-11-09 디스크 축출 때 플랫폼 파드는 모두 우선순위 0이라 tech-log 운영 파드가 Grafana·kube-state-metrics와 같은 순위로 나갔다.

이름 값 선점 붙일 곳
platform-critical 1000000 낮은 것을 선점 platform-postgres, Gitea, Keycloak, tech-log
platform-low -1000 선점 안 함 Grafana, pgAdmin, Loki, Tempo
  • 아무것도 안 붙인 파드는 기본값 0이다. 시스템 클래스(system-*, 20억)는 그대로 가장 높다.
  • globalDefault는 둘 다 끈다. 새 파드가 모르게 우선순위를 얻지 않게 하려는 것이다.
  • 클래스를 만드는 것은 아무 파드도 바꾸지 않는다. 붙이는 것은 파드 재시작을 부르므로 k3s 재시작 창에 한다(infrastructure/host/k3s/README.md).
kubectl apply -k services/priority-classes
kubectl get priorityclass platform-critical platform-low