Skip to content

Commit

Permalink
add EnableServiceEntrySelectPods flag back (istio#37407)
Browse files Browse the repository at this point in the history
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
  • Loading branch information
ramaraochavali committed Feb 17, 2022
1 parent 34f63bc commit 47260b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions pilot/pkg/features/pilot.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,10 @@ var (
"If enabled, pilot will authorize XDS clients, to ensure they are acting only as namespaces they have permissions for.",
).Get()

EnableServiceEntrySelectPods = env.RegisterBoolVar("PILOT_ENABLE_SERVICEENTRY_SELECT_PODS", true,
"If enabled, service entries with selectors will select pods from the cluster. "+
"It is safe to disable it if you are quite sure you don't need this feature").Get()

InjectionWebhookConfigName = env.RegisterStringVar("INJECTION_WEBHOOK_CONFIG_NAME", "istio-sidecar-injector",
"Name of the mutatingwebhookconfiguration to patch, if istioctl is not used.").Get()

Expand Down
2 changes: 1 addition & 1 deletion pilot/pkg/serviceregistry/kube/controller/multicluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func (m *Multicluster) ClusterAdded(cluster *multicluster.Cluster, clusterStopCh
m.m.Unlock()

// TODO move instance cache out of registries
if m.serviceEntryStore != nil {
if m.serviceEntryStore != nil && features.EnableServiceEntrySelectPods {
// Add an instance handler in the kubernetes registry to notify service entry store about pod events
kubeRegistry.AppendWorkloadHandler(m.serviceEntryStore.WorkloadInstanceHandler)
}
Expand Down

0 comments on commit 47260b9

Please sign in to comment.