pipedv1 kubernetes plugins ignore trafficRouting.istio.host in K8S_TRAFFIC_ROUTING

Abierto Apto para principiantes
#7,626 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

@Dhirenderchoudhary ya está trabajando en esto.

Desde el 14/11/2026.

  • #7635 de @Dhirenderchoudhary — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
Medio día
Aptitud para principiantes
74/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
go, kubernetes
Área
devops

Línea de trabajo

El error está en executeK8sTrafficRoutingStageIstio en kubernetes/deployment/traffic.go y istioTrafficRouting en kubernetes_multicluster/deployment/traffic.go, donde el host pasado a generateVirtualServiceManifest debería provenir de trafficRouting.istio.host y recurrir a spec.service.name. Protege el acceso a la configuración de Istio contra nil de la misma forma que ya lo hace K8S_PRIMARY_ROLLOUT. Está terminado cuando el manifiesto del ejemplo FQDN muestra pesos 70/30 y una configuración sin bloque istio ya no provoca un pánico.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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:

  • piped version: pipedv1, master (87c6da5)
  • control-plane version: -
  • Others: kubernetes and kubernetes_multicluster plugins
Lenguaje dominante
Go
Estrellas
1.4k
Forks
391
Merge medio
4 d 1 h
PR fusionados (30 d)
58

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de pipe-cd/pipecd

Todos los issues de pipe-cd/pipecd

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.