SpiderIPPool

January 26, 2025 ยท View on GitHub

A SpiderIPPool resource represents a collection of IP addresses from which Spiderpool expects endpoint IPs to be assigned.

Sample YAML

apiVersion: spiderpool.spidernet.io/v2beta1
kind: SpiderIPPool
metadata:
  name: master-172
spec:
  ipVersion: 4
  subnet: 172.31.192.0/20
  ips:
    - 172.31.199.180-172.31.199.189
    - 172.31.199.205-172.31.199.209
  excludeIPs:
    - 172.31.199.186-172.31.199.188
    - 172.31.199.207
  gateway: 172.31.207.253
  default: true
  disable: false

SpiderIPPool definition

Metadata

FieldDescriptionSchemaValidation
namethe name of this SpiderIPPool resourcestringrequired

Spec

This is the IPPool spec for users to configure.

FieldDescriptionSchemaValidationValuesDefault
ipVersionIP version of this poolintoptional4,6
subnetsubnet of this poolstringrequiredIPv4 or IPv6 CIDR.
Must not overlap
ipsIP ranges for this pool to uselist of stringsoptionalarray of IP ranges and single IP address
excludeIPsisolated IP ranges for this pool to filterlist of stringsoptionalarray of IP ranges and single IP address
gatewaygateway for this poolstringoptionalan IP address
routescustom routes in this pool (please don't set default route 0.0.0.0/0 if property gateway exists)list of routeoptional
podAffinityspecify which pods can use this poollabelSelectoroptionalkubernetes LabelSelector
namespaceAffinityspecify which namespaces pods can use this poollabelSelectoroptionalkubernetes LabelSelector
namespaceNamespecify which namespaces pods can use this pool (The priority is higher than property namespaceAffinity)list of stringsoptional
nodeAffinityspecify which nodes pods can use this poollabelSelectoroptionalkubernetes LabelSelector
nodeNamespecify which nodes pods can use this pool (The priority is higher than property nodeAffinity)list of stringsoptional
multusNamespecify which multus net-attach-def objects can use this poollist of stringsoptional
defaultconfigure this resource as a default pool for podsbooleanoptionaltrue,falsefalse
disableconfigure whether the pool is usablebooleanoptionaltrue,falsefalse

Status (subresource)

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

FieldDescriptionSchema
allocatedIPscurrent IP allocations in this poolstring
totalIPCounttotal IP counts of this pool to useint
allocatedIPCountcurrent allocated IP countsint

Route

FieldDescriptionSchemaValidation
dstdestination of this routestringrequired
gwgateway of this routestringrequired

Pod Affinity

For details on configuring SpiderIPPool podAffinity, please read the Pod Affinity of IPPool.

Namespace Affinity

For details on configuring SpiderIPPool namespaceAffinity or namespaceName, please read the Namespace Affinity of IPPool.

Notice: namespaceName has higher priority than namespaceAffinity.

Node Affinity

For details on configuring SpiderIPPool nodeAffinity or nodeName, please read the Node Affinity of IPPool and Network topology allocation.

Notice: nodeName has higher priority than nodeAffinity.

Multus Affinity

For details on configuring SpiderIPPool multusName, please read the multus Affinity of IPPool.