ipam

package
v3.21.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2022 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(args []string, version string) error

IPAM takes keyword with an IP address then calls the subcommands.

func Configure

func Configure(args []string) error

Configure IPAM.

func Release

func Release(args []string, version string) error

IPAM takes keyword with an IP address then calls the subcommands.

func Show

func Show(args []string) error

IPAM takes keyword with an IP address then calls the subcommands.

Types

type Allocation

type Allocation struct {
	// The actual address.
	IP string `json:"ip"`

	// Access to the block.
	Block   *model.AllocationBlock `json:"-"`
	Ordinal int                    `json:"-"`

	Handle string `json:"handle,omitempty"`

	// Metadata for the Allocation.
	Pod               string `json:"pod,omitempty"`
	Namespace         string `json:"namespace,omitempty"`
	Node              string `json:"node,omitempty"`
	Type              string `json:"type,omitempty"`
	CreationTimestamp string `json:"creationTimestamp,omitempty"`

	// InUse is true when this Allocation is currently being used by a running
	// workload / node / etc. It is false if this address is not active and should be cleaned up.
	InUse bool `json:"inUse"`

	// Borrowed is true if this IP is from a block that is not affine to the node.
	Borrowed bool `json:"borrowed,omitempty"`

	// List of objects which are using this IP.
	Owners []string `json:"owners"`
}

Allocation represents an IP that is allocated in Calico IPAM, augmented with data from cross referencing with WorkloadEndpoints, etc.

func (*Allocation) GetAttrString

func (a *Allocation) GetAttrString() string

type IPAMChecker

type IPAMChecker struct {
	// contains filtered or unexported fields
}

func NewIPAMChecker

func NewIPAMChecker(k8sClient kubernetes.Interface,
	v3Client clientv3.Interface,
	backendClient bapi.Client,
	showAllIPs bool,
	showProblemIPs bool,
	outFile string,
	version string) *IPAMChecker

type Report

type Report struct {
	// Version of the code that produced the report.
	Version string `json:"version"`

	// Important metadata.
	ClusterGUID         string `json:"clusterGUID"`
	DatastoreLocked     bool   `json:"datastoreLocked"`
	ClusterInfoRevision string `json:"clusterInformationRevision"`
	ClusterType         string `json:"clusterType"`

	// Allocations is a map of IP address to list of allocation data.
	Allocations map[string][]*Allocation `json:"allocations"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL