Skip to content

Commit

Permalink
Fix bug where pods would not be labeled if network policies were disa…
Browse files Browse the repository at this point in the history
…bled but Istio policies were enabled (#343)
  • Loading branch information
orishoshan authored Jan 28, 2024
1 parent cc1edf7 commit 3e4f724
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/operator/controllers/pod_reconcilers/pods.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ func (p *PodWatcher) updateServerSideCar(ctx context.Context, pod v1.Pod, servic
}

func (p *PodWatcher) addOtterizePodLabels(ctx context.Context, req ctrl.Request, serviceID serviceidentity.ServiceIdentity, pod v1.Pod) error {
if !viper.GetBool(operatorconfig.EnableNetworkPolicyKey) {
logrus.Debug("Not labeling new pod since network policy creation is disabled")
if !viper.GetBool(operatorconfig.EnableNetworkPolicyKey) && !viper.GetBool(operatorconfig.EnableIstioPolicyKey) {
logrus.Debug("Not labeling new pod since network policy creation and Istio policy creation is disabled")
return nil
}

Expand Down

0 comments on commit 3e4f724

Please sign in to comment.