Documentation
¶
Index ¶
- Constants
- Variables
- func AddToManager(m manager.Manager) error
- type AddressPoolReconciler
- func (r *AddressPoolReconciler) ClearRestoreInProgress(instance *starlingxv1.AddressPool) error
- func (r *AddressPoolReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
- func (r *AddressPoolReconciler) ReconcileResource(client *gophercloud.ServiceClient, instance *starlingxv1.AddressPool, ...) (err error)
- func (r *AddressPoolReconciler) RestoreAddressPoolStatus(instance *starlingxv1.AddressPool) error
- func (r *AddressPoolReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *AddressPoolReconciler) UpdateInsyncStatus(client *gophercloud.ServiceClient, instance *starlingxv1.AddressPool, ...) error
- type DataNetworkReconciler
- func (r *DataNetworkReconciler) ClearRestoreInProgress(instance *starlingxv1.DataNetwork) error
- func (r *DataNetworkReconciler) FindExistingResource(client *gophercloud.ServiceClient, instance *starlingxv1.DataNetwork) (network *datanetworks.DataNetwork, err error)
- func (r *DataNetworkReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
- func (r *DataNetworkReconciler) ReconcileNew(client *gophercloud.ServiceClient, instance *starlingxv1.DataNetwork) (*datanetworks.DataNetwork, error)
- func (r *DataNetworkReconciler) ReconcileResource(client *gophercloud.ServiceClient, instance *starlingxv1.DataNetwork) error
- func (r *DataNetworkReconciler) ReconcileUpdated(client *gophercloud.ServiceClient, instance *starlingxv1.DataNetwork, ...) error
- func (r *DataNetworkReconciler) ReconciledDeleted(client *gophercloud.ServiceClient, instance *starlingxv1.DataNetwork, ...) error
- func (r *DataNetworkReconciler) RestoreDataNetworkStatus(instance *starlingxv1.DataNetwork) error
- func (r *DataNetworkReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *DataNetworkReconciler) StopAfterInSync() bool
- func (r *DataNetworkReconciler) UpdateConfigStatus(instance *starlingxv1.DataNetwork, ns string) (err error)
- func (r *DataNetworkReconciler) UpdateDeploymentScope(instance *starlingxv1.DataNetwork) (error, bool)
- func (r *DataNetworkReconciler) UpdateStatusForFactoryInstall(ns string, instance *starlingxv1.DataNetwork) error
- type HostProfileReconciler
- func (r *HostProfileReconciler) ProfileUses(namespace, base, target string) (bool, error)
- func (r *HostProfileReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
- func (r *HostProfileReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *HostProfileReconciler) UpdateHosts(instance *starlingxv1.HostProfile) error
- type PlatformNetworkReconciler
- func (r *PlatformNetworkReconciler) ClearRestoreInProgress(instance *starlingxv1.PlatformNetwork) error
- func (r *PlatformNetworkReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
- func (r *PlatformNetworkReconciler) ReconcileResource(client *gophercloud.ServiceClient, instance *starlingxv1.PlatformNetwork, ...) (err error)
- func (r *PlatformNetworkReconciler) RestorePlatformNetworkStatus(instance *starlingxv1.PlatformNetwork) error
- func (r *PlatformNetworkReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *PlatformNetworkReconciler) StopAfterInSync() bool
- func (r *PlatformNetworkReconciler) UpdateConfigStatus(instance *starlingxv1.PlatformNetwork, ns string) (err error)
- func (r *PlatformNetworkReconciler) UpdateDeploymentScope(instance *starlingxv1.PlatformNetwork) (error, bool)
- func (r *PlatformNetworkReconciler) UpdateInsyncStatus(client *gophercloud.ServiceClient, instance *starlingxv1.PlatformNetwork, ...) error
- func (r *PlatformNetworkReconciler) UpdateStatusForFactoryInstall(ns string, instance *starlingxv1.PlatformNetwork) error
- type PtpInstanceReconciler
- func (r *PtpInstanceReconciler) ClearRestoreInProgress(instance *starlingxv1.PtpInstance) error
- func (r *PtpInstanceReconciler) FindExistingPTPInstance(client *gophercloud.ServiceClient, instance *starlingxv1.PtpInstance) (found *ptpinstances.PTPInstance, err error)
- func (r *PtpInstanceReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
- func (r *PtpInstanceReconciler) ReconcileNew(client *gophercloud.ServiceClient, instance *starlingxv1.PtpInstance) (*ptpinstances.PTPInstance, error)
- func (r *PtpInstanceReconciler) ReconcileParamAdded(client *gophercloud.ServiceClient, params []string, ...) (*ptpinstances.PTPInstance, error)
- func (r *PtpInstanceReconciler) ReconcileParamRemoved(client *gophercloud.ServiceClient, params []string, ...) (*ptpinstances.PTPInstance, error)
- func (r *PtpInstanceReconciler) ReconcileResource(client *gophercloud.ServiceClient, instance *starlingxv1.PtpInstance) error
- func (r *PtpInstanceReconciler) ReconcileUpdated(client *gophercloud.ServiceClient, instance *starlingxv1.PtpInstance, ...) error
- func (r *PtpInstanceReconciler) ReconciledDeleted(client *gophercloud.ServiceClient, instance *starlingxv1.PtpInstance, ...) error
- func (r *PtpInstanceReconciler) RestorePtpInstanceStatus(instance *starlingxv1.PtpInstance) error
- func (r *PtpInstanceReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *PtpInstanceReconciler) StopAfterInSync() bool
- func (r *PtpInstanceReconciler) UpdateConfigStatus(instance *starlingxv1.PtpInstance, ns string) (err error)
- func (r *PtpInstanceReconciler) UpdateDeploymentScope(instance *starlingxv1.PtpInstance) (error, bool)
- func (r *PtpInstanceReconciler) UpdateStatusForFactoryInstall(ns string, instance *starlingxv1.PtpInstance) error
- type PtpInterfaceReconciler
- func (r *PtpInterfaceReconciler) ClearRestoreInProgress(instance *starlingxv1.PtpInterface) error
- func (r *PtpInterfaceReconciler) FindExistingPTPInterface(client *gophercloud.ServiceClient, instance *starlingxv1.PtpInterface) (found *ptpinterfaces.PTPInterface, err error)
- func (r *PtpInterfaceReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
- func (r *PtpInterfaceReconciler) ReconcileNew(client *gophercloud.ServiceClient, instance *starlingxv1.PtpInterface) (*ptpinterfaces.PTPInterface, error)
- func (r *PtpInterfaceReconciler) ReconcileParamAdded(client *gophercloud.ServiceClient, params []string, ...) (*ptpinterfaces.PTPInterface, error)
- func (r *PtpInterfaceReconciler) ReconcileParamRemoved(client *gophercloud.ServiceClient, params []string, ...) (*ptpinterfaces.PTPInterface, error)
- func (r *PtpInterfaceReconciler) ReconcileResource(client *gophercloud.ServiceClient, instance *starlingxv1.PtpInterface) error
- func (r *PtpInterfaceReconciler) ReconcileUpdated(client *gophercloud.ServiceClient, instance *starlingxv1.PtpInterface, ...) error
- func (r *PtpInterfaceReconciler) ReconciledDeleted(client *gophercloud.ServiceClient, instance *starlingxv1.PtpInterface, ...) error
- func (r *PtpInterfaceReconciler) RestorePtpinterfaceStatus(instance *starlingxv1.PtpInterface) error
- func (r *PtpInterfaceReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *PtpInterfaceReconciler) StopAfterInSync() bool
- func (r *PtpInterfaceReconciler) UpdateConfigStatus(instance *starlingxv1.PtpInterface, ns string) (err error)
- func (r *PtpInterfaceReconciler) UpdateDeploymentScope(instance *starlingxv1.PtpInterface) (error, bool)
- func (r *PtpInterfaceReconciler) UpdateStatusForFactoryInstall(ns string, instance *starlingxv1.PtpInterface) error
Constants ¶
const AddressPoolControllerName = "addresspool-controller"
const AddressPoolFinalizerName = "addresspool.finalizers.windriver.com"
const (
// Defines commonly used network allocation type values.
AllocationTypeDynamic = "dynamic"
)
const DataNetworkControllerName = "datanetwork-controller"
const DataNetworkFinalizerName = "datanetwork.finalizers.windriver.com"
const HostProfileControllerName = "hostprofile-controller"
const PlatformNetworkControllerName = "platformnetwork-controller"
const PlatformNetworkFinalizerName = "platformnetwork.finalizers.windriver.com"
const PtpInstanceControllerName = "ptpinstance-controller"
const PtpInstanceFinalizerName = "ptpinstance.finalizers.windriver.com"
const PtpInterfaceControllerName = "ptpinterface-controller"
const PtpInterfaceFinalizerName = "ptpinterface.finalizers.windriver.com"
Variables ¶
var AddToManagerFuncs []func(manager.Manager) error
AddToManagerFuncs is a list of functions to add all Controllers to the Manager
Functions ¶
func AddToManager ¶
AddToManager adds all Controllers to the Manager
Types ¶
type AddressPoolReconciler ¶
type AddressPoolReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme cloudManager.CloudManager common.ReconcilerErrorHandler common.ReconcilerEventLogger }
AddressPoolReconciler reconciles a AddressPool object
func (*AddressPoolReconciler) ClearRestoreInProgress ¶
func (r *AddressPoolReconciler) ClearRestoreInProgress(instance *starlingxv1.AddressPool) error
Clear annotation RestoreInProgress
func (*AddressPoolReconciler) Reconcile ¶
func (r *AddressPoolReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
Reconcile reads that state of the cluster for a AddressPool object and makes changes based on the state read +kubebuilder:rbac:groups=starlingx.windriver.com,resources=addresspools,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=starlingx.windriver.com,resources=addresspools/status,verbs=get;update;patch +kubebuilder:rbac:groups=starlingx.windriver.com,resources=addresspools/finalizers,verbs=update
func (*AddressPoolReconciler) ReconcileResource ¶
func (r *AddressPoolReconciler) ReconcileResource(client *gophercloud.ServiceClient, instance *starlingxv1.AddressPool, request_namespace string) (err error)
Fetch active controller's host instance and increment annotation value of deployment-manager/notifications only if Generation != ObservedGeneration or there is a deploymentScope change. Note that for deletion we are just cleaning up the finalizer and we are not specifically deleting addresspool object on the system.
func (*AddressPoolReconciler) RestoreAddressPoolStatus ¶
func (r *AddressPoolReconciler) RestoreAddressPoolStatus(instance *starlingxv1.AddressPool) error
Updates the AddressPool status while restoring
func (*AddressPoolReconciler) SetupWithManager ¶
func (r *AddressPoolReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*AddressPoolReconciler) UpdateInsyncStatus ¶
func (r *AddressPoolReconciler) UpdateInsyncStatus(client *gophercloud.ServiceClient, instance *starlingxv1.AddressPool, oldStatus *starlingxv1.AddressPoolStatus) error
type DataNetworkReconciler ¶
type DataNetworkReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme cloudManager.CloudManager common.ReconcilerErrorHandler common.ReconcilerEventLogger }
DataNetworkReconciler reconciles a DataNetwork object
func (*DataNetworkReconciler) ClearRestoreInProgress ¶
func (r *DataNetworkReconciler) ClearRestoreInProgress(instance *starlingxv1.DataNetwork) error
Clear annotation RestoreInProgress
func (*DataNetworkReconciler) FindExistingResource ¶
func (r *DataNetworkReconciler) FindExistingResource(client *gophercloud.ServiceClient, instance *starlingxv1.DataNetwork) (network *datanetworks.DataNetwork, err error)
FindExistingResource attempts to re-use the existing resource referenced by the ID value stored in the status or to find another resource with a matching name.
func (*DataNetworkReconciler) Reconcile ¶
func (r *DataNetworkReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
Reconcile reads that state of the cluster for a DataNetwork object and makes changes based on the state read +kubebuilder:rbac:groups=starlingx.windriver.com,resources=datanetworks,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=starlingx.windriver.com,resources=datanetworks/status,verbs=get;update;patch +kubebuilder:rbac:groups=starlingx.windriver.com,resources=datanetworks/finalizers,verbs=update
func (*DataNetworkReconciler) ReconcileNew ¶
func (r *DataNetworkReconciler) ReconcileNew(client *gophercloud.ServiceClient, instance *starlingxv1.DataNetwork) (*datanetworks.DataNetwork, error)
ReconcileNew is a method which handles reconciling a new data resource and creates the corresponding system resource thru the system API.
func (*DataNetworkReconciler) ReconcileResource ¶
func (r *DataNetworkReconciler) ReconcileResource(client *gophercloud.ServiceClient, instance *starlingxv1.DataNetwork) error
ReconcileResource interacts with the system API in order to reconcile the state of a data network with the state stored in the k8s database.
func (*DataNetworkReconciler) ReconcileUpdated ¶
func (r *DataNetworkReconciler) ReconcileUpdated(client *gophercloud.ServiceClient, instance *starlingxv1.DataNetwork, network *datanetworks.DataNetwork) error
ReconcileUpdated is a method which handles reconciling an existing data resource and updates the corresponding system resource thru the system API to match the desired state of the resource.
func (*DataNetworkReconciler) ReconciledDeleted ¶
func (r *DataNetworkReconciler) ReconciledDeleted(client *gophercloud.ServiceClient, instance *starlingxv1.DataNetwork, network *datanetworks.DataNetwork) error
ReconcileNew is a method which handles reconciling a new data resource and creates the corresponding system resource thru the system API.
func (*DataNetworkReconciler) RestoreDataNetworkStatus ¶
func (r *DataNetworkReconciler) RestoreDataNetworkStatus(instance *starlingxv1.DataNetwork) error
Update status
func (*DataNetworkReconciler) SetupWithManager ¶
func (r *DataNetworkReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*DataNetworkReconciler) StopAfterInSync ¶
func (r *DataNetworkReconciler) StopAfterInSync() bool
StopAfterInSync determines whether the reconciler should continue processing change requests after the configuration has been reconciled a first time.
func (*DataNetworkReconciler) UpdateConfigStatus ¶
func (r *DataNetworkReconciler) UpdateConfigStatus(instance *starlingxv1.DataNetwork, ns string) (err error)
Update ReconcileAfterInSync in instance ReconcileAfterInSync value will be: "true" if deploymentScope is "principal" because it is day 2 operation (update configuration) "false" if deploymentScope is "bootstrap" Then reflect these values to cluster object It is expected that instance.Status.Deployment scope is already updated by UpdateDeploymentScope at this point.
func (*DataNetworkReconciler) UpdateDeploymentScope ¶
func (r *DataNetworkReconciler) UpdateDeploymentScope(instance *starlingxv1.DataNetwork) (error, bool)
UpdateDeploymentScope function is used to update the deployment scope for DataNetwork.
func (*DataNetworkReconciler) UpdateStatusForFactoryInstall ¶
func (r *DataNetworkReconciler) UpdateStatusForFactoryInstall( ns string, instance *starlingxv1.DataNetwork, ) error
During factory install, the reconciled status is expected to be updated to false to unblock the configuration as the day 1 configuration. UpdateStatusForFactoryInstall updates the status by checking the factory install data.
type HostProfileReconciler ¶
type HostProfileReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme common.ReconcilerEventLogger }
HostProfileReconciler reconciles a HostProfile object
func (*HostProfileReconciler) ProfileUses ¶
func (r *HostProfileReconciler) ProfileUses(namespace, base, target string) (bool, error)
ProfileUses determines whether the 'base' profile references the 'target' profile either directly or indirectly via one of its parent/base profiles.
func (*HostProfileReconciler) Reconcile ¶
func (r *HostProfileReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
Reconcile reads that state of the cluster for a HostProfile object and makes changes based on the state read and what is in the HostProfile.Spec +kubebuilder:rbac:groups=starlingx.windriver.com,resources=hostprofiles,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=starlingx.windriver.com,resources=hostprofiles/status,verbs=get;update;patch +kubebuilder:rbac:groups=starlingx.windriver.com,resources=hostprofiles/finalizers,verbs=update
func (*HostProfileReconciler) SetupWithManager ¶
func (r *HostProfileReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*HostProfileReconciler) UpdateHosts ¶
func (r *HostProfileReconciler) UpdateHosts(instance *starlingxv1.HostProfile) error
UpdateHosts will force a update to each host that references this profile. This is to ensure that hosts get reconciled whenever any of their profiles get updated.
type PlatformNetworkReconciler ¶
type PlatformNetworkReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme cloudManager.CloudManager common.ReconcilerErrorHandler common.ReconcilerEventLogger }
PlatformNetworkReconciler reconciles a PlatformNetwork object
func (*PlatformNetworkReconciler) ClearRestoreInProgress ¶
func (r *PlatformNetworkReconciler) ClearRestoreInProgress(instance *starlingxv1.PlatformNetwork) error
Clear annotation RestoreInProgress
func (*PlatformNetworkReconciler) Reconcile ¶
func (r *PlatformNetworkReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
Reconcile reads that state of the cluster for a PlatformNetwork object and makes changes based on the state read +kubebuilder:rbac:groups=starlingx.windriver.com,resources=platformnetworks,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=starlingx.windriver.com,resources=platformnetworks/status,verbs=get;update;patch +kubebuilder:rbac:groups=starlingx.windriver.com,resources=platformnetworks/finalizers,verbs=update
func (*PlatformNetworkReconciler) ReconcileResource ¶
func (r *PlatformNetworkReconciler) ReconcileResource(client *gophercloud.ServiceClient, instance *starlingxv1.PlatformNetwork, reqNs string, scope_updated bool) (err error)
Fetch active controller's host instance and increment annotation value of deployment-manager/notifications only if Generation != ObservedGeneration or there is a deploymentScope change. Note that for deletion we are just cleaning up the finalizer and we are not specifically deleting network object on the system.
func (*PlatformNetworkReconciler) RestorePlatformNetworkStatus ¶
func (r *PlatformNetworkReconciler) RestorePlatformNetworkStatus(instance *starlingxv1.PlatformNetwork) error
Update status
func (*PlatformNetworkReconciler) SetupWithManager ¶
func (r *PlatformNetworkReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*PlatformNetworkReconciler) StopAfterInSync ¶
func (r *PlatformNetworkReconciler) StopAfterInSync() bool
StopAfterInSync determines whether the reconciler should continue processing change requests after the configuration has been reconciled a first time.
func (*PlatformNetworkReconciler) UpdateConfigStatus ¶
func (r *PlatformNetworkReconciler) UpdateConfigStatus(instance *starlingxv1.PlatformNetwork, ns string) (err error)
Update ReconcileAfterInSync in instance ReconcileAfterInSync value will be: "true" if deploymentScope is "principal" because it is day 2 operation (update configuration) "false" if deploymentScope is "bootstrap" Then reflect these values to cluster object It is expected that instance.Status.Deployment scope is already updated by UpdateDeploymentScope at this point.
func (*PlatformNetworkReconciler) UpdateDeploymentScope ¶
func (r *PlatformNetworkReconciler) UpdateDeploymentScope(instance *starlingxv1.PlatformNetwork) (error, bool)
UpdateDeploymentScope function is used to update the deployment scope for PlatformNetwork.
func (*PlatformNetworkReconciler) UpdateInsyncStatus ¶
func (r *PlatformNetworkReconciler) UpdateInsyncStatus(client *gophercloud.ServiceClient, instance *starlingxv1.PlatformNetwork, oldStatus *starlingxv1.PlatformNetworkStatus) error
func (*PlatformNetworkReconciler) UpdateStatusForFactoryInstall ¶
func (r *PlatformNetworkReconciler) UpdateStatusForFactoryInstall( ns string, instance *starlingxv1.PlatformNetwork, ) error
During factory install, the reconciled status is expected to be updated to false to unblock the configuration as the day 1 configuration. UpdateStatusForFactoryInstall updates the status by checking the factory install data.
type PtpInstanceReconciler ¶
type PtpInstanceReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme cloudManager.CloudManager common.ReconcilerErrorHandler common.ReconcilerEventLogger }
PtpInstanceReconciler reconciles a PtpInstance object
func (*PtpInstanceReconciler) ClearRestoreInProgress ¶
func (r *PtpInstanceReconciler) ClearRestoreInProgress(instance *starlingxv1.PtpInstance) error
Clear annotation RestoreInProgress
func (*PtpInstanceReconciler) FindExistingPTPInstance ¶
func (r *PtpInstanceReconciler) FindExistingPTPInstance(client *gophercloud.ServiceClient, instance *starlingxv1.PtpInstance) (found *ptpinstances.PTPInstance, err error)
FindExistingPTPInstance attempts to find the existing PTP instance referenced by the ID value stored in the status or to find another resource with a matching name.
func (*PtpInstanceReconciler) Reconcile ¶
func (r *PtpInstanceReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
Reconcile reads that state of the cluster for a PTPInstance object and makes changes based on the state read and what is in the PtpInstance.Spec +kubebuilder:rbac:groups=starlingx.windriver.com,resources=ptpinstances,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=starlingx.windriver.com,resources=ptpinstances/status,verbs=get;update;patch +kubebuilder:rbac:groups=starlingx.windriver.com,resources=ptpinstances/finalizers,verbs=update
func (*PtpInstanceReconciler) ReconcileNew ¶
func (r *PtpInstanceReconciler) ReconcileNew(client *gophercloud.ServiceClient, instance *starlingxv1.PtpInstance) (*ptpinstances.PTPInstance, error)
ReconcileNew is a method which handles reconciling a new data resource and creates the corresponding system resource thru the system API.
func (*PtpInstanceReconciler) ReconcileParamAdded ¶
func (r *PtpInstanceReconciler) ReconcileParamAdded(client *gophercloud.ServiceClient, params []string, i *ptpinstances.PTPInstance) (*ptpinstances.PTPInstance, error)
ReconcileParamAdded is a method which handles adding new Parameters to associate with an existing PTP instance
func (*PtpInstanceReconciler) ReconcileParamRemoved ¶
func (r *PtpInstanceReconciler) ReconcileParamRemoved(client *gophercloud.ServiceClient, params []string, i *ptpinstances.PTPInstance) (*ptpinstances.PTPInstance, error)
ReconcileParamAdded is a method which handles removing new Parameters from an existing PTP instance
func (*PtpInstanceReconciler) ReconcileResource ¶
func (r *PtpInstanceReconciler) ReconcileResource(client *gophercloud.ServiceClient, instance *starlingxv1.PtpInstance) error
ReconcileResource interacts with the system API in order to reconcile the state of a ptp instance with the state stored in the k8s database.
func (*PtpInstanceReconciler) ReconcileUpdated ¶
func (r *PtpInstanceReconciler) ReconcileUpdated(client *gophercloud.ServiceClient, instance *starlingxv1.PtpInstance, existing *ptpinstances.PTPInstance) error
ReconcileUpdated is a method which handles reconciling an existing data resource and updates the corresponding system resource thru the system API to match the desired state of the resource.
func (*PtpInstanceReconciler) ReconciledDeleted ¶
func (r *PtpInstanceReconciler) ReconciledDeleted(client *gophercloud.ServiceClient, instance *starlingxv1.PtpInstance, i *ptpinstances.PTPInstance) error
ReconciledDeleted is a method which handles reconciling a new data resource and creates the corresponding system resource thru the system API.
func (*PtpInstanceReconciler) RestorePtpInstanceStatus ¶
func (r *PtpInstanceReconciler) RestorePtpInstanceStatus(instance *starlingxv1.PtpInstance) error
Update status
func (*PtpInstanceReconciler) SetupWithManager ¶
func (r *PtpInstanceReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*PtpInstanceReconciler) StopAfterInSync ¶
func (r *PtpInstanceReconciler) StopAfterInSync() bool
StopAfterInSync determines whether the reconciler should continue processing change requests after the configuration has been reconciled a first time.
func (*PtpInstanceReconciler) UpdateConfigStatus ¶
func (r *PtpInstanceReconciler) UpdateConfigStatus(instance *starlingxv1.PtpInstance, ns string) (err error)
Update ReconcileAfterInSync in instance ReconcileAfterInSync value will be: "true" if deploymentScope is "principal" because it is day 2 operation (update configuration) "false" if deploymentScope is "bootstrap" Then reflect these values to cluster object It is expected that instance.Status.Deployment scope is already updated by UpdateDeploymentScope at this point.
func (*PtpInstanceReconciler) UpdateDeploymentScope ¶
func (r *PtpInstanceReconciler) UpdateDeploymentScope(instance *starlingxv1.PtpInstance) (error, bool)
UpdateDeploymentScope function is used to update the deployment scope for PtpInstance.
func (*PtpInstanceReconciler) UpdateStatusForFactoryInstall ¶
func (r *PtpInstanceReconciler) UpdateStatusForFactoryInstall( ns string, instance *starlingxv1.PtpInstance, ) error
During factory install, the reconciled status is expected to be updated to false to unblock the configuration as the day 1 configuration. UpdateStatusForFactoryInstall updates the status by checking the factory install data.
type PtpInterfaceReconciler ¶
type PtpInterfaceReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme cloudManager.CloudManager common.ReconcilerErrorHandler common.ReconcilerEventLogger }
PtpInterfaceReconciler reconciles a PtpInterface object
func (*PtpInterfaceReconciler) ClearRestoreInProgress ¶
func (r *PtpInterfaceReconciler) ClearRestoreInProgress(instance *starlingxv1.PtpInterface) error
Clear annotation RestoreInProgress
func (*PtpInterfaceReconciler) FindExistingPTPInterface ¶
func (r *PtpInterfaceReconciler) FindExistingPTPInterface(client *gophercloud.ServiceClient, instance *starlingxv1.PtpInterface) (found *ptpinterfaces.PTPInterface, err error)
FindExistingPTPInterface attempts to find the existing PTP interface referenced by the ID value stored in the status or to find another resource with a matching name.
func (*PtpInterfaceReconciler) Reconcile ¶
func (r *PtpInterfaceReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
Reconcile reads that state of the cluster for a PTPInterface object and makes changes based on the state read and what is in the PtpInterface.Spec +kubebuilder:rbac:groups=starlingx.windriver.com,resources=ptpinterfaces,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=starlingx.windriver.com,resources=ptpinterfaces/status,verbs=get;update;patch +kubebuilder:rbac:groups=starlingx.windriver.com,resources=ptpinterfaces/finalizers,verbs=update
func (*PtpInterfaceReconciler) ReconcileNew ¶
func (r *PtpInterfaceReconciler) ReconcileNew(client *gophercloud.ServiceClient, instance *starlingxv1.PtpInterface) (*ptpinterfaces.PTPInterface, error)
ReconcileNew is a method which handles reconciling a new data resource and creates the corresponding system resource thru the system API.
func (*PtpInterfaceReconciler) ReconcileParamAdded ¶
func (r *PtpInterfaceReconciler) ReconcileParamAdded(client *gophercloud.ServiceClient, params []string, i *ptpinterfaces.PTPInterface) (*ptpinterfaces.PTPInterface, error)
ReconcileParamAdded is a method which handles adding new Parameters to associate with an existing PTP interface
func (*PtpInterfaceReconciler) ReconcileParamRemoved ¶
func (r *PtpInterfaceReconciler) ReconcileParamRemoved(client *gophercloud.ServiceClient, params []string, i *ptpinterfaces.PTPInterface) (*ptpinterfaces.PTPInterface, error)
ReconcileParamRemoved is a method which handles removing Parameters from an existing PTP
func (*PtpInterfaceReconciler) ReconcileResource ¶
func (r *PtpInterfaceReconciler) ReconcileResource(client *gophercloud.ServiceClient, instance *starlingxv1.PtpInterface) error
ReconcileResource interacts with the system API in order to reconcile the state of a PTP interface with the state stored in the k8s database.
func (*PtpInterfaceReconciler) ReconcileUpdated ¶
func (r *PtpInterfaceReconciler) ReconcileUpdated(client *gophercloud.ServiceClient, instance *starlingxv1.PtpInterface, existing *ptpinterfaces.PTPInterface) error
ReconcileUpdated is a method which handles reconciling an existing data resource and updates the corresponding system resource thru the system API to match the desired state of the resource.
func (*PtpInterfaceReconciler) ReconciledDeleted ¶
func (r *PtpInterfaceReconciler) ReconciledDeleted(client *gophercloud.ServiceClient, instance *starlingxv1.PtpInterface, i *ptpinterfaces.PTPInterface) error
ReconciledDeleted is a method which handles reconciling a new data resource and creates the corresponding system resource thru the system API.
func (*PtpInterfaceReconciler) RestorePtpinterfaceStatus ¶
func (r *PtpInterfaceReconciler) RestorePtpinterfaceStatus(instance *starlingxv1.PtpInterface) error
Update status
func (*PtpInterfaceReconciler) SetupWithManager ¶
func (r *PtpInterfaceReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*PtpInterfaceReconciler) StopAfterInSync ¶
func (r *PtpInterfaceReconciler) StopAfterInSync() bool
StopAfterInSync determines whether the reconciler should continue processing change requests after the configuration has been reconciled a first time.
func (*PtpInterfaceReconciler) UpdateConfigStatus ¶
func (r *PtpInterfaceReconciler) UpdateConfigStatus(instance *starlingxv1.PtpInterface, ns string) (err error)
Update ReconcileAfterInSync in instance ReconcileAfterInSync value will be: "true" if deploymentScope is "principal" because it is day 2 operation (update configuration) "false" if deploymentScope is "bootstrap" Then reflect these values to cluster object It is expected that instance.Status.Deployment scope is already updated by UpdateDeploymentScope at this point.
func (*PtpInterfaceReconciler) UpdateDeploymentScope ¶
func (r *PtpInterfaceReconciler) UpdateDeploymentScope(instance *starlingxv1.PtpInterface) (error, bool)
UpdateDeploymentScope function is used to update the deployment scope for PtpInterface.
func (*PtpInterfaceReconciler) UpdateStatusForFactoryInstall ¶
func (r *PtpInterfaceReconciler) UpdateStatusForFactoryInstall( ns string, instance *starlingxv1.PtpInterface, ) error
During factory install, the reconciled status is expected to be updated to false to unblock the configuration as the day 1 configuration. UpdateStatusForFactoryInstall updates the status by checking the factory install data.