Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the frrk8s v1alpha1 API group +kubebuilder:object:generate=true +groupName=frrk8s.metallb.io
Index ¶
- Variables
- type Advertise
- type AllowMode
- type AllowedInPrefixes
- type AllowedOutPrefixes
- type BFDProfile
- type BGPConfig
- type CommunityPrefixes
- type FRRConfiguration
- func (in *FRRConfiguration) DeepCopy() *FRRConfiguration
- func (in *FRRConfiguration) DeepCopyInto(out *FRRConfiguration)
- func (in *FRRConfiguration) DeepCopyObject() runtime.Object
- func (frrConfig *FRRConfiguration) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (frrConfig *FRRConfiguration) ValidateCreate() (admission.Warnings, error)
- func (frrConfig *FRRConfiguration) ValidateDelete() (admission.Warnings, error)
- func (frrConfig *FRRConfiguration) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
- type FRRConfigurationList
- type FRRConfigurationSpec
- type FRRConfigurationStatus
- type FRRNodeState
- type FRRNodeStateList
- type FRRNodeStateSpec
- type FRRNodeStateStatus
- type LocalPrefPrefixes
- type Neighbor
- type PrefixSelector
- type RawConfig
- type Receive
- type Router
Constants ¶
This section is empty.
Variables ¶
var ( Logger log.Logger WebhookClient client.Reader Validate func(resources ...client.ObjectList) error )
var ( // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: "frrk8s.metallb.io", Version: "v1beta1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme. SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type Advertise ¶
type Advertise struct { // Allowed is is the list of prefixes allowed to be propagated to // this neighbor. They must match the prefixes defined in the router. Allowed AllowedOutPrefixes `json:"allowed,omitempty"` // PrefixesWithLocalPref is a list of prefixes that are associated to a local // preference when being advertised. The prefixes associated to a given local pref // must be in the prefixes allowed to be advertised. // +optional PrefixesWithLocalPref []LocalPrefPrefixes `json:"withLocalPref,omitempty"` // PrefixesWithCommunity is a list of prefixes that are associated to a // bgp community when being advertised. The prefixes associated to a given local pref // must be in the prefixes allowed to be advertised. // +optional PrefixesWithCommunity []CommunityPrefixes `json:"withCommunity,omitempty"` }
func (*Advertise) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Advertise.
func (*Advertise) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AllowedInPrefixes ¶
type AllowedInPrefixes struct { Prefixes []PrefixSelector `json:"prefixes,omitempty"` // Mode is the mode to use when handling the prefixes. // When set to "filtered", only the prefixes in the given list will be allowed. // When set to "all", all the prefixes configured on the router will be allowed. // +kubebuilder:default:=filtered Mode AllowMode `json:"mode,omitempty"` }
func (*AllowedInPrefixes) DeepCopy ¶
func (in *AllowedInPrefixes) DeepCopy() *AllowedInPrefixes
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllowedInPrefixes.
func (*AllowedInPrefixes) DeepCopyInto ¶
func (in *AllowedInPrefixes) DeepCopyInto(out *AllowedInPrefixes)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AllowedOutPrefixes ¶
type AllowedOutPrefixes struct { Prefixes []string `json:"prefixes,omitempty"` // Mode is the mode to use when handling the prefixes. // When set to "filtered", only the prefixes in the given list will be allowed. // When set to "all", all the prefixes configured on the router will be allowed. // +kubebuilder:default:=filtered Mode AllowMode `json:"mode,omitempty"` }
func (*AllowedOutPrefixes) DeepCopy ¶
func (in *AllowedOutPrefixes) DeepCopy() *AllowedOutPrefixes
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllowedOutPrefixes.
func (*AllowedOutPrefixes) DeepCopyInto ¶
func (in *AllowedOutPrefixes) DeepCopyInto(out *AllowedOutPrefixes)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BFDProfile ¶
type BFDProfile struct { // The name of the BFD Profile to be referenced in other parts // of the configuration. Name string `json:"name"` // The minimum interval that this system is capable of // receiving control packets in milliseconds. // Defaults to 300ms. // +kubebuilder:validation:Maximum:=60000 // +kubebuilder:validation:Minimum:=10 // +optional ReceiveInterval *uint32 `json:"receiveInterval,omitempty"` // The minimum transmission interval (less jitter) // that this system wants to use to send BFD control packets in // milliseconds. Defaults to 300ms // +kubebuilder:validation:Maximum:=60000 // +kubebuilder:validation:Minimum:=10 // +optional TransmitInterval *uint32 `json:"transmitInterval,omitempty"` // Configures the detection multiplier to determine // packet loss. The remote transmission interval will be multiplied // by this value to determine the connection loss detection timer. // +kubebuilder:validation:Maximum:=255 // +kubebuilder:validation:Minimum:=2 // +optional DetectMultiplier *uint32 `json:"detectMultiplier,omitempty"` // Configures the minimal echo receive transmission // interval that this system is capable of handling in milliseconds. // Defaults to 50ms // +kubebuilder:validation:Maximum:=60000 // +kubebuilder:validation:Minimum:=10 // +optional EchoInterval *uint32 `json:"echoInterval,omitempty"` // Enables or disables the echo transmission mode. // This mode is disabled by default, and not supported on multi // hops setups. // +optional EchoMode *bool `json:"echoMode,omitempty"` // Mark session as passive: a passive session will not // attempt to start the connection and will wait for control packets // from peer before it begins replying. // +optional PassiveMode *bool `json:"passiveMode,omitempty"` // For multi hop sessions only: configure the minimum // expected TTL for an incoming BFD control packet. // +kubebuilder:validation:Maximum:=254 // +kubebuilder:validation:Minimum:=1 // +optional MinimumTTL *uint32 `json:"minimumTtl,omitempty"` }
BFDProfile is the configuration related to the BFD protocol associated to a BGP session.
func (*BFDProfile) DeepCopy ¶
func (in *BFDProfile) DeepCopy() *BFDProfile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BFDProfile.
func (*BFDProfile) DeepCopyInto ¶
func (in *BFDProfile) DeepCopyInto(out *BFDProfile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BGPConfig ¶
type BGPConfig struct { // Routers is the list of routers we want FRR to configure (one per VRF). // +optional Routers []Router `json:"routers"` // BFDProfiles is the list of bfd profiles to be used when configuring the neighbors. // +optional BFDProfiles []BFDProfile `json:"bfdProfiles,omitempty"` }
BGPConfig is the configuration related to the BGP protocol.
func (*BGPConfig) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BGPConfig.
func (*BGPConfig) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CommunityPrefixes ¶
type CommunityPrefixes struct { // Prefixes is the list of prefixes associated to the community. // +kubebuilder:validation:MinItems=1 // +kubebuilder:validation:Format="cidr" Prefixes []string `json:"prefixes,omitempty"` // Community is the community associated to the prefixes. Community string `json:"community,omitempty"` }
CommunityPrefixes is a list of prefixes associated to a community.
func (*CommunityPrefixes) DeepCopy ¶
func (in *CommunityPrefixes) DeepCopy() *CommunityPrefixes
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommunityPrefixes.
func (*CommunityPrefixes) DeepCopyInto ¶
func (in *CommunityPrefixes) DeepCopyInto(out *CommunityPrefixes)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FRRConfiguration ¶
type FRRConfiguration struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec FRRConfigurationSpec `json:"spec,omitempty"` Status FRRConfigurationStatus `json:"status,omitempty"` }
FRRConfiguration is a piece of FRR configuration.
func (*FRRConfiguration) DeepCopy ¶
func (in *FRRConfiguration) DeepCopy() *FRRConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FRRConfiguration.
func (*FRRConfiguration) DeepCopyInto ¶
func (in *FRRConfiguration) DeepCopyInto(out *FRRConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FRRConfiguration) DeepCopyObject ¶
func (in *FRRConfiguration) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*FRRConfiguration) SetupWebhookWithManager ¶
func (frrConfig *FRRConfiguration) SetupWebhookWithManager(mgr ctrl.Manager) error
func (*FRRConfiguration) ValidateCreate ¶
func (frrConfig *FRRConfiguration) ValidateCreate() (admission.Warnings, error)
ValidateCreate implements webhook.Validator so a webhook will be registered for FRRConfiguration.
func (*FRRConfiguration) ValidateDelete ¶
func (frrConfig *FRRConfiguration) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for FRRConfiguration.
func (*FRRConfiguration) ValidateUpdate ¶
ValidateUpdate implements webhook.Validator so a webhook will be registered for FRRConfiguration.
type FRRConfigurationList ¶
type FRRConfigurationList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []FRRConfiguration `json:"items"` }
FRRConfigurationList contains a list of FRRConfiguration.
func (*FRRConfigurationList) DeepCopy ¶
func (in *FRRConfigurationList) DeepCopy() *FRRConfigurationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FRRConfigurationList.
func (*FRRConfigurationList) DeepCopyInto ¶
func (in *FRRConfigurationList) DeepCopyInto(out *FRRConfigurationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FRRConfigurationList) DeepCopyObject ¶
func (in *FRRConfigurationList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type FRRConfigurationSpec ¶
type FRRConfigurationSpec struct { // BGP is the configuration related to the BGP protocol. // +optional BGP BGPConfig `json:"bgp,omitempty"` // Raw is a snippet of raw frr configuration that gets appended to the // one rendered translating the type safe API. // +optional Raw RawConfig `json:"raw,omitempty"` // NodeSelector limits the nodes that will attempt to apply this config. // When specified, the configuration will be considered only on nodes // whose labels match the specified selectors. // When it is not specified all nodes will attempt to apply this config. // +optional NodeSelector metav1.LabelSelector `json:"nodeSelector,omitempty"` }
FRRConfigurationSpec defines the desired state of FRRConfiguration.
func (*FRRConfigurationSpec) DeepCopy ¶
func (in *FRRConfigurationSpec) DeepCopy() *FRRConfigurationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FRRConfigurationSpec.
func (*FRRConfigurationSpec) DeepCopyInto ¶
func (in *FRRConfigurationSpec) DeepCopyInto(out *FRRConfigurationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FRRConfigurationStatus ¶
type FRRConfigurationStatus struct { }
FRRConfigurationStatus defines the observed state of FRRConfiguration.
func (*FRRConfigurationStatus) DeepCopy ¶
func (in *FRRConfigurationStatus) DeepCopy() *FRRConfigurationStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FRRConfigurationStatus.
func (*FRRConfigurationStatus) DeepCopyInto ¶
func (in *FRRConfigurationStatus) DeepCopyInto(out *FRRConfigurationStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FRRNodeState ¶
type FRRNodeState struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec FRRNodeStateSpec `json:"spec,omitempty"` Status FRRNodeStateStatus `json:"status,omitempty"` }
FRRNodeState exposes the status of the FRR instance running on each node.
func (*FRRNodeState) DeepCopy ¶
func (in *FRRNodeState) DeepCopy() *FRRNodeState
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FRRNodeState.
func (*FRRNodeState) DeepCopyInto ¶
func (in *FRRNodeState) DeepCopyInto(out *FRRNodeState)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FRRNodeState) DeepCopyObject ¶
func (in *FRRNodeState) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type FRRNodeStateList ¶
type FRRNodeStateList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []FRRNodeState `json:"items"` }
FRRNodeStateList contains a list of FRRNodeStatus.
func (*FRRNodeStateList) DeepCopy ¶
func (in *FRRNodeStateList) DeepCopy() *FRRNodeStateList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FRRNodeStateList.
func (*FRRNodeStateList) DeepCopyInto ¶
func (in *FRRNodeStateList) DeepCopyInto(out *FRRNodeStateList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FRRNodeStateList) DeepCopyObject ¶
func (in *FRRNodeStateList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type FRRNodeStateSpec ¶
type FRRNodeStateSpec struct { }
FRRNodeStateSpec defines the desired state of FRRNodeState.
func (*FRRNodeStateSpec) DeepCopy ¶
func (in *FRRNodeStateSpec) DeepCopy() *FRRNodeStateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FRRNodeStateSpec.
func (*FRRNodeStateSpec) DeepCopyInto ¶
func (in *FRRNodeStateSpec) DeepCopyInto(out *FRRNodeStateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FRRNodeStateStatus ¶
type FRRNodeStateStatus struct { // RunningConfig represents the current FRR running config, which is the configuration the FRR instance is currently running with. RunningConfig string `json:"runningConfig,omitempty"` // LastConversionResult is the status of the last translation between the `FRRConfiguration`s resources and FRR's configuration, contains "success" or an error. LastConversionResult string `json:"lastConversionResult,omitempty"` // LastReloadResult represents the status of the last configuration update operation by FRR, contains "success" or an error. LastReloadResult string `json:"lastReloadResult,omitempty"` }
FRRNodeStateStatus defines the observed state of FRRNodeState.
func (*FRRNodeStateStatus) DeepCopy ¶
func (in *FRRNodeStateStatus) DeepCopy() *FRRNodeStateStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FRRNodeStateStatus.
func (*FRRNodeStateStatus) DeepCopyInto ¶
func (in *FRRNodeStateStatus) DeepCopyInto(out *FRRNodeStateStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalPrefPrefixes ¶
type LocalPrefPrefixes struct { // Prefixes is the list of prefixes associated to the local preference. // +kubebuilder:validation:MinItems=1 // +kubebuilder:validation:Format="cidr" Prefixes []string `json:"prefixes,omitempty"` // LocalPref is the local preference associated to the prefixes. LocalPref uint32 `json:"localPref,omitempty"` }
LocalPrefPrefixes is a list of prefixes associated to a local preference.
func (*LocalPrefPrefixes) DeepCopy ¶
func (in *LocalPrefPrefixes) DeepCopy() *LocalPrefPrefixes
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalPrefPrefixes.
func (*LocalPrefPrefixes) DeepCopyInto ¶
func (in *LocalPrefPrefixes) DeepCopyInto(out *LocalPrefPrefixes)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Neighbor ¶
type Neighbor struct { // ASN is the AS number to use for the local end of the session. // +kubebuilder:validation:Minimum=0 // +kubebuilder:validation:Maximum=4294967295 ASN uint32 `json:"asn"` // Address is the IP address to establish the session with. Address string `json:"address"` // Port is the port to dial when establishing the session. // Defaults to 179. // +optional // +kubebuilder:validation:Minimum=0 // +kubebuilder:validation:Maximum=16384 Port *uint16 `json:"port,omitempty"` // Password to be used for establishing the BGP session. // Password and PasswordSecret are mutually exclusive. // +optional Password string `json:"password,omitempty"` // PasswordSecret is name of the authentication secret for the neighbor. // the secret must be of type "kubernetes.io/basic-auth", and created in the // same namespace as the frr-k8s daemon. The password is stored in the // secret as the key "password". // Password and PasswordSecret are mutually exclusive. // +optional PasswordSecret v1.SecretReference `json:"passwordSecret,omitempty"` // HoldTime is the requested BGP hold time, per RFC4271. // Defaults to 180s. // +optional HoldTime *metav1.Duration `json:"holdTime,omitempty"` // KeepaliveTime is the requested BGP keepalive time, per RFC4271. // Defaults to 60s. // +optional KeepaliveTime *metav1.Duration `json:"keepaliveTime,omitempty"` // Requested BGP connect time, controls how long BGP waits between connection attempts to a neighbor. // +kubebuilder:validation:XValidation:message="connect time should be between 1 seconds to 65535",rule="duration(self).getSeconds() >= 1 && duration(self).getSeconds() <= 65535" // +kubebuilder:validation:XValidation:message="connect time should contain a whole number of seconds",rule="duration(self).getMilliseconds() % 1000 == 0" // +optional ConnectTime *metav1.Duration `json:"connectTime,omitempty"` // EBGPMultiHop indicates if the BGPPeer is multi-hops away. // +optional EBGPMultiHop bool `json:"ebgpMultiHop,omitempty"` // BFDProfile is the name of the BFD Profile to be used for the BFD session associated // to the BGP session. If not set, the BFD session won't be set up. // +optional BFDProfile string `json:"bfdProfile,omitempty"` // ToAdvertise represents the list of prefixes to advertise to the given neighbor // and the associated properties. // +optional ToAdvertise Advertise `json:"toAdvertise,omitempty"` // ToReceive represents the list of prefixes to receive from the given neighbor. // +optional ToReceive Receive `json:"toReceive,omitempty"` // To set if we want to disable MP BGP that will separate IPv4 and IPv6 route exchanges into distinct BGP sessions. // +optional // +kubebuilder:default:=false DisableMP bool `json:"disableMP,omitempty"` }
Neighbor represents a BGP Neighbor we want FRR to connect to.
func (*Neighbor) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Neighbor.
func (*Neighbor) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PrefixSelector ¶
type PrefixSelector struct { // +kubebuilder:validation:Format="cidr" Prefix string `json:"prefix,omitempty"` // The prefix length modifier. This selector accepts any matching prefix with length // less or equal the given value. // +kubebuilder:validation:Maximum:=128 // +kubebuilder:validation:Minimum:=1 LE uint32 `json:"le,omitempty"` // The prefix length modifier. This selector accepts any matching prefix with length // greater or equal the given value. // +kubebuilder:validation:Maximum:=128 // +kubebuilder:validation:Minimum:=1 GE uint32 `json:"ge,omitempty"` }
PrefixSelector is a filter of prefixes to receive.
func (*PrefixSelector) DeepCopy ¶
func (in *PrefixSelector) DeepCopy() *PrefixSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrefixSelector.
func (*PrefixSelector) DeepCopyInto ¶
func (in *PrefixSelector) DeepCopyInto(out *PrefixSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RawConfig ¶
type RawConfig struct { // Priority is the order with this configuration is appended to the // bottom of the rendered configuration. A higher value means the // raw config is appended later in the configuration file. Priority int `json:"priority,omitempty"` // Config is a raw FRR configuration to be appended to the configuration // rendered via the k8s api. Config string `json:"rawConfig,omitempty"` }
RawConfig is a snippet of raw frr configuration that gets appended to the rendered configuration.
func (*RawConfig) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RawConfig.
func (*RawConfig) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Receive ¶
type Receive struct { // Allowed is the list of prefixes allowed to be received from // this neighbor. // +optional Allowed AllowedInPrefixes `json:"allowed,omitempty"` }
Receive represents a list of prefixes to receive from the given neighbor.
func (*Receive) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Receive.
func (*Receive) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Router ¶
type Router struct { // ASN is the AS number to use for the local end of the session. // +kubebuilder:validation:Minimum=0 // +kubebuilder:validation:Maximum=4294967295 ASN uint32 `json:"asn"` // ID is the BGP router ID // +optional ID string `json:"id,omitempty"` // VRF is the host vrf used to establish sessions from this router. // +optional VRF string `json:"vrf,omitempty"` // Neighbors is the list of neighbors we want to establish BGP sessions with. // +optional Neighbors []Neighbor `json:"neighbors,omitempty"` // Prefixes is the list of prefixes we want to advertise from this router instance. // +optional Prefixes []string `json:"prefixes,omitempty"` }
Router represent a neighbor router we want FRR to connect to.
func (*Router) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Router.
func (*Router) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.