ipam

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EipDeleteReason      = "delete eip"
	EipAddOrUpdateReason = "add/update eip"
)

Variables

This section is empty.

Functions

func SetupIPAM

func SetupIPAM(mgr ctrl.Manager) error

Types

type IPAM

type IPAM struct {
	client.Client

	record.EventRecorder
	// contains filtered or unexported fields
}
var (
	IPAMAllocator *IPAM
)

func (*IPAM) AssignIP

func (i *IPAM) AssignIP(args IPAMArgs) (IPAMResult, error)

func (*IPAM) Reconcile

func (i *IPAM) Reconcile(req ctrl.Request) (ctrl.Result, error)

func (*IPAM) UnAssignIP

func (i *IPAM) UnAssignIP(args IPAMArgs, peek bool) (IPAMResult, error)

type IPAMArgs

type IPAMArgs struct {
	// Service.Namespace + Service.Name
	// Required
	Key string
	// The IP address specified by the service
	Addr string
	// The Eip name specified by the service
	// Not available right now.
	Eip string
	// The Protocol specified by the service
	// Required
	Protocol string
	Unalloc  bool
}

func (*IPAMArgs) ShouldUnAssignIP

func (i *IPAMArgs) ShouldUnAssignIP(result IPAMResult) bool

Compare the parameters and results to determine if the IP address should be retrieved.

type IPAMResult

type IPAMResult struct {
	Addr     string
	Eip      string
	Protocol string
	Sp       speaker.Speaker
}

func (*IPAMResult) Assigned

func (i *IPAMResult) Assigned() bool

Called when the service is updated or created.

func (*IPAMResult) Clean

func (i *IPAMResult) Clean()

Jump to

Keyboard shortcuts

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