v1alpha1

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2022 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the powervsproviderconfig v1alpha1 API group +kubebuilder:object:generate=true +groupName=powervsproviderconfig.openshift.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "powervsproviderconfig.openshift.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func RawExtensionFromProviderSpec

func RawExtensionFromProviderSpec(spec *PowerVSMachineProviderConfig) (*runtime.RawExtension, error)

RawExtensionFromProviderSpec marshals the machine provider spec.

func RawExtensionFromProviderStatus

func RawExtensionFromProviderStatus(status *PowerVSMachineProviderStatus) (*runtime.RawExtension, error)

RawExtensionFromProviderStatus marshals the machine provider status

Types

type PowerVSMachineProviderCondition

type PowerVSMachineProviderCondition struct {
	// Type is the type of the condition.
	Type PowerVSMachineProviderConditionType `json:"type"`
	// Status is the status of the condition.
	Status corev1.ConditionStatus `json:"status"`
	// LastProbeTime is the last time we probed the condition.
	// +optional
	LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"`
	// LastTransitionTime is the last time the condition transitioned from one status to another.
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
	// Reason is a unique, one-word, CamelCase reason for the condition's last transition.
	// +optional
	Reason PowerVSMachineProviderConditionReason `json:"reason,omitempty"`
	// Message is a human-readable message indicating details about last transition.
	// +optional
	Message string `json:"message,omitempty"`
}

PowerVSMachineProviderCondition is a condition in a PowerVSMachineProviderStatus.

func (*PowerVSMachineProviderCondition) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PowerVSMachineProviderCondition.

func (*PowerVSMachineProviderCondition) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PowerVSMachineProviderConditionReason

type PowerVSMachineProviderConditionReason string

PowerVSMachineProviderConditionReason is reason for the condition's last transition.

const (
	// MachineCreationSucceeded indicates machine creation success.
	MachineCreationSucceeded PowerVSMachineProviderConditionReason = "MachineCreationSucceeded"
	// MachineCreationFailed indicates machine creation failure.
	MachineCreationFailed PowerVSMachineProviderConditionReason = "MachineCreationFailed"
)

type PowerVSMachineProviderConditionType

type PowerVSMachineProviderConditionType string

PowerVSMachineProviderConditionType is a valid value for PowerVSMachineProviderCondition.Type

const (
	// MachineCreation indicates whether the machine has been created or not. If not,
	// it should include a reason and message for the failure.
	MachineCreation PowerVSMachineProviderConditionType = "MachineCreation"
)

Valid conditions for an PowerVS machine instance.

type PowerVSMachineProviderConfig

type PowerVSMachineProviderConfig struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// ServiceInstanceID is the PowerVS service ID
	ServiceInstanceID string `json:"serviceInstanceID"`

	// Image is the reference to the Image from which to create the machine instance.
	Image PowerVSResourceReference `json:"image"`

	// UserDataSecret is the k8s secret contains the user data script
	UserDataSecret *corev1.LocalObjectReference `json:"userDataSecret,omitempty"`

	// CredentialsSecret is the k8s secret contains the API Key for IBM Cloud authentication
	CredentialsSecret *corev1.LocalObjectReference `json:"credentialsSecret,omitempty"`

	// SysType is the System type used to host the vsi
	SysType string `json:"sysType"`

	// ProcessorType is the processor type, e.g: dedicated, shared, capped
	ProcType string `json:"procType"`

	// Processors is Number of processors allocated
	Processors string `json:"processors"`

	// Memory is Amount of memory allocated (in GB)
	Memory string `json:"memory"`

	// Network is the reference to the Network to use for this instance.
	Network PowerVSResourceReference `json:"network"`

	// KeyPairName is the name of the SSH key pair provided to the server for authenticating users
	KeyPairName string `json:"keyPairName,omitempty"`
}

PowerVSMachineProviderConfig is the Schema for the powervsmachineproviderconfigs API

func ProviderSpecFromRawExtension

func ProviderSpecFromRawExtension(rawExtension *runtime.RawExtension) (*PowerVSMachineProviderConfig, error)

ProviderSpecFromRawExtension unmarshals a raw extension into an PowerVSMachineProviderConfig type

func (*PowerVSMachineProviderConfig) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PowerVSMachineProviderConfig.

func (*PowerVSMachineProviderConfig) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PowerVSMachineProviderConfig) DeepCopyObject

func (in *PowerVSMachineProviderConfig) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PowerVSMachineProviderConfigList

type PowerVSMachineProviderConfigList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PowerVSMachineProviderConfig `json:"items"`
}

PowerVSMachineProviderConfigList contains a list of PowerVSMachineProviderConfig

func (*PowerVSMachineProviderConfigList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PowerVSMachineProviderConfigList.

func (*PowerVSMachineProviderConfigList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PowerVSMachineProviderConfigList) DeepCopyObject

func (in *PowerVSMachineProviderConfigList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PowerVSMachineProviderStatus

type PowerVSMachineProviderStatus struct {
	metav1.TypeMeta `json:",inline"`

	// InstanceID is the instance ID of the machine created in PowerVS
	// +optional
	InstanceID *string `json:"instanceId,omitempty"`

	// InstanceState is the state of the PowerVS instance for this machine
	// +optional
	InstanceState *string `json:"instanceState,omitempty"`

	// Conditions is a set of conditions associated with the Machine to indicate
	// errors or other status
	Conditions []PowerVSMachineProviderCondition `json:"conditions,omitempty"`
}

PowerVSMachineProviderStatus is the type that will be embedded in a Machine.Status.ProviderStatus field. It contains PowerVS-specific status information. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func ProviderStatusFromRawExtension

func ProviderStatusFromRawExtension(rawExtension *runtime.RawExtension) (*PowerVSMachineProviderStatus, error)

ProviderStatusFromRawExtension unmarshals a raw extension into an PowerVSMachineProviderStatus type

func (*PowerVSMachineProviderStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PowerVSMachineProviderStatus.

func (*PowerVSMachineProviderStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PowerVSMachineProviderStatus) DeepCopyObject

func (in *PowerVSMachineProviderStatus) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PowerVSResourceReference

type PowerVSResourceReference struct {
	// ID of resource
	// +optional
	ID *string `json:"id,omitempty"`

	// Name of resource
	// +optional
	Name *string `json:"name,omitempty"`

	// Regex to find resource
	// +optional
	RegEx *string `json:"regex,omitempty"`
}

PowerVSResourceReference is a reference to a specific PowerVS resource by ID or Name Only one of ID or Name may be specified. Specifying more than one will result in a validation error.

func (*PowerVSResourceReference) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PowerVSResourceReference.

func (*PowerVSResourceReference) DeepCopyInto

func (in *PowerVSResourceReference) DeepCopyInto(out *PowerVSResourceReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL