metallb

package
v0.0.0-...-6537c4d Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// APIGroup represents metallb api group.
	APIGroup = "metallb.io"
	// APIVersion represents version of metallb api.
	APIVersion = "v1beta1"
	// MetalLBList represents kind of MetalLBList object.
	MetalLBList = "MetalLBList"
	// BGPPeerListKind represents kind of BGPPeerList object.
	BGPPeerListKind = "BGPPeerList"
	// BGPAdvertisementListKind represents kind of BGPAdvertisementList object.
	BGPAdvertisementListKind = "BGPAdvertisementList"
	// BFDProfileList represents kind of BFDProfile object.
	BFDProfileList = "BFDProfileList"
	// IPAddressPoolList represents kind of IPAddressPool object.
	IPAddressPoolList = "IPAddressPoolList"
)

Variables

This section is empty.

Functions

func GetBFDProfileGVR

func GetBFDProfileGVR() schema.GroupVersionResource

GetBFDProfileGVR returns bfdprofile's GroupVersionResource which could be used for Clean function.

func GetBGPAdvertisementGVR

func GetBGPAdvertisementGVR() schema.GroupVersionResource

GetBGPAdvertisementGVR returns bgpadvertisement's GroupVersionResource, which could be used for Clean function.

func GetBGPPeerGVR

func GetBGPPeerGVR() schema.GroupVersionResource

GetBGPPeerGVR returns bgppeer's GroupVersionResource which could be used for Clean function.

func GetIPAddressPoolGVR

func GetIPAddressPoolGVR() schema.GroupVersionResource

GetIPAddressPoolGVR returns ipaddresspool's GroupVersionResource, which could be used for Clean function.

func GetL2AdvertisementGVR

func GetL2AdvertisementGVR() schema.GroupVersionResource

GetL2AdvertisementGVR returns l2advertisement's GroupVersionResource, which could be used for Clean function.

func GetMetalLbIoGVR

func GetMetalLbIoGVR() schema.GroupVersionResource

GetMetalLbIoGVR returns metalLb's GroupVersionResource which could be used for Clean function.

Types

type AdditionalOptions

type AdditionalOptions func(builder *Builder) (*Builder, error)

AdditionalOptions additional options for metallb object.

type BFDAdditionalOptions

type BFDAdditionalOptions func(builder *BFDBuilder) (*BFDBuilder, error)

BFDAdditionalOptions additional options for BFDProfile object.

type BFDBuilder

type BFDBuilder struct {
	Definition *mlbtypes.BFDProfile
	Object     *mlbtypes.BFDProfile
	// contains filtered or unexported fields
}

BFDBuilder provides struct for the BFDProfile object containing connection to the cluster and the BFDProfile definitions.

func NewBFDBuilder

func NewBFDBuilder(apiClient *clients.Settings, name, nsname string) *BFDBuilder

NewBFDBuilder creates a new instance of BFDBuilder.

func PullBFDProfile

func PullBFDProfile(apiClient *clients.Settings, name, nsname string) (*BFDBuilder, error)

PullBFDProfile pulls existing bfdprofile from cluster.

func (*BFDBuilder) Create

func (builder *BFDBuilder) Create() (*BFDBuilder, error)

Create makes a BFDProfile in the cluster and stores the created object in struct.

func (*BFDBuilder) Delete

func (builder *BFDBuilder) Delete() (*BFDBuilder, error)

Delete removes BFDProfile object from a cluster.

func (*BFDBuilder) Exists

func (builder *BFDBuilder) Exists() bool

Exists checks whether the given BFDProfile exists.

func (*BFDBuilder) Get

func (builder *BFDBuilder) Get() (*mlbtypes.BFDProfile, error)

Get returns BFDProfile object if found.

func (*BFDBuilder) Update

func (builder *BFDBuilder) Update(force bool) (*BFDBuilder, error)

Update renovates the existing BFDProfile object with the BFDProfile definition in builder.

func (*BFDBuilder) WithEchoInterval

func (builder *BFDBuilder) WithEchoInterval(ecoInterval uint32) *BFDBuilder

WithEchoInterval defines the ecoInterval placed in the BFDProfile.

func (*BFDBuilder) WithEchoMode

func (builder *BFDBuilder) WithEchoMode(echoMode bool) *BFDBuilder

WithEchoMode defines the echoMode placed in the BFDProfile.

func (*BFDBuilder) WithMinimumTTL

