Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Kubernetes: document the preStop drain on both Deployments (template #148)

Đã đóng Phù hợp với người mới
#209 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
82/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
helm, kubernetes
Lĩnh vực
devops, documentation

Hướng nghiên cứu

Đọc phần Rolling Updates trong content/6.deployment/2.kubernetes.md và so sánh với helm/cwa/templates/pwa-deployment.yaml và helm/cwa/templates/deployment.yaml, sử dụng commit template 4932989 làm ngữ cảnh. Ghi lại hành vi preStop 5 giây trên cả hai Deployments, lý do nó ngăn các lỗi 502 trong thời gian ngắn và những trường hợp được nêu cần một hook tương đương. Hoàn tất khi phần này giải thích chính xác các điểm đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Template commit https://github.com/components-web-app/components-web-app/commit/4932989bca167be2102adce72655f14e4523417d (components-web-app#148) changed how pods stop during a rollout:

  • helm/cwa/templates/pwa-deployment.yaml: the PWA container now has lifecycle.preStop /bin/sh -c 'sleep 5', so an old SSR pod keeps serving while its endpoint is removed from the Service; Nitro then drains in-flight requests on SIGTERM. Without it, Nitro closed its listener at once and the API's Caddy got connection refused (502) from pods that were still endpoints.
  • helm/cwa/templates/deployment.yaml: the API's preStop sleeps 5s (was 1s) before kill -QUIT 1, the same cover on the ingress side.
  • Both keep the default 30s terminationGracePeriodSeconds.

Page to update: content/6.deployment/2.kubernetes.md, section Rolling Updates (around line 418). It says old pods keep serving while new ones start, but nothing about how pods stop. Suggested addition: a short paragraph on the preStop drain (both Deployments, 5s, why), and that a site which edits these templates, or uses a PWA image without /bin/sh, must keep an equivalent preStop or deploys will briefly 502.

Ngôn ngữ chính
Vue
Star
0
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của components-web-app/docs

Tất cả issue của components-web-app/docs

Issue tương tự

Thêm issue về DevOps

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.