Skip to content

Commit

Permalink
fixed cilium-operator delete CEC cilium-ingress when other ingresscla…
Browse files Browse the repository at this point in the history
…ss resources are created

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>

Fixes #28638
  • Loading branch information
chaunceyjiang committed Oct 17, 2023
1 parent d7b50cc commit 6b3ce74
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion operator/pkg/ingress/ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,8 @@ func (ic *Controller) garbageCollectOwnedResources(ing *slim_networkingv1.Ingres
return err
}

if cec != nil {
if cec != nil && ic.isEffectiveLoadbalancerModeDedicated(ing) {
// When the `ingress controller` is in shared mode, shared CEC cannot be deleted.
if err := deleteObjectIfExists(cec, ic.envoyConfigManager.getByKey, ic.clientset.CiliumV2().CiliumEnvoyConfigs(cec.GetNamespace()).Delete); err != nil {
return err
}
Expand Down

0 comments on commit 6b3ce74

Please sign in to comment.