Documentation ¶
Index ¶
- func Register(ctx context.Context, management *config.Management) error
- func SanitizeStatus(status *networkv1.IPPoolStatus)
- type Handler
- func (h *Handler) BuildCache(ipPool *networkv1.IPPool, status networkv1.IPPoolStatus) (networkv1.IPPoolStatus, error)
- func (h *Handler) DeployAgent(ipPool *networkv1.IPPool, status networkv1.IPPoolStatus) (networkv1.IPPoolStatus, error)
- func (h *Handler) MonitorAgent(ipPool *networkv1.IPPool, status networkv1.IPPoolStatus) (networkv1.IPPoolStatus, error)
- func (h *Handler) OnChange(key string, ipPool *networkv1.IPPool) (*networkv1.IPPool, error)
- func (h *Handler) OnRemove(key string, ipPool *networkv1.IPPool) (*networkv1.IPPool, error)
- type IPPoolBuilder
- func (b *IPPoolBuilder) AgentPodRef(namespace, name, image, uid string) *IPPoolBuilder
- func (b *IPPoolBuilder) AgentReadyCondition(status corev1.ConditionStatus, reason, message string) *IPPoolBuilder
- func (b *IPPoolBuilder) Allocated(ipAddress, macAddress string) *IPPoolBuilder
- func (b *IPPoolBuilder) Annotation(key, value string) *IPPoolBuilder
- func (b *IPPoolBuilder) Available(count int) *IPPoolBuilder
- func (b *IPPoolBuilder) Build() *networkv1.IPPool
- func (b *IPPoolBuilder) CIDR(cidr string) *IPPoolBuilder
- func (b *IPPoolBuilder) CacheReadyCondition(status corev1.ConditionStatus, reason, message string) *IPPoolBuilder
- func (b *IPPoolBuilder) Exclude(ipAddressList ...string) *IPPoolBuilder
- func (b *IPPoolBuilder) NetworkName(networkName string) *IPPoolBuilder
- func (b *IPPoolBuilder) Paused() *IPPoolBuilder
- func (b *IPPoolBuilder) PoolRange(start, end string) *IPPoolBuilder
- func (b *IPPoolBuilder) RegisteredCondition(status corev1.ConditionStatus, reason, message string) *IPPoolBuilder
- func (b *IPPoolBuilder) Router(router string) *IPPoolBuilder
- func (b *IPPoolBuilder) ServerIP(serverIP string) *IPPoolBuilder
- func (b *IPPoolBuilder) StoppedCondition(status corev1.ConditionStatus, reason, message string) *IPPoolBuilder
- func (b *IPPoolBuilder) UnPaused() *IPPoolBuilder
- func (b *IPPoolBuilder) Used(count int) *IPPoolBuilder
- type Network
- type NetworkAttachmentDefinitionBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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.
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 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 (b *NetworkAttachmentDefinitionBuilder) Build() *cniv1.NetworkAttachmentDefinition
func (*NetworkAttachmentDefinitionBuilder) Label ¶ added in v0.2.0
func (b *NetworkAttachmentDefinitionBuilder) Label(key, value string) *NetworkAttachmentDefinitionBuilder