func (builder *BFDBuilder) WithMinimumTTL(minimumTTL uint32) *BFDBuilder

WithMinimumTTL defines the minimumTTTL placed in the BFDProfile.

func (*BFDBuilder) WithMultiplier

func (builder *BFDBuilder) WithMultiplier(multiplier uint32) *BFDBuilder

WithMultiplier defines the detectMultiplier placed in the BFDProfile.

func (*BFDBuilder) WithOptions

func (builder *BFDBuilder) WithOptions(options ...BFDAdditionalOptions) *BFDBuilder

WithOptions creates BFDProfile with generic mutation options.

func (*BFDBuilder) WithPassiveMode

func (builder *BFDBuilder) WithPassiveMode(passiveMode bool) *BFDBuilder

WithPassiveMode defines the passiveMode placed in the BFDProfile.

func (*BFDBuilder) WithRcvInterval

func (builder *BFDBuilder) WithRcvInterval(rcvInterval uint32) *BFDBuilder

WithRcvInterval defines the receiveInterval placed in the BFDProfile.

func (*BFDBuilder) WithTransmitInterval

func (builder *BFDBuilder) WithTransmitInterval(transmitInterval uint32) *BFDBuilder

WithTransmitInterval defines the transmitInterval placed in the BFDProfile.

type BGPAdvertisementAdditionalOptions

type BGPAdvertisementAdditionalOptions func(builder *BGPAdvertisementBuilder) (*BGPAdvertisementBuilder, error)

BGPAdvertisementAdditionalOptions additional options for BGPAdvertisement object.

type BGPAdvertisementBuilder

type BGPAdvertisementBuilder struct {
	Definition *mlbtypes.BGPAdvertisement
	Object     *mlbtypes.BGPAdvertisement
	// contains filtered or unexported fields
}

BGPAdvertisementBuilder provides struct for the BGPAdvertisement object containing connection to the cluster and the BGPAdvertisement definitions.

func NewBGPAdvertisementBuilder

func NewBGPAdvertisementBuilder(apiClient *clients.Settings, name, nsname string) *BGPAdvertisementBuilder

NewBGPAdvertisementBuilder creates a new instance of BGPAdvertisementBuilder.

func PullBGPAdvertisement

func PullBGPAdvertisement(apiClient *clients.Settings, name, nsname string) (*BGPAdvertisementBuilder, error)

PullBGPAdvertisement pulls existing bgpadvertisement from cluster.

func (*BGPAdvertisementBuilder) Create

Create makes a BGPAdvertisement in the cluster and stores the created object in struct.

func (*BGPAdvertisementBuilder) Delete

Delete removes BGPAdvertisement object from a cluster.

func (*BGPAdvertisementBuilder) Exists

func (builder *BGPAdvertisementBuilder) Exists() bool

Exists checks whether the given BGPAdvertisement exists.

func (*BGPAdvertisementBuilder) Get

Get returns BGPAdvertisement object if found.

func (*BGPAdvertisementBuilder) Update

func (builder *BGPAdvertisementBuilder) Update(force bool) (*BGPAdvertisementBuilder, error)

Update renovates the existing BGPAdvertisement object with the BGPAdvertisement definition in builder.

func (*BGPAdvertisementBuilder) WithAggregationLength4

func (builder *BGPAdvertisementBuilder) WithAggregationLength4(aggregationLength int32) *BGPAdvertisementBuilder

WithAggregationLength4 adds the specified AggregationLength to the BGPAdvertisement.

func (*BGPAdvertisementBuilder) WithAggregationLength6

func (builder *BGPAdvertisementBuilder) WithAggregationLength6(aggregationLength int32) *BGPAdvertisementBuilder

WithAggregationLength6 adds the specified AggregationLengthV6 to the BGPAdvertisement.

func (*BGPAdvertisementBuilder) WithCommunities

func (builder *BGPAdvertisementBuilder) WithCommunities(communities []string) *BGPAdvertisementBuilder

WithCommunities adds the specified Communities to the BGPAdvertisement.

func (*BGPAdvertisementBuilder) WithIPAddressPools

func (builder *BGPAdvertisementBuilder) WithIPAddressPools(ipAddressPools []string) *BGPAdvertisementBuilder

WithIPAddressPools adds the specified IPAddressPools to the BGPAdvertisement.

func (*BGPAdvertisementBuilder) WithIPAddressPoolsSelectors

