Documentation ¶
Overview ¶
Package context defines context objects for controllers.
Index ¶
- type BaseMachineContext
- type ClusterContext
- type ControllerManagerContext
- type MachineContext
- type VIMMachineContext
- func (c *VIMMachineContext) GetObjectMeta() metav1.ObjectMeta
- func (c *VIMMachineContext) GetVSphereMachine() VSphereMachine
- func (c *VIMMachineContext) Patch(ctx context.Context) error
- func (c *VIMMachineContext) SetBaseMachineContext(base *BaseMachineContext)
- func (c *VIMMachineContext) String() string
- type VMContext
- type VSphereDeploymentZoneContext
- type VSphereMachine
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseMachineContext ¶ added in v1.1.0
type BaseMachineContext struct { ControllerManagerContext *ControllerManagerContext Cluster *clusterv1.Cluster Machine *clusterv1.Machine PatchHelper *patch.Helper }
BaseMachineContext contains information about a CAPI Machine for VSphereMachine reconciliation.
func (*BaseMachineContext) GetCluster ¶ added in v1.1.0
func (c *BaseMachineContext) GetCluster() *clusterv1.Cluster
GetCluster returns the cluster for the BaseMachineContext.
func (*BaseMachineContext) GetMachine ¶ added in v1.1.0
func (c *BaseMachineContext) GetMachine() *clusterv1.Machine
GetMachine returns the Machine for the BaseMachineContext.
type ClusterContext ¶
type ClusterContext struct { Cluster *clusterv1.Cluster VSphereCluster *infrav1.VSphereCluster PatchHelper *patch.Helper }
ClusterContext is a Go context used with a VSphereCluster.
func (*ClusterContext) Patch ¶
func (c *ClusterContext) Patch(ctx context.Context) error
Patch updates the object and its status on the API server.
func (*ClusterContext) String ¶
func (c *ClusterContext) String() string
String returns VSphereClusterGroupVersionKind VSphereClusterNamespace/VSphereClusterName.
type ControllerManagerContext ¶
type ControllerManagerContext struct { // Namespace is the namespace in which the resource is located responsible // for running the controller manager. Namespace string // Name is the name of the controller manager. Name string // LeaderElectionID is the information used to identify the object // responsible for synchronizing leader election. LeaderElectionID string // LeaderElectionNamespace is the namespace in which the LeaderElection // object is located. LeaderElectionNamespace string // WatchNamespaces are the namespaces the controllers watches for changes. If // no value is specified then all namespaces are watched. WatchNamespaces map[string]cache.Config // Client is the controller manager's client. Client client.Client // Logger is the controller manager's logger. Logger logr.Logger // Scheme is the controller manager's API scheme. Scheme *runtime.Scheme // Username is the username for the account used to access remote vSphere // endpoints. Username string // Password is the password for the account used to access remote vSphere // endpoints. Password string // NetworkProvider is the network provider used by Supervisor based clusters NetworkProvider string // WatchFilterValue is used to filter incoming objects by label. WatchFilterValue string // contains filtered or unexported fields }
ControllerManagerContext is the context of the controller that owns the controllers.
func (*ControllerManagerContext) GetGenericEventChannelFor ¶
func (c *ControllerManagerContext) GetGenericEventChannelFor(gvk schema.GroupVersionKind) chan event.GenericEvent
GetGenericEventChannelFor returns a generic event channel for a resource specified by the provided GroupVersionKind.
func (*ControllerManagerContext) String ¶
func (c *ControllerManagerContext) String() string
String returns ControllerManagerName.
type MachineContext ¶
type MachineContext interface { String() string Patch(ctx context.Context) error GetVSphereMachine() VSphereMachine GetObjectMeta() metav1.ObjectMeta GetCluster() *clusterv1.Cluster GetMachine() *clusterv1.Machine SetBaseMachineContext(base *BaseMachineContext) }
MachineContext is the context used in VSphereMachine reconciliation.
type VIMMachineContext ¶ added in v1.1.0
type VIMMachineContext struct { *BaseMachineContext VSphereCluster *infrav1.VSphereCluster VSphereMachine *infrav1.VSphereMachine }
VIMMachineContext is a Go context used with a VSphereMachine.
func (*VIMMachineContext) GetObjectMeta ¶ added in v1.1.0
func (c *VIMMachineContext) GetObjectMeta() metav1.ObjectMeta
GetObjectMeta returns the ObjectMeta for the VSphereMachine in the VIMMachineContext.
func (*VIMMachineContext) GetVSphereMachine ¶ added in v1.1.0
func (c *VIMMachineContext) GetVSphereMachine() VSphereMachine
GetVSphereMachine sets the VSphereMachine for the VIMMachineContext.
func (*VIMMachineContext) Patch ¶ added in v1.1.0
func (c *VIMMachineContext) Patch(ctx context.Context) error
Patch updates the object and its status on the API server.
func (*VIMMachineContext) SetBaseMachineContext ¶ added in v1.1.0
func (c *VIMMachineContext) SetBaseMachineContext(base *BaseMachineContext)
SetBaseMachineContext sets the BaseMachineContext for the VIMMachineContext.
func (*VIMMachineContext) String ¶ added in v1.1.0
func (c *VIMMachineContext) String() string
String returns VSphereMachineGroupVersionKind VSphereMachineNamespace/VSphereMachineName.
type VMContext ¶ added in v0.6.0
type VMContext struct { *ControllerManagerContext ClusterModuleInfo *string VSphereVM *infrav1.VSphereVM PatchHelper *patch.Helper Session *session.Session VSphereFailureDomain *infrav1.VSphereFailureDomain }
VMContext is a Go context used with a VSphereVM.
func (*VMContext) GetSession ¶ added in v0.6.0
GetSession returns this context's session.
type VSphereDeploymentZoneContext ¶ added in v0.7.9
type VSphereDeploymentZoneContext struct { *ControllerManagerContext VSphereDeploymentZone *infrav1.VSphereDeploymentZone PatchHelper *patch.Helper AuthSession *session.Session }
VSphereDeploymentZoneContext contains information for the VSphereDeploymentZone reconciliation.
func (*VSphereDeploymentZoneContext) GetSession ¶ added in v0.7.9
func (c *VSphereDeploymentZoneContext) GetSession() *session.Session
GetSession returns the session for the VSphereDeploymentZoneContext.
func (*VSphereDeploymentZoneContext) Patch ¶ added in v0.7.9
func (c *VSphereDeploymentZoneContext) Patch(ctx context.Context) error
Patch patches the VSphereDeploymentZone.
func (*VSphereDeploymentZoneContext) String ¶ added in v0.7.9
func (c *VSphereDeploymentZoneContext) String() string
String returns a string with the GroupVersionKind and name of the VSphereDeploymentZone.
type VSphereMachine ¶ added in v1.1.0
type VSphereMachine interface { client.Object conditions.Setter }
VSphereMachine is a common interface used for VSphereMachines across VMOperator and non-VMOperator modes.