Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pkg/controller/feed/reconcile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,9 @@ func getNewStartJob() *batchv1.Job {
},
Spec: batchv1.JobSpec{
Template: corev1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Annotations: map[string]string{"sidecar.istio.io/inject": "false"},
},
Spec: corev1.PodSpec{
Containers: []corev1.Container{{
Name: "feedlet",
Expand Down
9 changes: 8 additions & 1 deletion pkg/controller/feed/resources/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -183,11 +185,16 @@ 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,
Containers: []corev1.Container{
{
corev1.Container{
Name: "feedlet",
Image: source.Spec.Image,
ImagePullPolicy: corev1.PullIfNotPresent,
Expand Down