Documentation ¶
Index ¶
- Constants
- func GetMibValueOfQuantity(quantity resource.Quantity) int64
- func NutanixMachineProviderSpecFromRawExtension(rawExtension *runtime.RawExtension) (*machinev1.NutanixMachineProviderConfig, error)
- func NutanixMachineProviderStatusFromRawExtension(rawExtension *runtime.RawExtension) (*machinev1.NutanixMachineProviderStatus, error)
- func Ptr[T any](v T) *T
- func RawExtensionFromNutanixMachineProviderSpec(spec *machinev1.NutanixMachineProviderConfig) (*runtime.RawExtension, error)
- func RawExtensionFromNutanixMachineProviderStatus(status *machinev1.NutanixMachineProviderStatus) (*runtime.RawExtension, error)
- type Actuator
- func (a *Actuator) Create(ctx context.Context, machine *machinev1beta1.Machine) error
- func (a *Actuator) Delete(ctx context.Context, machine *machinev1beta1.Machine) error
- func (a *Actuator) Exists(ctx context.Context, machine *machinev1beta1.Machine) (bool, error)
- func (a *Actuator) Update(ctx context.Context, machine *machinev1beta1.Machine) error
- type ActuatorParams
- type BasicAuthCredential
- type Credential
- type CredentialType
- type NutanixCredentials
- type PrismCentralBasicAuth
- type PrismElementBasicAuth
- type Reconciler
Constants ¶
const ( // Expected NutanixCategory Key format: "kubernetes-io-cluster-<cluster-id>" NutanixCategoryKeyPrefix = "kubernetes-io-cluster-" NutanixCategoryValue = "owned" )
The expected category (key/value) for the Nutanix resources (ex. vms, images) created for the cluster
const (
// MachineInstancePowerStateAnnotationName as annotation name for a machine instance power state
MachineInstancePowerStateAnnotationName = "machine.openshift.io/instance-power-state"
)
Variables ¶
This section is empty.
Functions ¶
func GetMibValueOfQuantity ¶
GetMibValueOfQuantity returns the given quantity value in Mib
func NutanixMachineProviderSpecFromRawExtension ¶
func NutanixMachineProviderSpecFromRawExtension(rawExtension *runtime.RawExtension) (*machinev1.NutanixMachineProviderConfig, error)
NutanixMachineProviderSpecFromRawExtension unmarshals a raw extension into an NutanixMachineProviderConfig type
func NutanixMachineProviderStatusFromRawExtension ¶
func NutanixMachineProviderStatusFromRawExtension(rawExtension *runtime.RawExtension) (*machinev1.NutanixMachineProviderStatus, error)
NutanixMachineProviderStatusFromRawExtension unmarshals a raw extension into an NutanixMachineProviderStatus type
func RawExtensionFromNutanixMachineProviderSpec ¶
func RawExtensionFromNutanixMachineProviderSpec(spec *machinev1.NutanixMachineProviderConfig) (*runtime.RawExtension, error)
RawExtensionFromNutanixMachineProviderSpec marshals the machine provider spec.
func RawExtensionFromNutanixMachineProviderStatus ¶
func RawExtensionFromNutanixMachineProviderStatus(status *machinev1.NutanixMachineProviderStatus) (*runtime.RawExtension, error)
RawExtensionFromNutanixMachineProviderStatus marshals the machine provider status
Types ¶
type Actuator ¶
type Actuator struct {
// 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 EventRecorder record.EventRecorder ConfigManagedClient runtimeclient.Client }
ActuatorParams holds parameter information for Actuator.
type BasicAuthCredential ¶
type BasicAuthCredential struct { // The Basic Auth (username, password) for the Prism Central PrismCentral PrismCentralBasicAuth `json:"prismCentral"` // The Basic Auth (username, password) for the Prism Elements (clusters). // Currently only one Prism Element (cluster) is used for each openshift cluster. // Later this may spread to multiple Prism Element (cluster). PrismElements []PrismElementBasicAuth `json:"prismElements"` }
type Credential ¶
type Credential struct { Type CredentialType `json:"type"` Data *runtime.RawExtension `json:"data"` }
type CredentialType ¶
type CredentialType string
Nutanix Credentials
const (
BasicAuthCredentialType CredentialType = "basic_auth"
)
type NutanixCredentials ¶
type NutanixCredentials struct {
Credentials []Credential `json:"credentials"`
}
type PrismCentralBasicAuth ¶
type PrismElementBasicAuth ¶
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
Reconciler runs the logic to reconciles a machine resource towards its desired state