func (builder *BGPAdvertisementBuilder) WithIPAddressPoolsSelectors(
	poolSelector []metav1.LabelSelector) *BGPAdvertisementBuilder

WithIPAddressPoolsSelectors adds the specified IPAddressPoolSelectors to the BGPAdvertisement.

func (*BGPAdvertisementBuilder) WithLocalPref

func (builder *BGPAdvertisementBuilder) WithLocalPref(localPreference uint32) *BGPAdvertisementBuilder

WithLocalPref adds the specified LocalPref to the BGPAdvertisement.

func (*BGPAdvertisementBuilder) WithNodeSelector

func (builder *BGPAdvertisementBuilder) WithNodeSelector(
	nodeSelectors []metav1.LabelSelector) *BGPAdvertisementBuilder

WithNodeSelector adds the specified NodeSelectors to the BGPAdvertisement.

func (*BGPAdvertisementBuilder) WithOptions

WithOptions creates BGPAdvertisement with generic mutation options.

func (*BGPAdvertisementBuilder) WithPeers

func (builder *BGPAdvertisementBuilder) WithPeers(peers []string) *BGPAdvertisementBuilder

WithPeers adds the specified Peers to the BGPAdvertisement.

type BGPPeerAdditionalOptions

type BGPPeerAdditionalOptions func(builder *BGPPeerBuilder) (*BGPPeerBuilder, error)

BGPPeerAdditionalOptions additional options for BGPPeer object.

type BGPPeerBuilder

type BGPPeerBuilder struct {
	Definition *mlbtypes.BGPPeer
	Object     *mlbtypes.BGPPeer
	// contains filtered or unexported fields
}

BGPPeerBuilder provides struct for the BGPPeer object containing connection to the cluster and the BGPPeer definitions.

func NewBPGPeerBuilder

func NewBPGPeerBuilder(
	apiClient *clients.Settings, name, nsname, peerIP string, asn, remoteASN uint32) *BGPPeerBuilder

NewBPGPeerBuilder creates a new instance of BGPPeer.

func PullBGPPeer

func PullBGPPeer(apiClient *clients.Settings, name, nsname string) (*BGPPeerBuilder, error)

PullBGPPeer pulls existing bgppeer from cluster.

func (*BGPPeerBuilder) Create

func (builder *BGPPeerBuilder) Create() (*BGPPeerBuilder, error)

Create makes a BGPPeer in the cluster and stores the created object in struct.

func (*BGPPeerBuilder) Delete

func (builder *BGPPeerBuilder) Delete() (*BGPPeerBuilder, error)

Delete removes BGPPeer object from a cluster.

func (*BGPPeerBuilder) Exists

func (builder *BGPPeerBuilder) Exists() bool

Exists checks whether the given BGPPeer exists.

func (*BGPPeerBuilder) Get

func (builder *BGPPeerBuilder) Get() (*mlbtypes.BGPPeer, error)

Get returns BGPPeer object if found.

func (*BGPPeerBuilder) Update

func (builder *BGPPeerBuilder) Update(force bool) (*BGPPeerBuilder, error)

Update renovates the existing BGPPeer object with the BGPPeer definition in builder.

func (*BGPPeerBuilder) WithBFDProfile

func (builder *BGPPeerBuilder) WithBFDProfile(bfdProfile string) *BGPPeerBuilder

WithBFDProfile defines the bfdProfile placed in the BGPPeer spec.

func (*BGPPeerBuilder) WithEBGPMultiHop

func (builder *BGPPeerBuilder) WithEBGPMultiHop(eBGPMultiHop bool) *BGPPeerBuilder

WithEBGPMultiHop defines the EBGPMultiHop bool flag placed in the BGPPeer spec.

func (*BGPPeerBuilder) WithHoldTime

func (builder *BGPPeerBuilder) WithHoldTime(holdTime metav1.Duration) *BGPPeerBuilder

WithHoldTime defines the holdTime placed in the BGPPeer spec.

func (*BGPPeerBuilder) WithKeepalive

func (builder *BGPPeerBuilder) WithKeepalive(keepalive metav1.Duration) *BGPPeerBuilder

WithKeepalive defines the keepAliveTime placed in the BGPPeer spec.

func (*BGPPeerBuilder) WithNodeSelector

func (builder *BGPPeerBuilder) WithNodeSelector(nodeSelector map[string]string) *BGPPeerBuilder

