ippool

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(ctx context.Context, management *config.Management) error

func SanitizeStatus

func SanitizeStatus(status *networkv1.IPPoolStatus)

Types

type Handler

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

func (*Handler) BuildCache

func (h *Handler) BuildCache(ipPool *networkv1.IPPool, status networkv1.IPPoolStatus) (networkv1.IPPoolStatus, error)

BuildCache reconciles ipPool and initializes the IPAM and MAC caches for it. The source information comes from both ipPool's spec and status. Since IPPool objects are deemed source of truths, BuildCache honors the state and use it to load up internal caches. The returned status reports whether both caches are fully initialized.

func (*Handler) DeployAgent

func (h *Handler) DeployAgent(ipPool *networkv1.IPPool, status networkv1.IPPoolStatus) (networkv1.IPPoolStatus, error)

DeployAgent reconciles ipPool and ensures there's an agent pod for it. The returned status reports whether an agent pod is registered.

func (*Handler) MonitorAgent

func (h *Handler) MonitorAgent(ipPool *networkv1.IPPool, status networkv1.IPPoolStatus) (networkv1.IPPoolStatus, error)

MonitorAgent reconciles ipPool and keeps an eye on the agent pod. If the running agent pod does not match to the one record in ipPool's status, MonitorAgent tries to delete it. The returned status reports whether the agent pod is ready.

func (*Handler) OnChange

func (h *Handler) OnChange(key string, ipPool *networkv1.IPPool) (*networkv1.IPPool, error)

func (*Handler) OnRemove

func (h *Handler) OnRemove(key string, ipPool *networkv1.IPPool) (*networkv1.IPPool, error)

type IPPoolBuilder

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

func NewIPPoolBuilder

func NewIPPoolBuilder(namespace, name string) *IPPoolBuilder

func (*IPPoolBuilder) AgentPodRef

func (b *IPPoolBuilder) AgentPodRef(namespace, name, image, uid string) *IPPoolBuilder

func (*IPPoolBuilder) AgentReadyCondition

func (b *IPPoolBuilder) AgentReadyCondition(status corev1.ConditionStatus, reason, message string) *IPPoolBuilder

func (*IPPoolBuilder) Allocated

func (b *IPPoolBuilder) Allocated(ipAddress, macAddress string) *IPPoolBuilder

func (*IPPoolBuilder) Annotation added in v0.3.0

func (b *IPPoolBuilder) Annotation(key, value string) *IPPoolBuilder

func (*IPPoolBuilder) Available

func (b *IPPoolBuilder) Available(count int) *IPPoolBuilder

func (*IPPoolBuilder) Build

func (b *IPPoolBuilder) Build() *networkv1.IPPool

func (*IPPoolBuilder) CIDR

func (b *IPPoolBuilder) CIDR(cidr string) *IPPoolBuilder

func (*IPPoolBuilder) CacheReadyCondition

func (b *IPPoolBuilder) CacheReadyCondition(status corev1.ConditionStatus, reason, message string) *IPPoolBuilder

func (*IPPoolBuilder) Exclude

func (b *IPPoolBuilder) Exclude(ipAddressList ...string) *IPPoolBuilder

func (*IPPoolBuilder) NetworkName

func (b *IPPoolBuilder) NetworkName(networkName string) *IPPoolBuilder

func (*IPPoolBuilder) Paused

func (b *IPPoolBuilder) Paused() *IPPoolBuilder

func (*IPPoolBuilder) PoolRange

func (b *IPPoolBuilder) PoolRange(start, end string) *IPPoolBuilder

func (*IPPoolBuilder) RegisteredCondition

func (b *IPPoolBuilder) RegisteredCondition(status corev1.ConditionStatus, reason, message string) *IPPoolBuilder

func (*IPPoolBuilder) Router added in v0.2.0

func (b *IPPoolBuilder) Router(router string) *IPPoolBuilder

func (*IPPoolBuilder) ServerIP

func (b *IPPoolBuilder) ServerIP(serverIP string) *IPPoolBuilder

func (*IPPoolBuilder) StoppedCondition

func (b *IPPoolBuilder) StoppedCondition(status corev1.ConditionStatus, reason, message string) *IPPoolBuilder

func (*IPPoolBuilder) UnPaused

func (b *IPPoolBuilder) UnPaused() *IPPoolBuilder

func (*IPPoolBuilder) Used

func (b *IPPoolBuilder) Used(count int) *IPPoolBuilder

type Network

type Network struct {
	Namespace     string `json:"namespace"`
	Name          string `json:"name"`
	InterfaceName string `json:"interface"`
}

type NetworkAttachmentDefinitionBuilder added in v0.2.0

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

func NewNetworkAttachmentDefinitionBuilder added in v0.2.0

func NewNetworkAttachmentDefinitionBuilder(namespace, name string) *NetworkAttachmentDefinitionBuilder

func (*NetworkAttachmentDefinitionBuilder) Build added in v0.2.0

func (*NetworkAttachmentDefinitionBuilder) Label added in v0.2.0

Jump to

Keyboard shortcuts

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