diff --git a/infrastructure/networking/traefik/README.md b/infrastructure/networking/traefik/README.md index d9606d4..3901fa9 100644 --- a/infrastructure/networking/traefik/README.md +++ b/infrastructure/networking/traefik/README.md @@ -101,6 +101,15 @@ infrastructure/networking/traefik/ 세 overlay는 모두 Service `NodePort`, `externalTrafficPolicy: Cluster`와 `30080/30443`을 명시적으로 소유한다. +세 overlay는 같은 `resources`도 소유한다: requests `cpu: 50m`·`memory: 64Mi`, +limit `memory: 256Mi`, CPU limit 없음. k3s 기본 Traefik은 requests·limits가 없는 +BestEffort다. 이 노드의 kubelet에는 메모리 축출 문턱이 없어(k3s 기본 `evictionHard`는 +디스크 두 항목뿐) 메모리가 모자라면 커널 OOM killer가 고르는데, BestEffort 컨테이너는 +`oom_score_adj` 1000이라 가장 먼저 죽는다. 모든 공개 경로가 Traefik 하나를 지나므로 +Burstable로 올린다. 2026-11-11 실측 사용량은 CPU 약 5m, +메모리 약 42Mi다. CPU limit은 throttling을 피하려고 두지 않는다. overlay 둘이 +`valuesContent`를 통째로 바꾸므로 값을 바꿀 때는 base와 두 patch를 함께 고친다. + - `baseline`: Service 경계만 남긴다. access log와 forwarded-header trust는 없다. - `observe`: Service 경계와 header를 버리는 JSON access log를 적용한다. trust는 없다. - `trust`: observe 설정에 `web.forwardedHeaders.trustedIPs=10.42.0.1/32`만 추가한다. diff --git a/infrastructure/networking/traefik/base/helm-chart-config.yaml b/infrastructure/networking/traefik/base/helm-chart-config.yaml index 7f778c6..172a8f3 100644 --- a/infrastructure/networking/traefik/base/helm-chart-config.yaml +++ b/infrastructure/networking/traefik/base/helm-chart-config.yaml @@ -14,6 +14,12 @@ spec: prometheus.io/path: /metrics prometheus.io/port: "9100" prometheus.io/scrape: "true" + resources: + requests: + cpu: 50m + memory: 64Mi + limits: + memory: 256Mi service: spec: type: NodePort diff --git a/infrastructure/networking/traefik/overlays/baseline/service-boundary-only-patch.yaml b/infrastructure/networking/traefik/overlays/baseline/service-boundary-only-patch.yaml index 1f5d5de..12169ae 100644 --- a/infrastructure/networking/traefik/overlays/baseline/service-boundary-only-patch.yaml +++ b/infrastructure/networking/traefik/overlays/baseline/service-boundary-only-patch.yaml @@ -6,6 +6,12 @@ prometheus.io/path: /metrics prometheus.io/port: "9100" prometheus.io/scrape: "true" + resources: + requests: + cpu: 50m + memory: 64Mi + limits: + memory: 256Mi service: spec: type: NodePort diff --git a/infrastructure/networking/traefik/overlays/trust/trusted-proxy-cidr-patch.yaml b/infrastructure/networking/traefik/overlays/trust/trusted-proxy-cidr-patch.yaml index df422a3..8eddf3c 100644 --- a/infrastructure/networking/traefik/overlays/trust/trusted-proxy-cidr-patch.yaml +++ b/infrastructure/networking/traefik/overlays/trust/trusted-proxy-cidr-patch.yaml @@ -6,6 +6,12 @@ prometheus.io/path: /metrics prometheus.io/port: "9100" prometheus.io/scrape: "true" + resources: + requests: + cpu: 50m + memory: 64Mi + limits: + memory: 256Mi service: spec: type: NodePort