CRD EgressClusterInfo
The EgressClusterInfo CRD introduces the Egress Ignore CIDR feature to simplify the configuration of Egress policies and allows automatic acquisition of the cluster's CIDR. When the destSubnet
field of the EgressGatewayPolicy is empty, the data plane will automatically match traffic outside the CIDR in the EgressClusterStatus CR and forward it to the Egress gateway.
apiVersion: egressgateway.spidernet.io/v1beta1
kind: EgressClusterInfo
metadata:
name: default # (1)
spec:
autoDetect:
clusterIP: true # (2)
nodeIP: true # (3)
podCidrMode: auto # (4)
extraCidr: # (5)
- 10.10.10.1
status:
clusterIP: # (6)
ipv4:
- 172.41.0.0/16
ipv6:
- fd41::/108
extraCidr: # (7)
- 10.10.10.1
nodeIP: # (8)
egressgateway-control-plane:
ipv4:
- 172.18.0.3
ipv6:
- fc00:f853:ccd:e793::3
egressgateway-worker:
ipv4:
- 172.18.0.2
ipv6:
- fc00:f853:ccd:e793::2
egressgateway-worker2:
ipv4:
- 172.18.0.4
ipv6:
- fc00:f853:ccd:e793::4
podCIDR: # (9)
default-ipv4-ippool:
ipv4:
- 172.40.0.0/16
default-ipv6-ippool:
ipv6:
- fd40::/48
test-ippool:
ipv4:
- 177.70.0.0/16
podCidrMode: calico # (10)
- The name is
default
.Only one can be created by the system maintenance; clusterIP
. If it is set totrue
,Service CIDR
will be detected automaticallynodeIP
. If it is set totrue
, it will automatically detect changes related tonodeIP
and dynamically update it tostatus.nodeIP
ofEgressClusterInfo
podCidrMode
currently supportsk8s
,calico
,auto
, and""
. It indicates whether to automatically detect the correspondingpodCidr
setting. The default value isauto
. When set toauto
, it means that the cluster's used CNI (Container Network Interface) will be automatically detected. If detection fails, the cluster'spodCidr
will be used. If set to""
, it signifies no detection.extraCidr
. You can manually fill in theIP
set to be ignoredstatus.clusterIP
. Ifspec.autoDetect.clusterIP
istrue
, then automatically detect the clusterService CIDR
, and updatestatus.extraCidr
, corresponding tospec.extraCidr
status.nodeIP
. Ifspec.autoDetect.nodeIP
istrue
, then automatically detect clusternodeIP
, and updatestatus.podCIDR
, corresponding tospec.autoDetect.podCidrMode
, and then update relatedpodCidr
status.podCidrMode
corresponding tospec.autoDetect.podCidrMode
being set toauto