Documentation ¶
Overview ¶
Package controllers implements BYOH infra controllers.
Index ¶
- Constants
- Variables
- func ByoHostToByoMachineMapFunc(gvk schema.GroupVersionKind) handler.MapFunc
- func GetByoMachineByName(ctx context.Context, c client.Client, namespace, name string) (*infrav1.ByoMachine, error)
- func GetByoMachinesInCluster(ctx context.Context, controllerClient client.Client, ...) ([]*infrav1.ByoMachine, error)
- func GetOwnerByoMachine(ctx context.Context, c client.Client, obj *metav1.ObjectMeta) (*infrav1.ByoMachine, error)
- type BootstrapKubeconfigReconciler
- type ByoAdmissionReconciler
- type ByoClusterReconciler
- type ByoHostReconciler
- type ByoMachineReconciler
- func (r *ByoMachineReconciler) ClusterToByoMachines(logger logr.Logger) handler.MapFunc
- func (r *ByoMachineReconciler) FetchAttachedByoHost(ctx context.Context, byomachineName, byomachineNamespace string) (*infrav1.ByoHost, error)
- func (r *ByoMachineReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)
- func (r *ByoMachineReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error
- type ByoMachineTemplateReconciler
- type K8sInstallerConfigReconciler
- func (r *K8sInstallerConfigReconciler) ByoMachineToK8sInstallerConfigMapFunc(o client.Object) []ctrl.Request
- func (r *K8sInstallerConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)
- func (r *K8sInstallerConfigReconciler) SetupWithManager(mgr ctrl.Manager) error
Constants ¶
const ( // ProviderIDPrefix prefix for provider id ProviderIDPrefix = "byoh://" // ProviderIDSuffixLength length of provider id suffix ProviderIDSuffixLength = 6 // RequeueForbyohost requeue delay for byoh host RequeueForbyohost = 10 * time.Second // RequeueInstallerConfigTime requeue delay for installer config RequeueInstallerConfigTime = 10 * time.Second )
Variables ¶
var (
// DefaultAPIEndpointPort default port for the API endpoint
DefaultAPIEndpointPort = 6443
)
Functions ¶
func ByoHostToByoMachineMapFunc ¶
func ByoHostToByoMachineMapFunc(gvk schema.GroupVersionKind) handler.MapFunc
ByoHostToByoMachineMapFunc returns a handler.ToRequestsFunc that watches for Machine events and returns reconciliation requests for an infrastructure provider object
func GetByoMachineByName ¶
func GetByoMachineByName(ctx context.Context, c client.Client, namespace, name string) (*infrav1.ByoMachine, error)
GetByoMachineByName finds and return a ByoMachine object using the specified params.
func GetByoMachinesInCluster ¶
func GetByoMachinesInCluster( ctx context.Context, controllerClient client.Client, namespace, clusterName string) ([]*infrav1.ByoMachine, error)
GetByoMachinesInCluster gets a cluster's ByoMachine resources.
func GetOwnerByoMachine ¶
func GetOwnerByoMachine(ctx context.Context, c client.Client, obj *metav1.ObjectMeta) (*infrav1.ByoMachine, error)
GetOwnerByoMachine returns the ByoMachine object owning the current resource.
Types ¶
type BootstrapKubeconfigReconciler ¶
BootstrapKubeconfigReconciler reconciles a BootstrapKubeconfig object
func (*BootstrapKubeconfigReconciler) Reconcile ¶
func (r *BootstrapKubeconfigReconciler) 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 (*BootstrapKubeconfigReconciler) SetupWithManager ¶
func (r *BootstrapKubeconfigReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ByoAdmissionReconciler ¶
ByoAdmissionReconciler reconciles a ByoAdmission object
func (*ByoAdmissionReconciler) Reconcile ¶
func (r *ByoAdmissionReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile continuosuly checks for CSRs and approves them
func (*ByoAdmissionReconciler) SetupWithManager ¶
func (r *ByoAdmissionReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ByoClusterReconciler ¶
ByoClusterReconciler reconciles a ByoCluster object
func (*ByoClusterReconciler) Reconcile ¶
func (r *ByoClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)
Reconcile handles the byo cluster reconciliations
func (*ByoClusterReconciler) SetupWithManager ¶
SetupWithManager sets up the controller with the Manager.
type ByoHostReconciler ¶
ByoHostReconciler reconciles a ByoHost object
func (*ByoHostReconciler) Reconcile ¶
func (r *ByoHostReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr 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 ByoHost 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 (*ByoHostReconciler) SetupWithManager ¶
func (r *ByoHostReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ByoMachineReconciler ¶
type ByoMachineReconciler struct { client.Client Scheme *runtime.Scheme Tracker *remote.ClusterCacheTracker Recorder record.EventRecorder }
ByoMachineReconciler reconciles a ByoMachine object
func (*ByoMachineReconciler) ClusterToByoMachines ¶
func (r *ByoMachineReconciler) ClusterToByoMachines(logger logr.Logger) handler.MapFunc
ClusterToByoMachines is a handler.ToRequestsFunc to be used to enqeue requests for reconciliation of ByoMachines
func (*ByoMachineReconciler) FetchAttachedByoHost ¶
func (r *ByoMachineReconciler) FetchAttachedByoHost(ctx context.Context, byomachineName, byomachineNamespace string) (*infrav1.ByoHost, error)
FetchAttachedByoHost fetches BYOHost attached to this machine
func (*ByoMachineReconciler) Reconcile ¶
func (r *ByoMachineReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)
Reconcile handles ByoMachine events nolint: gocyclo, funlen
func (*ByoMachineReconciler) SetupWithManager ¶
SetupWithManager sets up the controller with the Manager.
type ByoMachineTemplateReconciler ¶
ByoMachineTemplateReconciler reconciles a ByoMachineTemplate object
func (*ByoMachineTemplateReconciler) Reconcile ¶
func (r *ByoMachineTemplateReconciler) 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 ByoMachineTemplate 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 (*ByoMachineTemplateReconciler) SetupWithManager ¶
func (r *ByoMachineTemplateReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type K8sInstallerConfigReconciler ¶
K8sInstallerConfigReconciler reconciles a K8sInstallerConfig object
func (*K8sInstallerConfigReconciler) ByoMachineToK8sInstallerConfigMapFunc ¶
func (r *K8sInstallerConfigReconciler) ByoMachineToK8sInstallerConfigMapFunc(o client.Object) []ctrl.Request
ByoMachineToK8sInstallerConfigMapFunc is a handler.ToRequestsFunc to be used to enqeue request for reconciliation of K8sInstallerConfig.
func (*K8sInstallerConfigReconciler) Reconcile ¶
func (r *K8sInstallerConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr 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 (*K8sInstallerConfigReconciler) SetupWithManager ¶
func (r *K8sInstallerConfigReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.