Documentation ¶
Index ¶
- Constants
- func CanClusterPrefixFitRequest(clusterPrefix *networkv1alpha1.ClusterPrefix, ...) bool
- func CanIPSetFitRequest(set *netaddr.IPSet, request networkv1alpha1.PrefixAllocationRequest) bool
- func CanPrefixFitRequest(prefix *networkv1alpha1.Prefix, ...) bool
- func IPRangeFromIPPlusLength(from netaddr.IP, length int64) (netaddr.IPRange, error)
- func IPSetFromNetaddrPrefix(prefix netaddr.IPPrefix) (*netaddr.IPSet, error)
- func IPSetFromPrefixes(prefixes []commonv1alpha1.IPPrefix) (*netaddr.IPSet, error)
- func IPSetRemoveFreeRange(set *netaddr.IPSet, rngLength int64) (netaddr.IPRange, *netaddr.IPSet, bool)
- func IPSetRemovePrefix(set *netaddr.IPSet, prefix netaddr.IPPrefix) (*netaddr.IPSet, bool)
- func IPSetRemoveRange(set *netaddr.IPSet, rng netaddr.IPRange) (*netaddr.IPSet, bool)
- func IsAPINamespaced(obj runtime.Object, scheme *runtime.Scheme, mapper meta.RESTMapper) (bool, error)
- func IsAPINamespacedWithGVK(gk schema.GroupVersionKind, mapper meta.RESTMapper) (bool, error)
- func IsClusterPrefixAllocationFailed(allocation *networkv1alpha1.ClusterPrefixAllocation) bool
- func IsClusterPrefixAllocationInTerminalState(allocation *networkv1alpha1.ClusterPrefixAllocation) bool
- func IsClusterPrefixAllocationSucceeded(allocation *networkv1alpha1.ClusterPrefixAllocation) bool
- func IsClusterPrefixReady(prefix *networkv1alpha1.ClusterPrefix) bool
- func IsIPReady(ip *networkv1alpha1.IP) bool
- func IsOwned(scheme *runtime.Scheme, owner, controlled client.Object) (bool, error)
- func IsPrefixAllocationFailed(allocation *networkv1alpha1.PrefixAllocation) bool
- func IsPrefixAllocationInTerminalState(allocation *networkv1alpha1.PrefixAllocation) bool
- func IsPrefixAllocationSucceeded(allocation *networkv1alpha1.PrefixAllocation) bool
- func IsPrefixReady(prefix *networkv1alpha1.Prefix) bool
- func IsRootClusterPrefix(prefix *networkv1alpha1.ClusterPrefix) bool
- func IsRootPrefix(prefix *networkv1alpha1.Prefix) bool
- func ListOwned(ctx context.Context, c client.Client, scheme *runtime.Scheme, ...) error
- func PrefixAllocationRequestMatchesAllocator(request networkv1alpha1.PrefixAllocationRequest, allocation PrefixAllocationer) bool
- func RangeSize(rng netaddr.IPRange) *big.Int
- func RemoveFreePrefixForRequest(set *netaddr.IPSet, allocation networkv1alpha1.PrefixAllocationRequest) (netaddr.IPPrefix, netaddr.IPRange, *netaddr.IPSet, bool)
- func RemoveIntersection(set *netaddr.IPSet, prefix netaddr.IPPrefix) ([]netaddr.IPPrefix, *netaddr.IPSet)
- type ClusterPrefix
- func (p *ClusterPrefix) Available() []commonv1alpha1.IPPrefix
- func (p *ClusterPrefix) Label() string
- func (p *ClusterPrefix) Object() client.Object
- func (p *ClusterPrefix) PrefixRef() *networkv1alpha1.PrefixReference
- func (p *ClusterPrefix) PrefixSelector() *networkv1alpha1.PrefixSelector
- func (p *ClusterPrefix) Request() networkv1alpha1.PrefixAllocationRequest
- type ClusterPrefixAllocation
- func (a *ClusterPrefixAllocation) Object() client.Object
- func (a *ClusterPrefixAllocation) PrefixRef() *networkv1alpha1.PrefixReference
- func (a *ClusterPrefixAllocation) ReadyState() PrefixAllocationReadyState
- func (a *ClusterPrefixAllocation) Request() networkv1alpha1.PrefixAllocationRequest
- func (a *ClusterPrefixAllocation) Result() networkv1alpha1.PrefixAllocationResult
- type ClusterPrefixAllocationSchedulerReconciler
- type ClusterPrefixReconciler
- type GatewayReconciler
- type IP
- type IPAMRangeReconciler
- type IPReconciler
- type Prefix
- func (p *Prefix) Available() []commonv1alpha1.IPPrefix
- func (p *Prefix) Label() string
- func (p *Prefix) Object() client.Object
- func (p *Prefix) PrefixRef() *networkv1alpha1.PrefixReference
- func (p *Prefix) PrefixSelector() *networkv1alpha1.PrefixSelector
- func (p *Prefix) Request() networkv1alpha1.PrefixAllocationRequest
- type PrefixAllocation
- func (p *PrefixAllocation) Object() client.Object
- func (p *PrefixAllocation) PrefixRef() *networkv1alpha1.PrefixReference
- func (p *PrefixAllocation) ReadyState() PrefixAllocationReadyState
- func (p *PrefixAllocation) Request() networkv1alpha1.PrefixAllocationRequest
- func (p *PrefixAllocation) Result() networkv1alpha1.PrefixAllocationResult
- type PrefixAllocationReadyState
- type PrefixAllocationSchedulerReconciler
- type PrefixAllocationer
- type PrefixAllocator
- type PrefixReconciler
- type PrefixRequester
- type Prefixer
- type ReservedIPReconciler
- type RoutingDomainReconciler
- type SecurityGroupReconciler
- type SubnetReconciler
Constants ¶
const (
ClusterPrefixAllocationPrefixLabel = "network.onmetal.de/clusterprefix"
)
const (
ClusterPrefixFinalizer = "network.onmetal.de/clusterprefix"
)
const (
PrefixAllocationIPLabel = "network.onmetal.de/ip"
)
const (
PrefixAllocationPrefixLabel = "network.onmetal.de/prefix"
)
const (
PrefixFinalizer = "network.onmetal.de/prefix"
)
Variables ¶
This section is empty.
Functions ¶
func CanClusterPrefixFitRequest ¶ added in v0.0.9
func CanClusterPrefixFitRequest(clusterPrefix *networkv1alpha1.ClusterPrefix, request networkv1alpha1.PrefixAllocationRequest) bool
func CanIPSetFitRequest ¶ added in v0.0.9
func CanIPSetFitRequest(set *netaddr.IPSet, request networkv1alpha1.PrefixAllocationRequest) bool
func CanPrefixFitRequest ¶ added in v0.0.9
func CanPrefixFitRequest(prefix *networkv1alpha1.Prefix, request networkv1alpha1.PrefixAllocationRequest) bool
func IPRangeFromIPPlusLength ¶ added in v0.0.9
func IPSetFromNetaddrPrefix ¶ added in v0.0.9
func IPSetFromPrefixes ¶ added in v0.0.9
func IPSetFromPrefixes(prefixes []commonv1alpha1.IPPrefix) (*netaddr.IPSet, error)
func IPSetRemoveFreeRange ¶ added in v0.0.9
func IPSetRemovePrefix ¶ added in v0.0.9
func IPSetRemoveRange ¶ added in v0.0.9
func IsAPINamespaced ¶ added in v0.0.9
func IsAPINamespaced(obj runtime.Object, scheme *runtime.Scheme, mapper meta.RESTMapper) (bool, error)
IsAPINamespaced returns true if the object is namespace scoped. For unstructured objects the gvk is found from the object itself.
func IsAPINamespacedWithGVK ¶ added in v0.0.9
func IsAPINamespacedWithGVK(gk schema.GroupVersionKind, mapper meta.RESTMapper) (bool, error)
IsAPINamespacedWithGVK returns true if the object having the provided GVK is namespace scoped.
func IsClusterPrefixAllocationFailed ¶ added in v0.0.9
func IsClusterPrefixAllocationFailed(allocation *networkv1alpha1.ClusterPrefixAllocation) bool
func IsClusterPrefixAllocationInTerminalState ¶ added in v0.0.9
func IsClusterPrefixAllocationInTerminalState(allocation *networkv1alpha1.ClusterPrefixAllocation) bool
func IsClusterPrefixAllocationSucceeded ¶ added in v0.0.9
func IsClusterPrefixAllocationSucceeded(allocation *networkv1alpha1.ClusterPrefixAllocation) bool
func IsClusterPrefixReady ¶ added in v0.0.9
func IsClusterPrefixReady(prefix *networkv1alpha1.ClusterPrefix) bool
func IsIPReady ¶ added in v0.0.9
func IsIPReady(ip *networkv1alpha1.IP) bool
func IsPrefixAllocationFailed ¶ added in v0.0.9
func IsPrefixAllocationFailed(allocation *networkv1alpha1.PrefixAllocation) bool
func IsPrefixAllocationInTerminalState ¶ added in v0.0.9
func IsPrefixAllocationInTerminalState(allocation *networkv1alpha1.PrefixAllocation) bool
func IsPrefixAllocationSucceeded ¶ added in v0.0.9
func IsPrefixAllocationSucceeded(allocation *networkv1alpha1.PrefixAllocation) bool
func IsPrefixReady ¶ added in v0.0.9
func IsPrefixReady(prefix *networkv1alpha1.Prefix) bool
func IsRootClusterPrefix ¶ added in v0.0.9
func IsRootClusterPrefix(prefix *networkv1alpha1.ClusterPrefix) bool
func IsRootPrefix ¶ added in v0.0.9
func IsRootPrefix(prefix *networkv1alpha1.Prefix) bool
func PrefixAllocationRequestMatchesAllocator ¶ added in v0.0.9
func PrefixAllocationRequestMatchesAllocator(request networkv1alpha1.PrefixAllocationRequest, allocation PrefixAllocationer) bool
func RangeSize ¶ added in v0.0.9
RangeSize computes the number of ips in a range. TODO: we should come up with more efficient arithmetics as the netaddr package does.
func RemoveFreePrefixForRequest ¶ added in v0.0.9
Types ¶
type ClusterPrefix ¶ added in v0.0.9
type ClusterPrefix networkv1alpha1.ClusterPrefix
func (*ClusterPrefix) Available ¶ added in v0.0.9
func (p *ClusterPrefix) Available() []commonv1alpha1.IPPrefix
func (*ClusterPrefix) Label ¶ added in v0.0.9
func (p *ClusterPrefix) Label() string
func (*ClusterPrefix) Object ¶ added in v0.0.9
func (p *ClusterPrefix) Object() client.Object
func (*ClusterPrefix) PrefixRef ¶ added in v0.0.9
func (p *ClusterPrefix) PrefixRef() *networkv1alpha1.PrefixReference
func (*ClusterPrefix) PrefixSelector ¶ added in v0.0.9
func (p *ClusterPrefix) PrefixSelector() *networkv1alpha1.PrefixSelector
func (*ClusterPrefix) Request ¶ added in v0.0.9
func (p *ClusterPrefix) Request() networkv1alpha1.PrefixAllocationRequest
type ClusterPrefixAllocation ¶ added in v0.0.9
type ClusterPrefixAllocation networkv1alpha1.ClusterPrefixAllocation
func (*ClusterPrefixAllocation) Object ¶ added in v0.0.9
func (a *ClusterPrefixAllocation) Object() client.Object
func (*ClusterPrefixAllocation) PrefixRef ¶ added in v0.0.9
func (a *ClusterPrefixAllocation) PrefixRef() *networkv1alpha1.PrefixReference
func (*ClusterPrefixAllocation) ReadyState ¶ added in v0.0.9
func (a *ClusterPrefixAllocation) ReadyState() PrefixAllocationReadyState
func (*ClusterPrefixAllocation) Request ¶ added in v0.0.9
func (a *ClusterPrefixAllocation) Request() networkv1alpha1.PrefixAllocationRequest
func (*ClusterPrefixAllocation) Result ¶ added in v0.0.9
func (a *ClusterPrefixAllocation) Result() networkv1alpha1.PrefixAllocationResult
type ClusterPrefixAllocationSchedulerReconciler ¶ added in v0.0.9
func (*ClusterPrefixAllocationSchedulerReconciler) Reconcile ¶ added in v0.0.9
func (r *ClusterPrefixAllocationSchedulerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
func (*ClusterPrefixAllocationSchedulerReconciler) SetupWithManager ¶ added in v0.0.9
func (r *ClusterPrefixAllocationSchedulerReconciler) SetupWithManager(mgr manager.Manager) error
type ClusterPrefixReconciler ¶ added in v0.0.9
ClusterPrefixReconciler reconciles a ClusterPrefix object
func (*ClusterPrefixReconciler) Reconcile ¶ added in v0.0.9
func (r *ClusterPrefixReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
func (*ClusterPrefixReconciler) SetupWithManager ¶ added in v0.0.9
func (r *ClusterPrefixReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type GatewayReconciler ¶
GatewayReconciler reconciles a Gateway object
func (*GatewayReconciler) Reconcile ¶
Reconcile moves the current state of the cluster closer to the desired state.
func (*GatewayReconciler) SetupWithManager ¶
func (r *GatewayReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type IP ¶ added in v0.0.9
type IP networkv1alpha1.IP
func (*IP) PrefixRef ¶ added in v0.0.9
func (i *IP) PrefixRef() *networkv1alpha1.PrefixReference
func (*IP) PrefixSelector ¶ added in v0.0.9
func (i *IP) PrefixSelector() *networkv1alpha1.PrefixSelector
func (*IP) Request ¶ added in v0.0.9
func (i *IP) Request() networkv1alpha1.PrefixAllocationRequest
type IPAMRangeReconciler ¶ added in v0.0.5
IPAMRangeReconciler reconciles a IPAMRange object
func (*IPAMRangeReconciler) Reconcile ¶ added in v0.0.5
Reconcile if parent -> handle request part and set range
func (*IPAMRangeReconciler) SetupWithManager ¶ added in v0.0.5
func (r *IPAMRangeReconciler) SetupWithManager(mgr manager.Manager) error
SetupWithManager sets up the controller with the Manager.
type IPReconciler ¶ added in v0.0.9
IPReconciler reconciles a IP object
func (*IPReconciler) Reconcile ¶ added in v0.0.9
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
func (*IPReconciler) SetupWithManager ¶ added in v0.0.9
func (r *IPReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type Prefix ¶ added in v0.0.9
type Prefix networkv1alpha1.Prefix
func (*Prefix) Available ¶ added in v0.0.9
func (p *Prefix) Available() []commonv1alpha1.IPPrefix
func (*Prefix) PrefixRef ¶ added in v0.0.9
func (p *Prefix) PrefixRef() *networkv1alpha1.PrefixReference
func (*Prefix) PrefixSelector ¶ added in v0.0.9
func (p *Prefix) PrefixSelector() *networkv1alpha1.PrefixSelector
func (*Prefix) Request ¶ added in v0.0.9
func (p *Prefix) Request() networkv1alpha1.PrefixAllocationRequest
type PrefixAllocation ¶ added in v0.0.9
type PrefixAllocation networkv1alpha1.PrefixAllocation
func (*PrefixAllocation) Object ¶ added in v0.0.9
func (p *PrefixAllocation) Object() client.Object
func (*PrefixAllocation) PrefixRef ¶ added in v0.0.9
func (p *PrefixAllocation) PrefixRef() *networkv1alpha1.PrefixReference
func (*PrefixAllocation) ReadyState ¶ added in v0.0.9
func (p *PrefixAllocation) ReadyState() PrefixAllocationReadyState
func (*PrefixAllocation) Request ¶ added in v0.0.9
func (p *PrefixAllocation) Request() networkv1alpha1.PrefixAllocationRequest
func (*PrefixAllocation) Result ¶ added in v0.0.9
func (p *PrefixAllocation) Result() networkv1alpha1.PrefixAllocationResult
type PrefixAllocationReadyState ¶ added in v0.0.9
type PrefixAllocationReadyState int8
const ( PrefixAllocationFailed PrefixAllocationReadyState = iota - 1 PrefixAllocationUnknown PrefixAllocationPending PrefixAllocationSucceeded )
type PrefixAllocationSchedulerReconciler ¶ added in v0.0.9
func (*PrefixAllocationSchedulerReconciler) Reconcile ¶ added in v0.0.9
func (r *PrefixAllocationSchedulerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
func (*PrefixAllocationSchedulerReconciler) SetupWithManager ¶ added in v0.0.9
func (r *PrefixAllocationSchedulerReconciler) SetupWithManager(mgr manager.Manager) error
type PrefixAllocationer ¶ added in v0.0.9
type PrefixAllocationer interface { Object() client.Object PrefixRef() *networkv1alpha1.PrefixReference Request() networkv1alpha1.PrefixAllocationRequest Result() networkv1alpha1.PrefixAllocationResult ReadyState() PrefixAllocationReadyState }
func CreateAllocator ¶ added in v0.0.9
func CreateAllocator(scheme *runtime.Scheme, mapper meta.RESTMapper, requester PrefixRequester) (PrefixAllocationer, error)
type PrefixAllocator ¶ added in v0.0.9
func NewPrefixAllocator ¶ added in v0.0.9
func NewPrefixAllocator(c client.Client, scheme *runtime.Scheme) *PrefixAllocator
func (*PrefixAllocator) Apply ¶ added in v0.0.9
func (a *PrefixAllocator) Apply(ctx context.Context, requester PrefixRequester) (PrefixAllocationer, error)
type PrefixReconciler ¶ added in v0.0.9
PrefixReconciler reconciles a Prefix object
func (*PrefixReconciler) Reconcile ¶ added in v0.0.9
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
func (*PrefixReconciler) SetupWithManager ¶ added in v0.0.9
func (r *PrefixReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type PrefixRequester ¶ added in v0.0.9
type PrefixRequester interface { Object() client.Object Label() string Request() networkv1alpha1.PrefixAllocationRequest PrefixRef() *networkv1alpha1.PrefixReference PrefixSelector() *networkv1alpha1.PrefixSelector }
type Prefixer ¶ added in v0.0.9
type Prefixer interface { Object() client.Object Available() []commonv1alpha1.IPPrefix }
type ReservedIPReconciler ¶ added in v0.0.4
ReservedIPReconciler reconciles a ReservedIP object
func (*ReservedIPReconciler) Reconcile ¶ added in v0.0.4
func (r *ReservedIPReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
func (*ReservedIPReconciler) SetupWithManager ¶ added in v0.0.4
func (r *ReservedIPReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type RoutingDomainReconciler ¶ added in v0.0.5
RoutingDomainReconciler reconciles a RoutingDomain object
func (*RoutingDomainReconciler) Reconcile ¶ added in v0.0.5
func (r *RoutingDomainReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the RoutingDomain object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile
func (*RoutingDomainReconciler) SetupWithManager ¶ added in v0.0.5
func (r *RoutingDomainReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type SecurityGroupReconciler ¶
SecurityGroupReconciler reconciles a SecurityGroup object
func (*SecurityGroupReconciler) Reconcile ¶
func (r *SecurityGroupReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the SecurityGroup object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile
func (*SecurityGroupReconciler) SetupWithManager ¶
func (r *SecurityGroupReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type SubnetReconciler ¶
SubnetReconciler reconciles a Subnet object
func (*SubnetReconciler) SetupWithManager ¶
func (r *SubnetReconciler) SetupWithManager(mgr manager.Manager) error
SetupWithManager sets up the controller with the Manager.
Source Files ¶
- clusterprefix_controller.go
- clusterprefixallocationscheduler_controller.go
- gateway_controller.go
- ip_controller.go
- ipamrange_controller.go
- prefix_controller.go
- prefixallocation.go
- prefixallocationscheduler_controller.go
- reservedip_controller.go
- routingdomain_controller.go
- securitygroup_controller.go
- subnet_controller.go