spiderpool icon indicating copy to clipboard operation
spiderpool copied to clipboard

[docs] One of the fields in the annotations docs ipam.spidernet.io/ippools should not be `defaultRoute`, but `cleanGateway`.

Open ty-ci-robot opened this issue 2 years ago • 1 comments

Documentation issue Read the following documents:

  • https://spidernet-io.github.io/spiderpool/concepts/annotation/#ipamspidernetioippools

In it there is this description:

ipam.spidernet.io/ippools: |-
  [{
      "interface": "eth0",
      "ipv4pools": ["v4-ippool1"],
      "ipv6pools": ["v6-ippool1"],
      "defaultRoute": true
   },{
      "interface": "eth1",
      "ipv4pools": ["v4-ippool2"],
      "ipv6pools": ["v6-ippool2"],
      "defaultRoute": false
  }]

  • interface (string, required): Since the CNI request only carries the information of one interface, in the case of multiple interfaces, the interface field must be specified to distinguish.
  • ipv4pools (array, optional): Specify which ippool is used to allocate IPv4 IP. When enableIPv4 in the spiderpool-conf ConfigMap is set to true, this field is required.
  • ipv6pools (array, optional): Specify which ippool is used to allocate IPv6 IP. When enableIPv6 in the spiderpool-conf ConfigMap is set to true, this field is required.
  • defaultRoute (bool, optional): If set to true, the IPAM plugin will return the default gateway route recorded in the ippool.

But in fact, in the documentation, it should not be defaultRoute, but cleanGateway.

  • https://github.com/spidernet-io/spiderpool/blob/main/pkg/types/k8s.go
type AnnoPodIPPoolsValue []AnnoIPPoolItem

type AnnoIPPoolItem struct {
	NIC          string   `json:"interface"`
	IPv4Pools    []string `json:"ipv4pools,omitempty"`
	IPv6Pools    []string `json:"ipv6pools,omitempty"`
	CleanGateway bool     `json:"cleanGateway"`
}

ty-ci-robot avatar Oct 14 '22 03:10 ty-ci-robot

thx!

ty-dc avatar Oct 17 '22 03:10 ty-dc