Skip to content

Commit

Permalink
fixed cilium-operator delete CEC cilium-ingress.
Browse files Browse the repository at this point in the history
When the ingress controller is in shared mode, we create an ingress resources with an ingressclass does not belong to cilium, the ciliumEnvoyConfig resource in kube-system called cilium-ingress is deleted making all ingress routing by cilium fail.

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

Fixes cilium#28638
  • Loading branch information
chaunceyjiang authored and joestringer committed Oct 20, 2023
1 parent 83cafbb commit d922109
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions operator/pkg/ingress/ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,10 @@ func (ic *Controller) isEffectiveLoadbalancerModeDedicated(ing *slim_networkingv
}

func (ic *Controller) garbageCollectOwnedResources(ing *slim_networkingv1.Ingress) error {
// When the Ingress is in shared mode, shared resources cannot be deleted.
if !ic.isEffectiveLoadbalancerModeDedicated(ing) {
return nil
}
cec, svc, ep, err := ic.regenerate(ing, false)
if err != nil {
return err
Expand Down

0 comments on commit d922109

Please sign in to comment.