WithNodeSelector defines the nodeSelector placed in the BGPPeer spec.

func (*BGPPeerBuilder) WithOptions

func (builder *BGPPeerBuilder) WithOptions(options ...BGPPeerAdditionalOptions) *BGPPeerBuilder

WithOptions creates BGPPeer with generic mutation options.

func (*BGPPeerBuilder) WithPassword

func (builder *BGPPeerBuilder) WithPassword(password string) *BGPPeerBuilder

WithPassword defines the password placed in the BGPPeer spec.

func (*BGPPeerBuilder) WithPort

func (builder *BGPPeerBuilder) WithPort(port uint16) *BGPPeerBuilder

WithPort defines the port placed in the BGPPeer spec.

func (*BGPPeerBuilder) WithRouterID

func (builder *BGPPeerBuilder) WithRouterID(routerID string) *BGPPeerBuilder

WithRouterID defines the routerID placed in the BGPPeer spec.

func (*BGPPeerBuilder) WithSRCAddress

func (builder *BGPPeerBuilder) WithSRCAddress(srcAddress string) *BGPPeerBuilder

WithSRCAddress defines the SRCAddress placed in the BGPPeer spec.

type Builder

type Builder struct {
	Definition *mlbtypes.MetalLB
	Object     *mlbtypes.MetalLB
	// contains filtered or unexported fields
}

Builder provides struct for the MetalLb object containing connection to the cluster and the MetalLb definitions.

func NewBuilder

func NewBuilder(apiClient *clients.Settings, name, nsname string, nodeSelector map[string]string) *Builder

NewBuilder creates a new instance of Builder.

func Pull

func Pull(apiClient *clients.Settings, name, nsname string) (*Builder, error)

Pull retrieves an existing metallb.io object from the cluster.

func (*Builder) Create

func (builder *Builder) Create() (*Builder, error)

Create makes a MetalLb in the cluster and stores the created object in struct.

func (*Builder) Delete

func (builder *Builder) Delete() (*Builder, error)

Delete removes MetalLb object from a cluster.

func (*Builder) Exists

func (builder *Builder) Exists() bool

Exists checks whether the given MetalLb exists.

func (*Builder) Get

func (builder *Builder) Get() (*mlbtypes.MetalLB, error)

Get returns MetalLb object if found.

func (*Builder) RemoveLabel

func (builder *Builder) RemoveLabel(key string) *Builder

RemoveLabel removes given label from metallb metadata.

func (*Builder) Update

func (builder *Builder) Update(force bool) (*Builder, error)

Update renovates the existing MetalLb object with the MetalLb definition in builder.

func (*Builder) WithOptions

func (builder *Builder) WithOptions(options ...AdditionalOptions) *Builder

WithOptions creates metallb with generic mutation options.

func (*Builder) WithSpeakerNodeSelector

func (builder *Builder) WithSpeakerNodeSelector(label map[string]string) *Builder

WithSpeakerNodeSelector adds the specified label to the MetalLbIo SpeakerNodeSelector.

type IPAddressPoolAdditionalOptions

type IPAddressPoolAdditionalOptions func(builder *IPAddressPoolBuilder) (*IPAddressPoolBuilder, error)

IPAddressPoolAdditionalOptions additional options for IPAddressPool object.

type IPAddressPoolBuilder

type IPAddressPoolBuilder struct {
	Definition *mlbtypes.IPAddressPool
	Object     *mlbtypes.IPAddressPool
	// contains filtered or unexported fields
}

IPAddressPoolBuilder provides struct for the IPAddressPool object containing connection to the cluster and the IPAddressPool definitions.

func NewIPAddressPoolBuilder

func NewIPAddressPoolBuilder(
	apiClient *clients.Settings, name, nsname string, addrPool []string) *IPAddressPoolBuilder

NewIPAddressPoolBuilder creates a new instance of IPAddressPoolBuilder.

func PullAddressPool

func PullAddressPool(apiClient *clients.Settings, name, nsname string) (*IPAddressPoolBuilder, error)

PullAddressPool pulls existing addresspool from cluster.

func (*IPAddressPoolBuilder) Create

func (builder *IPAddressPoolBuilder) Create() (*IPAddressPoolBuilder, error)

Create makes a IPAddressPool in the cluster and stores the created object in struct.

func (*IPAddressPoolBuilder) Delete

func (builder *IPAddressPoolBuilder) Delete() (*IPAddressPoolBuilder, error)

