antrea
antrea copied to clipboard
Record Status when EgressIP is not available on any Node incase of static Egress
Describe the problem/challenge you have In case of static egress, sometimes user may provide EgressIP which isn't assigned to any Node by mistake or EgressIP was later removed from the assigned Node. Currently, there is no useful info for troubleshooting this.
kubectl get egress
NAME EGRESSIP AGE NODE
egress-static 2m16s
kubectl describe egress egress-static
Name: egress-static
Namespace:
Labels: app=egress
Annotations: <none>
API Version: crd.antrea.io/v1beta1
Kind: Egress
Metadata:
Creation Timestamp: 2024-04-16T06:10:11Z
Generation: 1
Resource Version: 52666
UID: 985974d8-b98f-443d-bcf3-c1b5c8cfc95c
Spec:
Applied To:
Pod Selector:
Match Labels:
App: nginx1
Egress IP: 172.18.0.6
Events: <none>
Describe the solution you'd like It may be useful to provide Status for static Egress case as well like we provide for Egress with externalippool.
Status:
Conditions:
Last Transition Time: 2024-04-16T05:57:47Z
Message: Failed to assign the IP to EgressNode: no Node available
Reason: AssignmentError
Status: False
Type: IPAssigned
Anything else you would like to add? For Egress with ExternalIPPool, when EgressIP isn't assigned to any Node, Egress is not applied to Pod. Pod to external traffic goes via host NodeIP SNAT (Normal encap mode). But this is not the case for static Egress, when EgressIP isn't available on any Node, still Egress is applicable to Pod and Pod to external traffic is unsuccessful. We can take reference from egress with externalIPPool and not apply egress to pod until egressIP is available on a Node for static egress as well.