v1

package
v0.0.0-...-0fdb727 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 9 Imported by: 6

Documentation

Overview

Package v1 contains API Schema definitions for the ibmcloudprovider v1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/openshift/machine-api-provider-ibmcloud/pkg/apis/ibmcloudprovider +k8s:defaulter-gen=TypeMeta +groupName=ibmcloudproviderconfig.openshift.io

Package v1 contains API Schema definitions for the ibmcloudproviderconfig v1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/openshift/machine-api-provider-ibmcloud/pkg/apis/ibmcloudprovider +k8s:defaulter-gen=TypeMeta +groupName=ibmcloudproviderconfig.openshift.io

Index

Constants

This section is empty.

Variables

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

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

Functions

func RawExtensionFromProviderSpec

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

RawExtensionFromProviderSpec marshals the machine provider spec.

func RawExtensionFromProviderStatus

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

RawExtensionFromProviderStatus marshals the provider status

Types

type IBMCloudMachineBootVolume

type IBMCloudMachineBootVolume struct {
	// EncryptionKey is the IBM Cloud encryption key CRN to use when encrypting the boot volume.
	// CRN's for IBM Cloud Key Protect keys or IBM Cloud Hyper Protect keys are accepted.
	EncryptionKey string `json:"encryptionKey"`
}

IBMCloudMachineBootVolume contains details for the machine's boot volume.

func (*IBMCloudMachineBootVolume) DeepCopy

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

func (*IBMCloudMachineBootVolume) DeepCopyInto

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

type IBMCloudMachineProviderCondition

