{"modulePath":"github.com/openshift/machine-api-operator","version":"v0.2.1-0.20261119161144-2615267e69e2","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package vsphere\n\n## Constants\n\n```go\nconst (\n\tGuestInfoIgnitionData     = \"guestinfo.ignition.config.data\"\n\tGuestInfoIgnitionEncoding = \"guestinfo.ignition.config.data.encoding\"\n\tGuestInfoHostname         = \"guestinfo.hostname\"\n\tGuestInfoNetworkKargs     = \"guestinfo.afterburn.initrd.network-kargs\"\n\tStealClock                = \"stealclock.enable\"\n)\n```\nThese are the guestinfo variables used by Ignition. [https://access.redhat.com/documentation/en-us/openshift\\_container\\_platform/4.1/html/installing/installing-on-vsphere](https://access.redhat.com/documentation/en-us/openshift_container_platform/4.1/html/installing/installing-on-vsphere)\n\n```go\nconst (\n\tOpenshiftConfigManagedNamespace      = \"openshift-config-managed\"\n\tOpenshiftConfigManagedConfigMap      = \"kube-cloud-config\"\n\tOpenshiftConfigManagedCloudConfigKey = \"cloud.conf\"\n)\n```\n\n## Functions\n\n```go\nfunc EncodeIgnitionConfig(data []byte) string\n```\nEncodeIgnitionConfig attempts to decode the given data until it looks to be plain-text, then returns a base64 encoded version of that plain-text.\n\n```go\nfunc GetInfrastructure(c runtimeclient.Reader) (*configv1.Infrastructure, error)\n```\nGetInfrastructure retrieves the Infrastructure object from the provided API reader. It returns an error if the API reader is nil or if there's an issue fetching the Infrastructure.\n\n```go\nfunc IgnitionConfig(data []byte) []types.BaseOptionValue\n```\nIgnitionConfig returns a slice of option values that set the given data as the guest's ignition config.\n\n```go\nfunc ProviderSpecFromRawExtension(rawExtension *runtime.RawExtension) (*machinev1.VSphereMachineProviderSpec, error)\n```\nProviderSpecFromRawExtension unmarshals the JSON-encoded spec\n\n```go\nfunc ProviderStatusFromRawExtension(rawExtension *runtime.RawExtension) (*machinev1.VSphereMachineProviderStatus, error)\n```\nProviderStatusFromRawExtension unmarshals a raw extension into a VSphereMachineProviderStatus type\n\n```go\nfunc RawExtensionFromProviderSpec(spec *machinev1.VSphereMachineProviderSpec) (*runtime.RawExtension, error)\n```\nRawExtensionFromProviderSpec marshals the machine provider spec.\n\n```go\nfunc RawExtensionFromProviderStatus(status *machinev1.VSphereMachineProviderStatus) (*runtime.RawExtension, error)\n```\nRawExtensionFromProviderStatus marshals the provider status\n\n## Types\n\n```go\ntype Actuator struct {\n\tFeatureGates featuregate.MutableFeatureGate\n\t// contains filtered or unexported fields\n}\n```\nActuator is responsible for performing machine reconciliation.\n\n```go\nfunc NewActuator(params ActuatorParams) *Actuator\n```\nNewActuator returns an actuator.\n\n```go\nfunc (a *Actuator) Create(ctx context.Context, machine *machinev1.Machine) error\n```\nCreate creates a machine and is invoked by the machine controller.\n\n```go\nfunc (a *Actuator) Delete(ctx context.Context, machine *machinev1.Machine) error\n```\n\n```go\nfunc (a *Actuator) Exists(ctx context.Context, machine *machinev1.Machine) (bool, error)\n```\n\n```go\nfunc (a *Actuator) Update(ctx context.Context, machine *machinev1.Machine) error\n```\n\n```go\ntype ActuatorParams struct {\n\tClient                   runtimeclient.Client\n\tAPIReader                runtimeclient.Reader\n\tEventRecorder            events.EventRecorder\n\tFeatureGates             featuregate.MutableFeatureGate\n\tOpenshiftConfigNamespace string\n}\n```\nActuatorParams holds parameter information for Actuator.\n\n```go\ntype NetworkStatus struct {\n\t// Connected is a flag that indicates whether this network is currently\n\t// connected to the VM.\n\tConnected bool\n\n\t// IPAddrs is one or more IP addresses reported by vm-tools.\n\tIPAddrs []string\n\n\t// MACAddr is the MAC address of the network device.\n\tMACAddr string\n\n\t// NetworkName is the name of the network.\n\tNetworkName string\n}\n```\n\n```go\ntype Reconciler struct {\n\t// contains filtered or unexported fields\n}\n```\nReconciler runs the logic to reconciles a machine resource towards its desired state\n\n```go\nfunc (s Reconciler) GetSession() *session.Session\n```\n\n```go\nfunc (s Reconciler) GetUserData() ([]byte, error)\n```\nGetUserData fetches the user-data from the secret referenced in the Machine's provider spec, if one is set.\n\n```go\nfunc (s Reconciler) PatchMachine() error\n```\nPatch patches the machine spec and machine status after reconciling.\n\n","path":"github.com/openshift/machine-api-operator/pkg/controller/vsphere","name":"vsphere","synopsis":"","isRedistributable":true}