Delete removes IPAddressPool object from a cluster.

func (*IPAddressPoolBuilder) Exists

func (builder *IPAddressPoolBuilder) Exists() bool

Exists checks whether the given IPAddressPool exists.

func (*IPAddressPoolBuilder) Get

func (builder *IPAddressPoolBuilder) Get() (*mlbtypes.IPAddressPool, error)

Get returns IPAddressPool object if found.

func (*IPAddressPoolBuilder) Update

func (builder *IPAddressPoolBuilder) Update(force bool) (*IPAddressPoolBuilder, error)

Update renovates the existing IPAddressPool object with the IPAddressPool definition in builder.

func (*IPAddressPoolBuilder) WithAutoAssign

func (builder *IPAddressPoolBuilder) WithAutoAssign(auto bool) *IPAddressPoolBuilder

WithAutoAssign defines the AutoAssign bool flag placed in the IPAddressPool spec.

func (*IPAddressPoolBuilder) WithAvoidBuggyIPs

func (builder *IPAddressPoolBuilder) WithAvoidBuggyIPs(avoid bool) *IPAddressPoolBuilder

WithAvoidBuggyIPs defines the AvoidBuggyIPs bool flag placed in the IPAddressPool spec.

func (*IPAddressPoolBuilder) WithOptions

WithOptions creates IPAddressPool with generic mutation options.

type L2AdvertisementAdditionalOptions

type L2AdvertisementAdditionalOptions func(builder *L2AdvertisementBuilder) (*L2AdvertisementBuilder, error)

L2AdvertisementAdditionalOptions additional options for L2Advertisement object.

type L2AdvertisementBuilder

type L2AdvertisementBuilder struct {
	Definition *mlbtypes.L2Advertisement
	Object     *mlbtypes.L2Advertisement
	// contains filtered or unexported fields
}

L2AdvertisementBuilder provides struct for the L2Advertisement object containing connection to the cluster and the L2Advertisement definitions.

func NewL2AdvertisementBuilder

func NewL2AdvertisementBuilder(apiClient *clients.Settings, name, nsname string) *L2AdvertisementBuilder

NewL2AdvertisementBuilder creates a new instance of L2AdvertisementBuilder.

func PullL2Advertisement

func PullL2Advertisement(apiClient *clients.Settings, name, nsname string) (*L2AdvertisementBuilder, error)

PullL2Advertisement pulls existing L2Advertisement from cluster.

func (*L2AdvertisementBuilder) Create

func (builder *L2AdvertisementBuilder) Create() (*L2AdvertisementBuilder, error)

Create makes a L2Advertisement in the cluster and stores the created object in struct.

func (*L2AdvertisementBuilder) Delete

func (builder *L2AdvertisementBuilder) Delete() (*L2AdvertisementBuilder, error)

Delete removes L2Advertisement object from a cluster.

func (*L2AdvertisementBuilder) Exists

func (builder *L2AdvertisementBuilder) Exists() bool

Exists checks whether the given L2Advertisement exists.

func (*L2AdvertisementBuilder) Get

Get returns L2Advertisement object if found.

func (*L2AdvertisementBuilder) Update

func (builder *L2AdvertisementBuilder) Update(force bool) (*L2AdvertisementBuilder, error)

Update renovates the existing L2Advertisement object with the L2Advertisement definition in builder.

func (*L2AdvertisementBuilder) WithIPAddressPools

func (builder *L2AdvertisementBuilder) WithIPAddressPools(ipAddressPools []string) *L2AdvertisementBuilder

WithIPAddressPools adds the specified IPAddressPools to the L2Advertisement.

func (*L2AdvertisementBuilder) WithIPAddressPoolsSelectors

func (builder *L2AdvertisementBuilder) WithIPAddressPoolsSelectors(
	poolSelector []metaV1.LabelSelector) *L2AdvertisementBuilder

WithIPAddressPoolsSelectors adds the specified IPAddressPoolSelectors to the L2Advertisement.

func (*L2AdvertisementBuilder) WithNodeSelector

func (builder *L2AdvertisementBuilder) WithNodeSelector(nodeSelectors []metaV1.LabelSelector) *L2AdvertisementBuilder

WithNodeSelector adds the specified NodeSelectors to the L2Advertisement.

func (*L2AdvertisementBuilder) WithOptions

WithOptions creates L2Advertisement with generic mutation options.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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