Documentation
¶
Index ¶
- Constants
- func EncodeIgnitionConfig(data []byte) string
- func IgnitionConfig(data []byte) []types.BaseOptionValue
- func ProviderSpecFromRawExtension(rawExtension *runtime.RawExtension) (*machinev1.VSphereMachineProviderSpec, error)
- func ProviderStatusFromRawExtension(rawExtension *runtime.RawExtension) (*machinev1.VSphereMachineProviderStatus, error)
- func RawExtensionFromProviderSpec(spec *machinev1.VSphereMachineProviderSpec) (*runtime.RawExtension, error)
- func RawExtensionFromProviderStatus(status *machinev1.VSphereMachineProviderStatus) (*runtime.RawExtension, error)
- type Actuator
- func (a *Actuator) Create(ctx context.Context, machine *machinev1.Machine) error
- func (a *Actuator) Delete(ctx context.Context, machine *machinev1.Machine) error
- func (a *Actuator) Exists(ctx context.Context, machine *machinev1.Machine) (bool, error)
- func (a *Actuator) Update(ctx context.Context, machine *machinev1.Machine) error
- type ActuatorParams
- type NetworkStatus
- type Reconciler
Constants ¶
const ( GuestInfoIgnitionData = "guestinfo.ignition.config.data" GuestInfoIgnitionEncoding = "guestinfo.ignition.config.data.encoding" GuestInfoHostname = "guestinfo.hostname" GuestInfoNetworkKargs = "guestinfo.afterburn.initrd.network-kargs" StealClock = "stealclock.enable" )
These are the guestinfo variables used by Ignition. https://access.redhat.com/documentation/en-us/openshift_container_platform/4.1/html/installing/installing-on-vsphere
const (
OpenshiftConfigNamespace = "openshift-config"
)
Variables ¶
This section is empty.
Functions ¶
func EncodeIgnitionConfig ¶
EncodeIgnitionConfig attempts to decode the given data until it looks to be plain-text, then returns a base64 encoded version of that plain-text.
func IgnitionConfig ¶
func IgnitionConfig(data []byte) []types.BaseOptionValue
IgnitionConfig returns a slice of option values that set the given data as the guest's ignition config.
func ProviderSpecFromRawExtension ¶
func ProviderSpecFromRawExtension(rawExtension *runtime.RawExtension) (*machinev1.VSphereMachineProviderSpec, error)
ProviderSpecFromRawExtension unmarshals the JSON-encoded spec
func ProviderStatusFromRawExtension ¶
func ProviderStatusFromRawExtension(rawExtension *runtime.RawExtension) (*machinev1.VSphereMachineProviderStatus, error)
ProviderStatusFromRawExtension unmarshals a raw extension into a VSphereMachineProviderStatus type
func RawExtensionFromProviderSpec ¶
func RawExtensionFromProviderSpec(spec *machinev1.VSphereMachineProviderSpec) (*runtime.RawExtension, error)
RawExtensionFromProviderSpec marshals the machine provider spec.
func RawExtensionFromProviderStatus ¶
func RawExtensionFromProviderStatus(status *machinev1.VSphereMachineProviderStatus) (*runtime.RawExtension, error)
RawExtensionFromProviderStatus marshals the provider status
Types ¶
type Actuator ¶
type Actuator struct {
TaskIDCache map[string]string
FeatureGates featuregate.MutableFeatureGate
// contains filtered or unexported fields
}
Actuator is responsible for performing machine reconciliation.
func NewActuator ¶
func NewActuator(params ActuatorParams) *Actuator
NewActuator returns an actuator.
type ActuatorParams ¶
type ActuatorParams struct {
Client runtimeclient.Client
APIReader runtimeclient.Reader
EventRecorder record.EventRecorder
TaskIDCache map[string]string
FeatureGates featuregate.MutableFeatureGate
OpenshiftConfigNamespace string
}
ActuatorParams holds parameter information for Actuator.
type NetworkStatus ¶
type NetworkStatus struct {
// Connected is a flag that indicates whether this network is currently
// connected to the VM.
Connected bool
// IPAddrs is one or more IP addresses reported by vm-tools.
IPAddrs []string
// MACAddr is the MAC address of the network device.
MACAddr string
// NetworkName is the name of the network.
NetworkName string
}
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
Reconciler runs the logic to reconciles a machine resource towards its desired state
func (Reconciler) GetSession ¶
func (Reconciler) GetUserData ¶
GetUserData fetches the user-data from the secret referenced in the Machine's provider spec, if one is set.
func (Reconciler) PatchMachine ¶
func (s Reconciler) PatchMachine() error
Patch patches the machine spec and machine status after reconciling.