pipedv1 kubernetes plugins ignore trafficRouting.istio.host in K8S_TRAFFIC_ROUTING
Maintainer thường phản hồi trong vòng 2 ngày
@Dhirenderchoudhary đang làm issue này rồi.
Từ ngày 14/11/2026.
- #7635 của @Dhirenderchoudhary — đang mở
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 74/100
Hướng nghiên cứu
Lỗi nằm ở executeK8sTrafficRoutingStageIstio trong kubernetes/deployment/traffic.go và istioTrafficRouting trong kubernetes_multicluster/deployment/traffic.go, nơi host truyền vào generateVirtualServiceManifest cần lấy từ trafficRouting.istio.host và dùng spec.service.name làm phương án dự phòng. Hãy bảo vệ việc truy cập cấu hình Istio khỏi nil theo cách K8S_PRIMARY_ROLLOUT đã làm. Hoàn thành khi manifest của ví dụ FQDN hiển thị trọng số 70/30 và một cấu hình không có khối istio không còn gây panic.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happened:
In the pipedv1 kubernetes and kubernetes_multicluster plugins, the Istio path of K8S_TRAFFIC_ROUTING doesn't read trafficRouting.istio.host ("The service host" in the config reference). It always passes spec.service.name to generateVirtualServiceManifest as the host (executeK8sTrafficRoutingStageIstio in kubernetes/deployment/traffic.go, istioTrafficRouting in kubernetes_multicluster/deployment/traffic.go).
So when the VirtualService routes to a host that isn't the bare service name, e.g. the FQDN used in examples/v0/kubernetes/mesh-istio-canary (istio.host set, no service), the existing route is treated as another host. It keeps 100% of the traffic and a destination without a host is added, while the stage log says primary=70%, canary=30%.
The same line reads cfg.Spec.TrafficRouting.Istio.EditableRoutes without a nil check, so trafficRouting: {method: istio} without an istio: block panics. K8S_PRIMARY_ROLLOUT already handles a missing istio block.
What you expected to happen:
istio.host is used when it's set, falling back to the service name otherwise, and a missing istio block is treated as empty.
How to reproduce it:
App config with:
trafficRouting:
method: istio
istio:
host: traffic-test.default.svc.cluster.local
and a VirtualService whose route destination host is traffic-test.default.svc.cluster.local, then run K8S_TRAFFIC_ROUTING with canary: 30. Calling generateVirtualServiceManifest with the host the stage passes today ("") vs the configured one gives:
host="" ->
- destination:
subset: primary
- destination:
host: traffic-test.default.svc.cluster.local
subset: primary
weight: 100
host="traffic-test.default.svc.cluster.local" ->
- destination: {host: traffic-test.default.svc.cluster.local, subset: primary}
weight: 70
- destination: {host: traffic-test.default.svc.cluster.local, subset: canary}
weight: 30
Environment:
pipedversion: pipedv1, master (87c6da5)control-planeversion: -- Others:
kubernetesandkubernetes_multiclusterplugins
- Ngôn ngữ chính
- Go
- Star
- 1.4k
- Fork
- 391
- Merge trung bình
- 4 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 58
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của pipe-cd/pipecd
-
Applications at the repository root are not triggered by new commitsCó thể đã có người làm @Daksha1611 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 2 ngày
-
pipectl transfer restore application drops backed-up labelsCó thể đã có người làm @bhavishyajain545 đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
pipe-cd/pipecd#7622 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của pipe-cd/pipecd
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
docker-compose: postgres healthcheck should probe TCP (pg_isready -h localhost)Có thể đã có người làm @zezo-mohamed22 đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
OneBusAway/watchdog#305 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
self-care self-care:agent-discoverability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
githubnext/gh-cao#20928 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
automation documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
SocialGouv/iterion#3287 ·
Maintainer thường phản hồi trong vòng 1 ngày