Skip to content

Commit

Permalink
fixed cilium-operator delete CEC cilium-ingress.
Browse files Browse the repository at this point in the history
[ upstream commit d922109 ]

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 #28638

Signed-off-by: Tobias Klauser <tobias@cilium.io>
Signed-off-by: Tobias Klauser <tobias@isovalent.com>
  • Loading branch information
chaunceyjiang authored and tklauser committed Oct 27, 2023
1 parent 6cbfc19 commit 2515ea6
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 @@ -654,6 +654,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 2515ea6

Please sign in to comment.