diff --git a/pkg/controller/feed/resources/job.go b/pkg/controller/feed/resources/job.go index f3022ba8a37..c2dcfb0a443 100644 --- a/pkg/controller/feed/resources/job.go +++ b/pkg/controller/feed/resources/job.go @@ -38,6 +38,8 @@ const ( OperationStartFeed Operation = "START" // OperationStopFeed specifies a feed should be stopped OperationStopFeed = "STOP" + // istio side car injection annotation + sidecarIstioInjectAnnotation = "sidecar.istio.io/inject" ) // EnvVar specifies the names of the environment variables passed to the @@ -183,6 +185,11 @@ func makePodTemplate(feed *feedsv1alpha1.Feed, source *feedsv1alpha1.EventSource } return &corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + // don't inject Istio sidecar + // so if the feed can to access external services during StartFeed/StopFeed + Annotations: map[string]string{sidecarIstioInjectAnnotation: "false"}, + }, Spec: corev1.PodSpec{ ServiceAccountName: feed.Spec.ServiceAccountName, RestartPolicy: corev1.RestartPolicyNever,