Spidercoordinator

January 26, 2025 ยท View on GitHub

A Spidercoordinator resource represents the global default configuration of the cni meta-plugin: coordinator.

There is only one instance of this resource, which is automatically generated while you install Spiderpool and does not need to be created manually.

Sample YAML

apiVersion: spiderpool.spidernet.io/v2beta1
kind: SpiderCoordinator
metadata:
  name: default
spec:
  enableVethLinkLocalAddress: false
  podRPFilter: 0
  hostRuleTable: 500
  mode: underlay
  podCIDRType: auto
  podDefaultRouteNIC: eth0
  podMACPrefix: ""
  tunePodRoutes: true
  txQueueLen: 0
status:
  overlayPodCIDR:
  - 10.233.64.0/18
  - fd85:ee78:d8a6:8607::1:0000/112
  phase: Synced
  serviceCIDR:
  - 10.233.0.0/18
  - fd85:ee78:d8a6:8607::1000/116

Spidercoordinators definition

Metadata

FieldDescriptionSchemaValidation
nameThe name of this Spidercoordinators resourcestringrequired

Spec

This is the Spidercoordinators spec for users to configure.

FieldDescriptionSchemaValidationValuesDefault
modeThe mode in which the coordinator. auto: automatically determine if it's overlay or underlay. underlay: coordinator creates veth devices to solve the problem that CNIs such as macvlan cannot communicate with clusterIP. overlay: fix the problem that CNIs such as Macvlan cannot access ClusterIP through the Calico network card attached to the pod,coordinate policy route between interfaces to ensure consistence data path of request and reply packetsstringrequireauto,underlay,overlayauto
podCIDRTypeThe ways to fetch the CIDR of the cluster. auto(default), This means that it will automatically switch podCIDRType to cluster or calico or cilium. based on cluster CNI. calico: auto fetch the subnet of the pod from the ip pools of calico, This only works if the cluster CNI is calico; cilium: Auto fetch the pod's subnet from cilium's configMap or ip pools. Supported IPAM modes: ["cluster-pool","kubernetes","multi-pool"]; cluster: auto fetch the subnet of the pod from the kubeadm-config configmap, This is useful if there is only a globally unique default pod's subnet; none: don't get the subnet of the pod, which is useful for some special cases. In this case,you can manually configure the hijackCIDR fieldstringrequireauto,cluster,calico,cilium,noneauto
tunePodRoutestune pod's route while the pod is attached to multiple NICsbooloptionaltrue,falsetrue
podDefaultRouteNICThe NIC where the pod's default route residesstringoptional"",eth0,net1...underlay: eth0,overlay: net1
vethLinkAddressconfigure an link-local address for veth0 device, fix the istio casebooleanoptionaltrue,falsefalse
podMACPrefixfix the pod's mac address with this prefix + 4 bytes IPstringoptionala invalid mac address prefix""
podRPFilterset rp_filter sysctl for the podintrequired0,1,2;suggest to be 00
hostRuleTableThe directly routing table of the host accessing the pod's underlay IP will be placed in this policy routing tableintrequiredint500
txQueueLenThe Transmit Queue Length (txqueuelen) is a TCP/IP stack network interface value that sets the number of packets allowed per kernel transmit queue of a network interface deviceintoptional>= 0, default to 0, it's mean to don't set it0

Status (subresource)

The Spidercoordinators status is a subresource that processed automatically by the system to summarize the current state.

FieldDescriptionSchemaValidation
overlayPodCIDRthe cluster pod cidr[]stringrequired
serviceCIDRthe cluster service cidr[]stringrequired
phaseRepresents the status of synchronizationstringrequired
reasonthe reason why the status is NotReadystringoptional