Documentation
¶
Index ¶
- Constants
- func GetBFDProfileGVR() schema.GroupVersionResource
- func GetBGPAdvertisementGVR() schema.GroupVersionResource
- func GetBGPPeerGVR() schema.GroupVersionResource
- func GetFrrConfigurationGVR() schema.GroupVersionResource
- func GetIPAddressPoolGVR() schema.GroupVersionResource
- func GetL2AdvertisementGVR() schema.GroupVersionResource
- func GetMetalLbIoGVR() schema.GroupVersionResource
- type AdditionalOptions
- type BFDAdditionalOptions
- type BFDBuilder
- func (builder *BFDBuilder) Create() (*BFDBuilder, error)
- func (builder *BFDBuilder) Delete() (*BFDBuilder, error)
- func (builder *BFDBuilder) Exists() bool
- func (builder *BFDBuilder) Get() (*mlbtypes.BFDProfile, error)
- func (builder *BFDBuilder) Update(force bool) (*BFDBuilder, error)
- func (builder *BFDBuilder) WithEchoInterval(ecoInterval uint32) *BFDBuilder
- func (builder *BFDBuilder) WithEchoMode(echoMode bool) *BFDBuilder
- func (builder *BFDBuilder) WithMinimumTTL(minimumTTL uint32) *BFDBuilder
- func (builder *BFDBuilder) WithMultiplier(multiplier uint32) *BFDBuilder
- func (builder *BFDBuilder) WithOptions(options ...BFDAdditionalOptions) *BFDBuilder
- func (builder *BFDBuilder) WithPassiveMode(passiveMode bool) *BFDBuilder
- func (builder *BFDBuilder) WithRcvInterval(rcvInterval uint32) *BFDBuilder
- func (builder *BFDBuilder) WithTransmitInterval(transmitInterval uint32) *BFDBuilder
- type BGPAdvertisementAdditionalOptions
- type BGPAdvertisementBuilder
- func (builder *BGPAdvertisementBuilder) Create() (*BGPAdvertisementBuilder, error)
- func (builder *BGPAdvertisementBuilder) Delete() (*BGPAdvertisementBuilder, error)
- func (builder *BGPAdvertisementBuilder) Exists() bool
- func (builder *BGPAdvertisementBuilder) Get() (*mlbtypes.BGPAdvertisement, error)
- func (builder *BGPAdvertisementBuilder) Update(force bool) (*BGPAdvertisementBuilder, error)
- func (builder *BGPAdvertisementBuilder) WithAggregationLength4(aggregationLength int32) *BGPAdvertisementBuilder
- func (builder *BGPAdvertisementBuilder) WithAggregationLength6(aggregationLength int32) *BGPAdvertisementBuilder
- func (builder *BGPAdvertisementBuilder) WithCommunities(communities []string) *BGPAdvertisementBuilder
- func (builder *BGPAdvertisementBuilder) WithIPAddressPools(ipAddressPools []string) *BGPAdvertisementBuilder
- func (builder *BGPAdvertisementBuilder) WithIPAddressPoolsSelectors(poolSelector []metav1.LabelSelector) *BGPAdvertisementBuilder
- func (builder *BGPAdvertisementBuilder) WithLocalPref(localPreference uint32) *BGPAdvertisementBuilder
- func (builder *BGPAdvertisementBuilder) WithNodeSelector(nodeSelectors []metav1.LabelSelector) *BGPAdvertisementBuilder
- func (builder *BGPAdvertisementBuilder) WithOptions(options ...BGPAdvertisementAdditionalOptions) *BGPAdvertisementBuilder
- func (builder *BGPAdvertisementBuilder) WithPeers(peers []string) *BGPAdvertisementBuilder
- type BGPPeerAdditionalOptions
- type BGPPeerBuilder
- func (builder *BGPPeerBuilder) Create() (*BGPPeerBuilder, error)
- func (builder *BGPPeerBuilder) Delete() (*BGPPeerBuilder, error)
- func (builder *BGPPeerBuilder) Exists() bool
- func (builder *BGPPeerBuilder) Get() (*mlbtypesv1beta2.BGPPeer, error)
- func (builder *BGPPeerBuilder) Update(force bool) (*BGPPeerBuilder, error)
- func (builder *BGPPeerBuilder) WithBFDProfile(bfdProfile string) *BGPPeerBuilder
- func (builder *BGPPeerBuilder) WithConnectTime(connectTime metav1.Duration) *BGPPeerBuilder
- func (builder *BGPPeerBuilder) WithDynamicASN(dynamicASN mlbtypesv1beta2.DynamicASNMode) *BGPPeerBuilder
- func (builder *BGPPeerBuilder) WithEBGPMultiHop(eBGPMultiHop bool) *BGPPeerBuilder
- func (builder *BGPPeerBuilder) WithGracefulRestart(gracefulRestart bool) *BGPPeerBuilder
- func (builder *BGPPeerBuilder) WithHoldTime(holdTime metav1.Duration) *BGPPeerBuilder
- func (builder *BGPPeerBuilder) WithKeepalive(keepalive metav1.Duration) *BGPPeerBuilder
- func (builder *BGPPeerBuilder) WithNodeSelector(nodeSelector map[string]string) *BGPPeerBuilder
- func (builder *BGPPeerBuilder) WithOptions(options ...BGPPeerAdditionalOptions) *BGPPeerBuilder
- func (builder *BGPPeerBuilder) WithPassword(password string) *BGPPeerBuilder
- func (builder *BGPPeerBuilder) WithPort(port uint16) *BGPPeerBuilder
- func (builder *BGPPeerBuilder) WithRouterID(routerID string) *BGPPeerBuilder
- func (builder *BGPPeerBuilder) WithSRCAddress(srcAddress string) *BGPPeerBuilder
- type Builder
- func (builder *Builder) Create() (*Builder, error)
- func (builder *Builder) Delete() (*Builder, error)
- func (builder *Builder) Exists() bool
- func (builder *Builder) Get() (*mlbtypes.MetalLB, error)
- func (builder *Builder) RemoveLabel(key string) *Builder
- func (builder *Builder) Update(force bool) (*Builder, error)
- func (builder *Builder) WithFRRConfigAlwaysBlock(prefixes []string) *Builder
- func (builder *Builder) WithOptions(options ...AdditionalOptions) *Builder
- func (builder *Builder) WithSpeakerNodeSelector(label map[string]string) *Builder
- type FrrConfigurationBuilder
- func (builder *FrrConfigurationBuilder) Create() (*FrrConfigurationBuilder, error)
- func (builder *FrrConfigurationBuilder) Delete() error
- func (builder *FrrConfigurationBuilder) Exists() bool
- func (builder *FrrConfigurationBuilder) Get() (*frrtypes.FRRConfiguration, error)
- func (builder *FrrConfigurationBuilder) WithBGPNeighbor(bgpPeerIP string, remoteAS uint32, routerIndex uint) *FrrConfigurationBuilder
- func (builder *FrrConfigurationBuilder) WithBGPPassword(bgpPassword string, routerIndex, neighborIndex uint) *FrrConfigurationBuilder
- func (builder *FrrConfigurationBuilder) WithBGPRouter(localASN uint32) *FrrConfigurationBuilder
- func (builder *FrrConfigurationBuilder) WithConnectTime(connectTime metav1.Duration, routerIndex, neighborIndex uint) *FrrConfigurationBuilder
- func (builder *FrrConfigurationBuilder) WithEBGPMultiHop(routerIndex, neighborIndex uint) *FrrConfigurationBuilder
- func (builder *FrrConfigurationBuilder) WithHoldTime(holdTime metav1.Duration, routerIndex, neighborIndex uint) *FrrConfigurationBuilder
- func (builder *FrrConfigurationBuilder) WithKeepalive(keepAlive metav1.Duration, routerIndex, neighborIndex uint) *FrrConfigurationBuilder
- func (builder *FrrConfigurationBuilder) WithPort(port uint16, routerIndex, neighborIndex uint) *FrrConfigurationBuilder
- func (builder *FrrConfigurationBuilder) WithToReceiveModeAll(routerIndex, neighborIndex uint) *FrrConfigurationBuilder
- func (builder *FrrConfigurationBuilder) WithToReceiveModeFiltered(prefixes []string, routerIndex, neighborIndex uint) *FrrConfigurationBuilder
- type FrrNodeStateBuilder
- type IPAddressPoolAdditionalOptions
- type IPAddressPoolBuilder
- func (builder *IPAddressPoolBuilder) Create() (*IPAddressPoolBuilder, error)
- func (builder *IPAddressPoolBuilder) Delete() (*IPAddressPoolBuilder, error)
- func (builder *IPAddressPoolBuilder) Exists() bool
- func (builder *IPAddressPoolBuilder) Get() (*mlbtypes.IPAddressPool, error)
- func (builder *IPAddressPoolBuilder) Update(force bool) (*IPAddressPoolBuilder, error)
- func (builder *IPAddressPoolBuilder) WithAutoAssign(auto bool) *IPAddressPoolBuilder
- func (builder *IPAddressPoolBuilder) WithAvoidBuggyIPs(avoid bool) *IPAddressPoolBuilder
- func (builder *IPAddressPoolBuilder) WithOptions(options ...IPAddressPoolAdditionalOptions) *IPAddressPoolBuilder
- type L2AdvertisementAdditionalOptions
- type L2AdvertisementBuilder
- func (builder *L2AdvertisementBuilder) Create() (*L2AdvertisementBuilder, error)
- func (builder *L2AdvertisementBuilder) Delete() (*L2AdvertisementBuilder, error)
- func (builder *L2AdvertisementBuilder) Exists() bool
- func (builder *L2AdvertisementBuilder) Get() (*mlbtypes.L2Advertisement, error)
- func (builder *L2AdvertisementBuilder) Update(force bool) (*L2AdvertisementBuilder, error)
- func (builder *L2AdvertisementBuilder) WithIPAddressPools(ipAddressPools []string) *L2AdvertisementBuilder
- func (builder *L2AdvertisementBuilder) WithIPAddressPoolsSelectors(poolSelector []metaV1.LabelSelector) *L2AdvertisementBuilder
- func (builder *L2AdvertisementBuilder) WithNodeSelector(nodeSelectors []metaV1.LabelSelector) *L2AdvertisementBuilder
- func (builder *L2AdvertisementBuilder) WithOptions(options ...L2AdvertisementAdditionalOptions) *L2AdvertisementBuilder
Constants ¶
const ( // APIGroup represents metallb api group. APIGroup = "metallb.io" // FRRAPIGroup represents metallb frr api group. FRRAPIGroup = "frrk8s.metallb.io" // FrrConfigurationKind represents kind of FrrConfiguration object. FrrConfigurationKind = "FRRConfiguration" // 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 GetFrrConfigurationGVR ¶
func GetFrrConfigurationGVR() schema.GroupVersionResource
GetFrrConfigurationGVR returns FrrConfiguration 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 ¶
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 ¶
func (builder *BGPAdvertisementBuilder) Create() (*BGPAdvertisementBuilder, error)
Create makes a BGPAdvertisement in the cluster and stores the created object in struct.
func (*BGPAdvertisementBuilder) Delete ¶
func (builder *BGPAdvertisementBuilder) Delete() (*BGPAdvertisementBuilder, error)
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 ¶
func (builder *BGPAdvertisementBuilder) Get() (*mlbtypes.BGPAdvertisement, error)
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 ¶
func (builder *BGPAdvertisementBuilder) WithOptions( options ...BGPAdvertisementAdditionalOptions) *BGPAdvertisementBuilder
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 *mlbtypesv1beta2.BGPPeer Object *mlbtypesv1beta2.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() (*mlbtypesv1beta2.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) WithConnectTime ¶
func (builder *BGPPeerBuilder) WithConnectTime(connectTime metav1.Duration) *BGPPeerBuilder
WithConnectTime defines the reconnect timer between BGP neighbors.
func (*BGPPeerBuilder) WithDynamicASN ¶
func (builder *BGPPeerBuilder) WithDynamicASN(dynamicASN mlbtypesv1beta2.DynamicASNMode) *BGPPeerBuilder
WithDynamicASN defines the dynamicASN as either internal (iBGP) or external (eBGP). Both remoteAS and dynamicASN configure the remote ASN. They are mutually exclusive and only one can be used per remote peer.
func (*BGPPeerBuilder) WithEBGPMultiHop ¶
func (builder *BGPPeerBuilder) WithEBGPMultiHop(eBGPMultiHop bool) *BGPPeerBuilder
WithEBGPMultiHop defines the EBGPMultiHop bool flag placed in the BGPPeer spec.
func (*BGPPeerBuilder) WithGracefulRestart ¶
func (builder *BGPPeerBuilder) WithGracefulRestart(gracefulRestart bool) *BGPPeerBuilder
WithGracefulRestart defines the EnableGracefulRestart 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 (*Builder) Create ¶
Create makes a MetalLb in the cluster and stores the created object in struct.
func (*Builder) RemoveLabel ¶
RemoveLabel removes given label from metallb metadata.
func (*Builder) Update ¶
Update renovates the existing MetalLb object with the MetalLb definition in builder.
func (*Builder) WithFRRConfigAlwaysBlock ¶
WithFRRConfigAlwaysBlock adds specific routes to block from being advertised to the FRR nodes.
func (*Builder) WithOptions ¶
func (builder *Builder) WithOptions(options ...AdditionalOptions) *Builder
WithOptions creates metallb with generic mutation options.
type FrrConfigurationBuilder ¶
type FrrConfigurationBuilder struct { Definition *frrtypes.FRRConfiguration Object *frrtypes.FRRConfiguration // contains filtered or unexported fields }
FrrConfigurationBuilder provides struct for the FrrConfiguration object containing connection to the cluster and the FrrConfiguration definitions.
func NewFrrConfigurationBuilder ¶
func NewFrrConfigurationBuilder( apiClient *clients.Settings, name, nsname string) *FrrConfigurationBuilder
NewFrrConfigurationBuilder creates a new instance of FRRConfiguration.
func (*FrrConfigurationBuilder) Create ¶
func (builder *FrrConfigurationBuilder) Create() (*FrrConfigurationBuilder, error)
Create makes a FrrConfiguration in the cluster and stores the created object in struct.
func (*FrrConfigurationBuilder) Delete ¶
func (builder *FrrConfigurationBuilder) Delete() error
Delete removes FrrConfigurationBuilder object from a cluster.
func (*FrrConfigurationBuilder) Exists ¶
func (builder *FrrConfigurationBuilder) Exists() bool
Exists checks whether the given FrrConfiguration exists.
func (*FrrConfigurationBuilder) Get ¶
func (builder *FrrConfigurationBuilder) Get() (*frrtypes.FRRConfiguration, error)
Get returns FRRConfiguration object if found.
func (*FrrConfigurationBuilder) WithBGPNeighbor ¶
func (builder *FrrConfigurationBuilder) WithBGPNeighbor(bgpPeerIP string, remoteAS uint32, routerIndex uint) *FrrConfigurationBuilder
WithBGPNeighbor defines a single neighbor IP and ASN number.
func (*FrrConfigurationBuilder) WithBGPPassword ¶
func (builder *FrrConfigurationBuilder) WithBGPPassword(bgpPassword string, routerIndex, neighborIndex uint) *FrrConfigurationBuilder
WithBGPPassword defines the password used between BGP peers to form adjacency and attaches the password using the neighbor index from the neighbor list.
func (*FrrConfigurationBuilder) WithBGPRouter ¶
func (builder *FrrConfigurationBuilder) WithBGPRouter(localASN uint32) *FrrConfigurationBuilder
WithBGPRouter defines a BGP router as localASN.
func (*FrrConfigurationBuilder) WithConnectTime ¶
func (builder *FrrConfigurationBuilder) WithConnectTime(connectTime metav1.Duration, routerIndex, neighborIndex uint) *FrrConfigurationBuilder
WithConnectTime defines the time to wait until trying to connect to a BGP peer.
func (*FrrConfigurationBuilder) WithEBGPMultiHop ¶
func (builder *FrrConfigurationBuilder) WithEBGPMultiHop(routerIndex, neighborIndex uint) *FrrConfigurationBuilder
WithEBGPMultiHop sets the EBGP multihop setting on the remote BGP peer.
func (*FrrConfigurationBuilder) WithHoldTime ¶
func (builder *FrrConfigurationBuilder) WithHoldTime(holdTime metav1.Duration, routerIndex, neighborIndex uint) *FrrConfigurationBuilder
WithHoldTime defines the holdTime placed in the FrrConfiguration spec.
func (*FrrConfigurationBuilder) WithKeepalive ¶
func (builder *FrrConfigurationBuilder) WithKeepalive(keepAlive metav1.Duration, routerIndex, neighborIndex uint) *FrrConfigurationBuilder
WithKeepalive defines the keepAliveTime placed in the FrrConfiguration spec.
func (*FrrConfigurationBuilder) WithPort ¶
func (builder *FrrConfigurationBuilder) WithPort(port uint16, routerIndex, neighborIndex uint) *FrrConfigurationBuilder
WithPort defines the tcp port used to make BGP adjacency.
func (*FrrConfigurationBuilder) WithToReceiveModeAll ¶
func (builder *FrrConfigurationBuilder) WithToReceiveModeAll(routerIndex, neighborIndex uint) *FrrConfigurationBuilder
WithToReceiveModeAll allows all incoming routes.
func (*FrrConfigurationBuilder) WithToReceiveModeFiltered ¶
func (builder *FrrConfigurationBuilder) WithToReceiveModeFiltered(prefixes []string, routerIndex, neighborIndex uint) *FrrConfigurationBuilder
WithToReceiveModeFiltered allows only specified prefixes to be received.
type FrrNodeStateBuilder ¶
type FrrNodeStateBuilder struct { Definition *frrtypes.FRRNodeState Object *frrtypes.FRRNodeState // contains filtered or unexported fields }
FrrNodeStateBuilder provides struct for FrrNodeState object which contains connection to cluster and frrconfiguration definitions.
func ListFrrNodeState ¶
func ListFrrNodeState( apiClient *clients.Settings, options ...client.ListOptions) ([]*FrrNodeStateBuilder, error)
ListFrrNodeState returns frr node state inventory in the given cluster.
func PullFrrNodeState ¶
func PullFrrNodeState(apiClient *clients.Settings, name string) (*FrrNodeStateBuilder, error)
PullFrrNodeState retrieves an existing FrrNodeState object from the cluster.
func (*FrrNodeStateBuilder) Exists ¶
func (builder *FrrNodeStateBuilder) Exists() bool
Exists checks whether the given FRRNodeState exists.
func (*FrrNodeStateBuilder) Get ¶
func (builder *FrrNodeStateBuilder) Get() (*frrtypes.FRRNodeState, error)
Get returns FrrNodeState object if found.
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 ¶
func (builder *IPAddressPoolBuilder) WithOptions(options ...IPAddressPoolAdditionalOptions) *IPAddressPoolBuilder
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 ¶
func (builder *L2AdvertisementBuilder) Get() (*mlbtypes.L2Advertisement, error)
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 ¶
func (builder *L2AdvertisementBuilder) WithOptions( options ...L2AdvertisementAdditionalOptions) *L2AdvertisementBuilder
WithOptions creates L2Advertisement with generic mutation options.