type IBMCloudMachineProviderCondition struct {
	// Type is the type of the condition.
	Type IBMCloudMachineProviderConditionType `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 IBMCloudMachineProviderConditionReason `json:"reason,omitempty"`
	// Message is a human-readable message indicating details about last transition.
	// +optional
	Message string `json:"message,omitempty"`
}

IBMCloudMachineProviderCondition is a condition in a IBMCloudMachineProviderStatus.

func (*IBMCloudMachineProviderCondition) DeepCopy

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

func (*IBMCloudMachineProviderCondition) DeepCopyInto

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

type IBMCloudMachineProviderConditionReason

type IBMCloudMachineProviderConditionReason string

IBMCloudMachineProviderConditionReason is reason for the condition's last transition.

const (
	// MachineCreationSucceeded indicates machine creation success.
	MachineCreationSucceeded IBMCloudMachineProviderConditionReason = "MachineCreationSucceeded"
	// MachineCreationFailed indicates machine creation failure.
	MachineCreationFailed IBMCloudMachineProviderConditionReason = "MachineCreationFailed"
	// MachineReplacementRequested indicates machine replacement was requested.
	MachineReplacementRequested IBMCloudMachineProviderConditionReason = "MachineReplacementRequested"
	// MachineReplacementInProgress indicates the machine replacement is in progress
	MachineReplacementInProgress IBMCloudMachineProviderConditionReason = "MachineReplacementInProgress"
	// MachineReplacementCompleted indicates the machine replacement completed
	MachineReplacementCompleted IBMCloudMachineProviderConditionReason = "MachineReplacementCompleted"
	// MachineReplacementFailed indicates the machine replacement failed
	MachineReplacementFailed IBMCloudMachineProviderConditionReason = "MachineReplacementFailed"
)

type IBMCloudMachineProviderConditionType

type IBMCloudMachineProviderConditionType string

IBMCloudMachineProviderConditionType is a valid value for IBMCloudMachineProviderCondition.Type

const (
	// MachineCreated indicates whether the machine has been created or not. If not,
	// it should include a reason and message for the failure.
	MachineCreated IBMCloudMachineProviderConditionType = "MachineCreated"
	// MachineReplacement indicates whether the machine is or has been replaced.
	MachineReplacement IBMCloudMachineProviderConditionType = "MachineReplacement"
)

Valid conditions for an IBM Cloud machine instance

type IBMCloudMachineProviderSpec

type IBMCloudMachineProviderSpec struct {
	// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
	// vpc type Instance struct
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// VPC name where the instance will be created
	VPC string `json:"vpc"`

	// BootVolume is the machine's boot volume details.
	// When omitted, will use IBM Cloud's default Instance boot volume configuration.
	// Such as using IBM-managed encryption for the volume.
	BootVolume IBMCloudMachineBootVolume `json:"bootVolume"`

	// Actuator will apply these tags to an virtual server instance if not present in additon
	// to default tags applied by the actuator
	Tags []TagSpecs `json:"tags,omitempty"`

	// Image is the id of the custom OS image in VPC
	// Example: rchos-4-4-7 (Image name)
	Image string `json:"image"`

	// Profile indicates the flavor of instance.
	// Example: bx2-8x32 (8 vCPUs, 32 GB RAM)
	Profile string `json:"profile"`

	// A DedicatedHost is the name of the underlying provisioned host in your VPC on which the instance/s
	// will be created with the defined Profile.
	// A dedicated host provides a single tenancy ensuring only your Compute/VSI's are provisioned on it.
	// Instances provisioned on a dedicated host adds another layer of protection while minimizing latency
	// and maximizing performance between the instances provisioned on a single host.
	DedicatedHost string `json:"dedicatedHost,omitempty"`

	// Region of the virtual machine
	Region string `json:"region"`

	// Zone where the virtual server instance will be created
	Zone string `json:"zone"`

	// ResourceGroup of the machines. This may be the same as NetworkResourceGroup if the machines are
	// created in the same Resource Group as the network resources.
	ResourceGroup string `json:"resourceGroup"`

	// NetworkResourceGroup is the Resource Group for network resources like the VPC and Subnets used by the cluster,
	// where ResourceGroupName will contain the remaining resources (e.g., machines). This may be the same as
	// ResourceGroup, if the machines are created in the same Resource Group as the network resources.
	// If empty, the NetworkResourceGroup is considered to be the same value as ResourceGroup, which will contain
	// the network and remaining resources of the cluster.
	// (optional)
	NetworkResourceGroup string `json:"networkResourceGroup,omitempty"`

	// PrimaryNetworkInterface is required to specify subnet
	PrimaryNetworkInterface NetworkInterface `json:"primaryNetworkInterface"`

	// UserDataSecret holds reference to a secret which containes Instance Ignition data (User Data)
	UserDataSecret *corev1.LocalObjectReference `json:"userDataSecret"`

	// CredentialsSecret is a reference to the secret with IBM Cloud credentials.
	CredentialsSecret *corev1.LocalObjectReference `json:"credentialsSecret"`
}

IBMCloudMachineProviderSpec is the type that will be embedded in a Machine.Spec.ProviderSpec field for an IBM Cloud VPC virtual machine. It is used by the IBM Cloud machine actuator to create a single Machine. +k8s:openapi-gen=true

func ProviderSpecFromRawExtension

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

ProviderSpecFromRawExtension unmarshals the JSON-encoded spec

func (*IBMCloudMachineProviderSpec) DeepCopy

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

func (*IBMCloudMachineProviderSpec) DeepCopyInto

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

func (*IBMCloudMachineProviderSpec) DeepCopyObject

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

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

type IBMCloudMachineProviderStatus

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

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

	// InstanceState is the state of the IBM Cloud 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 []IBMCloudMachineProviderCondition `json:"conditions,omitempty"`
}

IBMCloudMachineProviderStatus is the type that will be embedded in a Machine.Status.ProviderStatus field. It contains IBMCloud-specific status information.

func ProviderStatusFromRawExtension

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

ProviderStatusFromRawExtension unmarshals the JSON-encoded into a IBMCloudMachineProviderStatus type

func (*IBMCloudMachineProviderStatus) DeepCopy

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

func (*IBMCloudMachineProviderStatus) DeepCopyInto

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

func (*IBMCloudMachineProviderStatus) DeepCopyObject

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

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

type NetworkInterface

type NetworkInterface struct {
	// Subnet name of the network interface
	Subnet string `json:"subnet"`
	// SecurityGroups holds a list of security group names
	SecurityGroups []string `json:"securityGroups"`
}

NetworkInterface struct

func (*NetworkInterface) DeepCopy

func (in *NetworkInterface) DeepCopy() *NetworkInterface

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

func (*NetworkInterface) DeepCopyInto

func (in *NetworkInterface) DeepCopyInto(out *NetworkInterface)

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

type TagSpecs

type TagSpecs struct {
	// Name and Value of the tag
	Name  string `json:"name"`
	Value string `json:"value"`
}

TagSpecs is the name:value pair for a tag

func (*TagSpecs) DeepCopy

func (in *TagSpecs) DeepCopy() *TagSpecs

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

func (*TagSpecs) DeepCopyInto

func (in *TagSpecs) DeepCopyInto(out *TagSpecs)

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