v1

package
v0.0.0-...-8982a16 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

+groupName=onecloud.yunion.io

Package v1 contains API Schema definitions for the onecloud v1 API group +kubebuilder:object:generate=true +groupName=onecloud.yunion.io

Index

Constants

This section is empty.

Variables

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

	// 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 InitReferenceManager

func InitReferenceManager(client client.Client, scheme *runtime.Scheme)

Types

type AnsiblePlaybook

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

	Spec   AnsiblePlaybookSpec   `json:"spec,omitempty"`
	Status AnsiblePlaybookStatus `json:"status,omitempty"`
}

AnsiblePlaybook is the Schema for the ansibleplaybooks API +kubebuilder:subresource:status

func (*AnsiblePlaybook) DeepCopy

func (in *AnsiblePlaybook) DeepCopy() *AnsiblePlaybook

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

func (*AnsiblePlaybook) DeepCopyInto

func (in *AnsiblePlaybook) DeepCopyInto(out *AnsiblePlaybook)

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

func (*AnsiblePlaybook) DeepCopyObject

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

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

func (*AnsiblePlaybook) GetResourceSpec

func (ap *AnsiblePlaybook) GetResourceSpec() IResourceSpec

func (*AnsiblePlaybook) GetResourceStatus

func (ap *AnsiblePlaybook) GetResourceStatus() IResourceStatus

func (*AnsiblePlaybook) SetResourceStatus

func (ap *AnsiblePlaybook) SetResourceStatus(is IResourceStatus)

type AnsiblePlaybookHost

type AnsiblePlaybookHost struct {
	VirtualMachine ObjectReference `json:"virtualMachine"`
	// Vars describes the unique values ​​of the VirtualMachine
	// corresponding to the variables in the AnsiblePlaybookTemplate.
	// +optional
	Vars map[string]IntOrStringOrYamlStore `json:"vars,omitempty"`
}

func (*AnsiblePlaybookHost) DeepCopy

func (in *AnsiblePlaybookHost) DeepCopy() *AnsiblePlaybookHost

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

func (*AnsiblePlaybookHost) DeepCopyInto

func (in *AnsiblePlaybookHost) DeepCopyInto(out *AnsiblePlaybookHost)

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

type AnsiblePlaybookInfo

type AnsiblePlaybookInfo struct {
	ExternalInfoBase `json:",inline"`
	// +optional
	Output string `json:"output,omitempty"`
}

func (*AnsiblePlaybookInfo) DeepCopy

func (in *AnsiblePlaybookInfo) DeepCopy() *AnsiblePlaybookInfo

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

func (*AnsiblePlaybookInfo) DeepCopyInto

func (in *AnsiblePlaybookInfo) DeepCopyInto(out *AnsiblePlaybookInfo)

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

type AnsiblePlaybookList

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

AnsiblePlaybookList contains a list of AnsiblePlaybook

func (*AnsiblePlaybookList) DeepCopy

func (in *AnsiblePlaybookList) DeepCopy() *AnsiblePlaybookList

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

func (*AnsiblePlaybookList) DeepCopyInto

func (in *AnsiblePlaybookList) DeepCopyInto(out *AnsiblePlaybookList)

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

func (*AnsiblePlaybookList) DeepCopyObject

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

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

type AnsiblePlaybookSpec

type AnsiblePlaybookSpec struct {

	// PlaybookTemplateRef specifies the AnsiblePlaybookTemplate.
	// +optional
	PlaybookTemplateRef *LocalObjectReference `json:"playbookTemplateRef,omitempty"`

	// PlaybookTemplate describe the ansible playbook
	// +optional
	PlaybookTemplate *AnsiblePlaybookTemplateSpec `json:"playbookTemplate,omitempty"`

	// VirtualMachines specifies the inventory of ansible playbook.
	Inventory []AnsiblePlaybookHost `json:"inventory"`

	// Vars describe the public value about Vars in AnsiblePlaybookTemplate.
	// +optional
	Vars map[string]IntOrStringOrYamlStore `json:"vars,omitempty"`

	ResourceSpecBase `json:",inline"`
}

AnsiblePlaybookSpec defines the desired state of AnsiblePlaybook

func (*AnsiblePlaybookSpec) DeepCopy

func (in *AnsiblePlaybookSpec) DeepCopy() *AnsiblePlaybookSpec

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

func (*AnsiblePlaybookSpec) DeepCopyInto

func (in *AnsiblePlaybookSpec) DeepCopyInto(out *AnsiblePlaybookSpec)

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

type AnsiblePlaybookStatus

type AnsiblePlaybookStatus struct {
	// Important: Run "make" to regenerate code after modifying this file
	ResourceStatusBase `json:",inline"`
	// +optional
	ExternalInfo AnsiblePlaybookInfo `json:"externalInfo,omitempty"`
}

AnsiblePlaybookStatus defines the observed state of AnsiblePlaybook

func (*AnsiblePlaybookStatus) DeepCopy

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

func (*AnsiblePlaybookStatus) DeepCopy2

func (apStatus *AnsiblePlaybookStatus) DeepCopy2() IResourceStatus

func (*AnsiblePlaybookStatus) DeepCopyInto

func (in *AnsiblePlaybookStatus) DeepCopyInto(out *AnsiblePlaybookStatus)

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

func (*AnsiblePlaybookStatus) GetBaseExternalInfo

func (apStatus *AnsiblePlaybookStatus) GetBaseExternalInfo() ExternalInfoBase

func (*AnsiblePlaybookStatus) SetBaseExternalInfo

func (apStatus *AnsiblePlaybookStatus) SetBaseExternalInfo(info ExternalInfoBase)

type AnsiblePlaybookTemplate

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

	Spec   AnsiblePlaybookTemplateSpec   `json:"spec,omitempty"`
	Status AnsiblePlaybookTemplateStatus `json:"status,omitempty"`
}

AnsiblePlaybookTemplate is the Schema for the ansibleplaybooktemplates API

func (*AnsiblePlaybookTemplate) DeepCopy

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

func (*AnsiblePlaybookTemplate) DeepCopyInto

func (in *AnsiblePlaybookTemplate) DeepCopyInto(out *AnsiblePlaybookTemplate)

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

func (*AnsiblePlaybookTemplate) DeepCopyObject

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

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

type AnsiblePlaybookTemplateList

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

AnsiblePlaybookTemplateList contains a list of AnsiblePlaybookTemplate

func (*AnsiblePlaybookTemplateList) DeepCopy

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

func (*AnsiblePlaybookTemplateList) DeepCopyInto

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

func (*AnsiblePlaybookTemplateList) DeepCopyObject

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

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

type AnsiblePlaybookTemplateSpec

type AnsiblePlaybookTemplateSpec struct {
	// Playbook describe the main content of absible playbook which should be in yaml format.
	Playbook string `json:"playbook"`
	// Requirements describe the source of roles dependent on Playbook
	// +optional
	Requirements string `json:"requirements,omitempty"`
	// Files describe the associated file tree and file content which should be in json format.
	// +optional
	Files string `json:"files,omitempty"`
	// Vars describe the vars to apply this ansible playbook.
	// +optional
	Vars []AnsiblePlaybookTemplateVar `json:"vars,omitempty"`
}

AnsiblePlaybookTemplateSpec defines the desired state of AnsiblePlaybookTemplate.

func (*AnsiblePlaybookTemplateSpec) DeepCopy

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

func (*AnsiblePlaybookTemplateSpec) DeepCopyInto

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

type AnsiblePlaybookTemplateStatus

type AnsiblePlaybookTemplateStatus struct {
}

AnsiblePlaybookTemplateStatus defines the observed state of AnsiblePlaybookTemplate

func (*AnsiblePlaybookTemplateStatus) DeepCopy

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

func (*AnsiblePlaybookTemplateStatus) DeepCopyInto

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

type AnsiblePlaybookTemplateVar

type AnsiblePlaybookTemplateVar struct {
	Name string `json:"name"`
	// Required indicates whether this variable is required.
	// +optional
	Required *bool `json:"required,omitempty"`
	// Default describe the default value of this variable.
	// If it is empty, Required should be true.
	// +optional
	Default *IntOrString `json:"default,omitempty"`
}

func (*AnsiblePlaybookTemplateVar) DeepCopy

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

func (*AnsiblePlaybookTemplateVar) DeepCopyInto

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

type DiskDriver

type DiskDriver string

Driver represents the drive method of the disk on the virtual machine. +kubebuilder:validation:Enum=virtio;ide;scsi;sata;pvscsi

const (
	DiskDriverVirtio DiskDriver = "virtio"
	DiskDriverIde    DiskDriver = "ide"
	DiskDriverScsi   DiskDriver = "scsi"
	DiskDriverSata   DiskDriver = "sata"
	DiskDriverPvscsi DiskDriver = "pvscsi"
)

type DisplayIdenSpec

type DisplayIdenSpec struct {
	// Name
	// +optional
	Name string `json:"name,omitempty"`
	// NameCheck indicates whether to strictly check Name
	// +optional
	NameCheck *bool `json:"nameCheck,omitempty"`
	// +optional
	Desciption string `json:"description,omitempty"`
}

func (*DisplayIdenSpec) DeepCopy

func (in *DisplayIdenSpec) DeepCopy() *DisplayIdenSpec

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

func (*DisplayIdenSpec) DeepCopyInto

func (in *DisplayIdenSpec) DeepCopyInto(out *DisplayIdenSpec)

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

type Endpoint

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

	Spec   EndpointSpec   `json:"spec,omitempty"`
	Status EndpointStatus `json:"status,omitempty"`
}

Endpoint is the Schema for the endpoints API +kubebuilder:subresource:status

func (*Endpoint) DeepCopy

func (in *Endpoint) DeepCopy() *Endpoint

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

func (*Endpoint) DeepCopyInto

func (in *Endpoint) DeepCopyInto(out *Endpoint)

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

func (*Endpoint) DeepCopyObject

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

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

func (*Endpoint) GetResourceSpec

func (ep *Endpoint) GetResourceSpec() IResourceSpec

func (*Endpoint) GetResourceStatus

func (ep *Endpoint) GetResourceStatus() IResourceStatus

func (*Endpoint) SetResourceStatus

func (ep *Endpoint) SetResourceStatus(is IResourceStatus)

type EndpointList

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

EndpointList contains a list of Endpoint

func (*EndpointList) DeepCopy

func (in *EndpointList) DeepCopy() *EndpointList

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

func (*EndpointList) DeepCopyInto

func (in *EndpointList) DeepCopyInto(out *EndpointList)

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

func (*EndpointList) DeepCopyObject

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

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

type EndpointSpec

type EndpointSpec struct {

	// Url of this Endpoint
	URL URL `json:"url"`
	// +optional
	Name string `json:"name,omitempty"`
	// +optional
	Disabled *bool `json:"disabled,omitempty"`
	// Service certificate id or name
	// +optional
	ServiceCertificate string `json:"serviceCertificate,omitempty"`
	ResourceSpecBase   `json:",inline"`
}

EndpointSpec defines the desired state of Endpoint

func (*EndpointSpec) DeepCopy

func (in *EndpointSpec) DeepCopy() *EndpointSpec

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

func (*EndpointSpec) DeepCopyInto

func (in *EndpointSpec) DeepCopyInto(out *EndpointSpec)

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

type EndpointStatus

type EndpointStatus struct {
	ResourceStatusBase `json:",inline"`
	// +optional
	ExternalInfo ExternalInfoBase `json:"externalInfo,omitempty"`
}

EndpointStatus defines the observed state of Endpoint

func (*EndpointStatus) DeepCopy

func (in *EndpointStatus) DeepCopy() *EndpointStatus

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

func (*EndpointStatus) DeepCopy2

func (epStatus *EndpointStatus) DeepCopy2() IResourceStatus

func (*EndpointStatus) DeepCopyInto

func (in *EndpointStatus) DeepCopyInto(out *EndpointStatus)

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

func (*EndpointStatus) GetBaseExternalInfo

func (epStatus *EndpointStatus) GetBaseExternalInfo() ExternalInfoBase

func (*EndpointStatus) SetBaseExternalInfo

func (epStatus *EndpointStatus) SetBaseExternalInfo(info ExternalInfoBase)

type ExternalInfoBase

type ExternalInfoBase struct {
	// +optional
	Id string `json:"id,omitempty"`
	// +optional
	Status string `json:"status,omitempty"`
	// Action indicate the latest action for external vm.
	// +optional
	Action string `json:"action,omitempty"`
}

ExternalInfoBase describe the corresponding resource's info in external system

func (*ExternalInfoBase) DeepCopy

func (in *ExternalInfoBase) DeepCopy() *ExternalInfoBase

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

func (*ExternalInfoBase) DeepCopyInto

func (in *ExternalInfoBase) DeepCopyInto(out *ExternalInfoBase)

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

type IResource

type IResource interface {
	runtime.Object
	metav1.Object
	GetResourceStatus() IResourceStatus
	GetResourceSpec() IResourceSpec
	SetResourceStatus(is IResourceStatus)
}

+kubebuilder:object:generate=false

type IResourceSpec

type IResourceSpec interface {
	GetMaxTryTimes() int32
}

+kubebuilder:object:generate=false

type IResourceStatus

type IResourceStatus interface {
	DeepCopy2() IResourceStatus
	GetPhase() ResourcePhase
	SetPhase(phase ResourcePhase, reason string)
	GetTryTimes() int32
	SetTryTimes(i int32)
	GetBaseExternalInfo() ExternalInfoBase
	SetBaseExternalInfo(info ExternalInfoBase)
}

+kubebuilder:object:generate=false

type IStore

type IStore interface {
	GetValue(ctx context.Context) (IValue, error)
}

+kubebuilder:object:generate=false

type IValue

type IValue interface {
	IsZero() bool
	Interface() interface{}
}

+kubebuilder:object:generate=false

type IntOrString

type IntOrString struct {
	intstr.IntOrString `json:",inline"`
}

func (*IntOrString) DeepCopy

func (in *IntOrString) DeepCopy() *IntOrString

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

func (*IntOrString) DeepCopyInto

func (in *IntOrString) DeepCopyInto(out *IntOrString)

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

func (IntOrString) Int

func (isv IntOrString) Int() (int32, bool)

func (IntOrString) Interface

func (isv IntOrString) Interface() interface{}

func (IntOrString) IsZero

func (isv IntOrString) IsZero() bool

func (IntOrString) String

func (isv IntOrString) String() (string, bool)

type IntOrStringOrYamlStore

type IntOrStringOrYamlStore struct {
	// IsYaml determines whether the string in IntOrStringStore is a yaml string
	// +optional
	IsYaml *bool `json:"isYaml,omitempty"`

	IntOrStringStore `json:",inline"`
}

func (*IntOrStringOrYamlStore) DeepCopy

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

func (*IntOrStringOrYamlStore) DeepCopyInto

func (in *IntOrStringOrYamlStore) DeepCopyInto(out *IntOrStringOrYamlStore)

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

func (IntOrStringOrYamlStore) GetValue

func (isys IntOrStringOrYamlStore) GetValue(ctx context.Context) (IValue, error)

type IntOrStringStore

type IntOrStringStore struct {
	// +optional
	Value *IntOrString `json:"value,omitempty"`
	// +optional
	Reference *ObjectFieldReference `json:"reference,omitempty"`
}

func (*IntOrStringStore) DeepCopy

func (in *IntOrStringStore) DeepCopy() *IntOrStringStore

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

func (*IntOrStringStore) DeepCopyInto

func (in *IntOrStringStore) DeepCopyInto(out *IntOrStringStore)

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

func (IntOrStringStore) GetValue

func (ist IntOrStringStore) GetValue(ctx context.Context) (IValue, error)

type LocalObjectReference

type LocalObjectReference struct {
	Name string `json:"name,omitempty"`
}

LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.

func (*LocalObjectReference) DeepCopy

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

func (*LocalObjectReference) DeepCopyInto

func (in *LocalObjectReference) DeepCopyInto(out *LocalObjectReference)

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

type ObjectFieldReference

type ObjectFieldReference struct {
	// +optional
	Group string `json:"group,omitempty"`
	// +optional
	Version   string `json:"version,omitempty"`
	Kind      string `json:"kind"`
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
	FieldPath string `json:"fieldPath"`
}

func (*ObjectFieldReference) DeepCopy

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

func (*ObjectFieldReference) DeepCopyInto

func (in *ObjectFieldReference) DeepCopyInto(out *ObjectFieldReference)

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

func (*ObjectFieldReference) GroupVersionKind

func (fr *ObjectFieldReference) GroupVersionKind() schema.GroupVersionKind

func (*ObjectFieldReference) NamespacedName

func (fr *ObjectFieldReference) NamespacedName() types.NamespacedName

func (*ObjectFieldReference) String

func (fr *ObjectFieldReference) String() string

func (*ObjectFieldReference) Value

func (fr *ObjectFieldReference) Value(ctx context.Context) (interface{}, error)

type ObjectReference

type ObjectReference struct {
	// +optional
	Kind string `json:"kind,omitempty"`
	// +optional
	Namespace string `json:"namespace,omitempty"`
	// +optional
	Name string `json:"name,omitempty"`
	// +optional
	UID types.UID `json:"uid,omitempty"`
	// +optional
	APIVersion string `json:"apiVersion,omitempty"`
	// +optional
	ResourceVersion string `json:"resourceVersion,omitempty"`
}

func (*ObjectReference) DeepCopy

func (in *ObjectReference) DeepCopy() *ObjectReference

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

func (*ObjectReference) DeepCopyInto

func (in *ObjectReference) DeepCopyInto(out *ObjectReference)

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

type RecreatePolicy

type RecreatePolicy struct {
	MatchStatus []string `json:"matchStatus,omitempty"`
	// +optional
	Never *bool `json:"never,omitempty"`
	// +optional
	Allways *bool `json:"allways,omitempty"`
}

RecreatePolicy describe that when the virtual machine is abnormal, how to deal with it, specifically determine whether to delete and recreate.

func (*RecreatePolicy) DeepCopy

func (in *RecreatePolicy) DeepCopy() *RecreatePolicy

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

func (*RecreatePolicy) DeepCopyInto

func (in *RecreatePolicy) DeepCopyInto(out *RecreatePolicy)

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

type ResourcePhase

type ResourcePhase string

ResourcePhase is a label for the condition of a resource at the current time

const (
	// ReourcePending means the external resource in an unstable intermediate state.
	ResourcePending ResourcePhase = "Pending"
	// ResourceReady means the external resource in an normal state.
	ResourceReady ResourcePhase = "Ready"
	// ResourceRunning means the external resource has been enter a working state.
	ResourceRunning ResourcePhase = "Running"
	// ResourceFailed means the external resource has been unnormal and should be delete.
	ResourceFailed ResourcePhase = "Failed"
	// ResourceUnkown means the external system went wrong and controller should resync after some time.
	ResourceUnkown ResourcePhase = "Unkown"
	// ResourceInvalid means the resource is invalid that means user should edit the spec or recreate one.
	ResourceInvalid ResourcePhase = "Invalid"
	// ResourceWaiting means this resource is waiting for others
	ResourceWaiting ResourcePhase = "Waiting"
	// ResourceSucceeded means the resource completed its mission and finished.
	ResourceFinished ResourcePhase = "Finished"
)

type ResourceSpecBase

type ResourceSpecBase struct {
	// Nil or Non-positive number means unlimited.
	// +optional
	MaxTryTimes *int32 `json:"maxRetryTimes,omitempty"`
}

func (*ResourceSpecBase) DeepCopy

func (in *ResourceSpecBase) DeepCopy() *ResourceSpecBase

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

func (*ResourceSpecBase) DeepCopyInto

func (in *ResourceSpecBase) DeepCopyInto(out *ResourceSpecBase)

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

func (*ResourceSpecBase) GetMaxTryTimes

func (rs *ResourceSpecBase) GetMaxTryTimes() int32

type ResourceStatusBase

type ResourceStatusBase struct {
	// +optional
	Phase ResourcePhase `json:"phase,omitempty"`
	// A human readable message indicating details about why resource is in this phase.
	// +optional
	Reason string `json:"reason,omitempty"`
	// TryTimes record the continuous try times.
	TryTimes int32 `json:"tryTimes"`
}

func (*ResourceStatusBase) DeepCopy

func (in *ResourceStatusBase) DeepCopy() *ResourceStatusBase

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

func (*ResourceStatusBase) DeepCopyInto

func (in *ResourceStatusBase) DeepCopyInto(out *ResourceStatusBase)

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

func (*ResourceStatusBase) GetPhase

func (rb *ResourceStatusBase) GetPhase() ResourcePhase

func (*ResourceStatusBase) GetTryTimes

func (rb *ResourceStatusBase) GetTryTimes() int32

func (*ResourceStatusBase) SetPhase

func (rb *ResourceStatusBase) SetPhase(phase ResourcePhase, reason string)

func (*ResourceStatusBase) SetTryTimes

func (rb *ResourceStatusBase) SetTryTimes(i int32)

type StorageMedium

type StorageMedium string

StorageMedium represents storage media type +kubebuilder:validation:Enum=rotate;ssd;hybrid

const (
	// Mechanical disk
	StorageMediumRotate StorageMedium = "rotate"
	// Solid state disk
	StorageMediumSsd StorageMedium = "ssd"
	// Hybrid disk
	StorageMediumHybrid StorageMedium = "hybrid"
)

type String

type String string

func (String) Interface

func (sv String) Interface() interface{}

func (String) IsZero

func (sv String) IsZero() bool

func (String) String

func (sv String) String() string

type StringStore

type StringStore struct {
	// +optional
	Value string `json:"value,omitempty"`
	// +optional
	Reference *ObjectFieldReference `json:"reference,omitempty"`
}

func (*StringStore) DeepCopy

func (in *StringStore) DeepCopy() *StringStore

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

func (*StringStore) DeepCopyInto

func (in *StringStore) DeepCopyInto(out *StringStore)

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

func (StringStore) GetValue

func (st StringStore) GetValue(ctx context.Context) (IValue, error)

type URL

type URL struct {
	// +optional
	Protocol string      `json:"protocol,omitempty"`
	Host     StringStore `json:"host,omitempty"`
	// +optional
	Port *int32 `json:"port,omitempty"`
	// +optional
	Prefix string `json:"prefix,omitempty"`
}

URL is used to construct url string 'Protocol://Host:Port/Prefix'

func (*URL) DeepCopy

func (in *URL) DeepCopy() *URL

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

func (*URL) DeepCopyInto

func (in *URL) DeepCopyInto(out *URL)

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

type VMDiskSpec

type VMDiskSpec struct {
	// The disk will be created from the image represented by ImageId.
	// +optional
	Image string `json:"image,omitempty"`

	// SizeGB represents the size(unit: GB) of disk.
	// +optional
	SizeGB int64 `json:"sizeGB"`

	// +optional
	Driver DiskDriver `json:"driver,omitempty"`

	// +optional
	Storage VMStorageSpec `json:"storageConfig,omitempty"`
}

func (*VMDiskSpec) DeepCopy

func (in *VMDiskSpec) DeepCopy() *VMDiskSpec

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

func (*VMDiskSpec) DeepCopyInto

func (in *VMDiskSpec) DeepCopyInto(out *VMDiskSpec)

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

type VMInfo

type VMInfo struct {
	ExternalInfoBase `json:",inline"`
	// +optional
	Eip string `json:"eip,omitempty"`
	// +optional
	Ips []string `json:"ips,omitempty"`
}

func (*VMInfo) DeepCopy

func (in *VMInfo) DeepCopy() *VMInfo

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

func (*VMInfo) DeepCopyInto

func (in *VMInfo) DeepCopyInto(out *VMInfo)

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

type VMNetworkSpec

type VMNetworkSpec struct {
	Network string `json:"network"`

	// +optional
	Address string `json:"address,omitempty"`
}

func (*VMNetworkSpec) DeepCopy

func (in *VMNetworkSpec) DeepCopy() *VMNetworkSpec

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

func (*VMNetworkSpec) DeepCopyInto

func (in *VMNetworkSpec) DeepCopyInto(out *VMNetworkSpec)

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

type VMNewEipSpec

type VMNewEipSpec struct {
	// Bw indicates the bandwidth of the Elastic Public IP.
	// +kubebuilder:validation:Minimum=1
	Bw *int64 `json:"bw,omitempty"`
	// The charge type of Elastic Public IP
	// +optional
	ChargeType string `json:"chargeType,omitempty"`
}

func (*VMNewEipSpec) DeepCopy

func (in *VMNewEipSpec) DeepCopy() *VMNewEipSpec

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

func (*VMNewEipSpec) DeepCopyInto

func (in *VMNewEipSpec) DeepCopyInto(out *VMNewEipSpec)

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

type VMPasswordSpec

type VMPasswordSpec struct {
	// +optional
	KeyPairId string `json:"keyPairId,omitempty"`
	// +optional
	Password string `json:"password,omitempty"`
	// +optional
	ResetPassword *bool `json:"resetPassword,omitempty"`
}

func (*VMPasswordSpec) DeepCopy

func (in *VMPasswordSpec) DeepCopy() *VMPasswordSpec

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

func (*VMPasswordSpec) DeepCopyInto

func (in *VMPasswordSpec) DeepCopyInto(out *VMPasswordSpec)

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

type VMPreferSpec

type VMPreferSpec struct {
	// PreferManager is the parameter passed to the scheduler which makes
	// the virtual machine created in the preferred cloud provider.
	// +optional
	PreferManger string `json:"preferManager,omitempty"`
	// PreferRegion is the parameter passed to the scheduler which makes
	// the virtual machine created in the preferred cloud region.
	// +optional
	PreferRegion string `json:"preferRegion,omitempty"`
	// PreferZone is the parameter passed to the scheduler which makes
	// the virtual machine created in the preferred cloud zone.
	// +optional
	PreferZone string `json:"preferZone,omitempty"`
	// PreferWire is the parameter passed to the scheduler which makes
	// the machine created in the preferred wire.
	// +optional
	PreferWire string `json:"preferWire,omitempty"`
	// PreferHost is the parameter passed to the scheduler which makes
	// the machine created in the preferred host.
	// +optional
	PreferHost string `json:"preferHost,omitempty"`
}

func (*VMPreferSpec) DeepCopy

func (in *VMPreferSpec) DeepCopy() *VMPreferSpec

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

func (*VMPreferSpec) DeepCopyInto

func (in *VMPreferSpec) DeepCopyInto(out *VMPreferSpec)

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

type VMProjectSpec

type VMProjectSpec struct {
	Project string `json:"project"`
	// +optional
	PoejectDomain string `json:"projectDomain,omitempty"`
}

func (*VMProjectSpec) DeepCopy

func (in *VMProjectSpec) DeepCopy() *VMProjectSpec

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

func (*VMProjectSpec) DeepCopyInto

func (in *VMProjectSpec) DeepCopyInto(out *VMProjectSpec)

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

type VMStorageSpec

type VMStorageSpec struct {
	// Storage represents specific storage
	// +optional
	Storage string `json:"storage,omitempty"`
	// Backend represents backend of storage
	// +optinal
	Backend string `json:"backend,omitempty"`
	// +optional
	Medium StorageMedium `json:"medium,omitempty"`
}

func (*VMStorageSpec) DeepCopy

func (in *VMStorageSpec) DeepCopy() *VMStorageSpec

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

func (*VMStorageSpec) DeepCopyInto

func (in *VMStorageSpec) DeepCopyInto(out *VMStorageSpec)

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

type VirtualMachine

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

	Spec   VirtualMachineSpec   `json:"spec,omitempty"`
	Status VirtualMachineStatus `json:"status,omitempty"`
}

VirtualMachine is the Schema for the virtualmachines API +kubebuilder:subresource:status

func (*VirtualMachine) DeepCopy

func (in *VirtualMachine) DeepCopy() *VirtualMachine

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

func (*VirtualMachine) DeepCopyInto

func (in *VirtualMachine) DeepCopyInto(out *VirtualMachine)

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

func (*VirtualMachine) DeepCopyObject

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

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

func (*VirtualMachine) Default

func (r *VirtualMachine) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*VirtualMachine) GetResourceSpec

func (vm *VirtualMachine) GetResourceSpec() IResourceSpec

func (*VirtualMachine) GetResourceStatus

func (vm *VirtualMachine) GetResourceStatus() IResourceStatus

func (*VirtualMachine) SetResourceStatus

func (vm *VirtualMachine) SetResourceStatus(is IResourceStatus)

func (*VirtualMachine) SetupWebhookWithManager

func (r *VirtualMachine) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*VirtualMachine) ValidateCreate

func (r *VirtualMachine) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*VirtualMachine) ValidateDelete

func (r *VirtualMachine) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*VirtualMachine) ValidateUpdate

func (r *VirtualMachine) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type VirtualMachineConfig

type VirtualMachineConfig struct {
	VMPreferSpec `json:",inline"`
	// +optional
	Hypervisor string `json:"hypervisor"`

	// VcpuCount represents the number of CPUs of the virtual machine.
	// It conflicts with InstanceType and it is It is required if InstanceType is not specified.
	// +kubebuilder:validation:Minimum=1
	// +optional
	VcpuCount *int64 `json:"vcpuCount,omitempty"`
	// VmemSizeGB represents the size of memory of the virtual machine.
	// It conflicts with InstanceType and it is It is required if InstanceType is not specified.
	// +optional
	VmemSizeGB *int64 `json:"vmemSizeGB,omitempty"`
	// InstanceType describes the specifications of the virtual machine,
	// which are predefined by the cloud provider.
	// It conflicts with VcpuCount and VmemSizeGB.
	// +optional
	InstanceType string `json:"instanceType,omitempty"`

	// RootDisk describes the configuration of the system disk
	RootDisk VMDiskSpec `json:"rootDisk"`

	// DataDisks describes the configuration of data disks
	// +kubebuilder:validation:MaxItems=7
	// +optional
	DataDisks []VMDiskSpec `json:"dataDisks,omitempty"`

	// +optional
	Networks []VMNetworkSpec `json:"networks,omitempty"`
}

func (*VirtualMachineConfig) DeepCopy

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

func (*VirtualMachineConfig) DeepCopyInto

func (in *VirtualMachineConfig) DeepCopyInto(out *VirtualMachineConfig)

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

type VirtualMachineList

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

VirtualMachineList contains a list of VirtualMachine

func (*VirtualMachineList) DeepCopy

func (in *VirtualMachineList) DeepCopy() *VirtualMachineList

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

func (*VirtualMachineList) DeepCopyInto

func (in *VirtualMachineList) DeepCopyInto(out *VirtualMachineList)

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

func (*VirtualMachineList) DeepCopyObject

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

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

type VirtualMachineSpec

type VirtualMachineSpec struct {
	DisplayIdenSpec `json:",inline"`

	VmConfig VirtualMachineConfig `json:"vmConfig"`

	Project VMProjectSpec `json:"projectConfig"`

	VMPasswordSpec `json:",inline"`

	// +optional
	// +kubebuilder:validation:MinItems=1
	Secgropus []string `json:"secgroups,omitempty"`

	// NewEip indicates that create a new EIP and bind it with VM.
	// It conflicts with Eip.
	// +optional
	NewEip *VMNewEipSpec `json:"newEip,omitempty"`
	// Eip indicates that bind the existing EIP with VM.
	// It conflicts with NewEip.
	// +optional
	Eip string `json:"eip,omitempty"`

	// BillDuration describes the duration of the annual and monthly billing type.
	// That length of BillDuration represents the billing type is 'prepaid'.
	// +optional
	BillDuration string `json:"billDuration,omitempty"`
	// AutoRenew indicates whether to automatically renewal.
	// +optional
	AutoRenew *bool `json:"autoRenew,omitempty"`

	// +optional
	RecreatePolicy   *RecreatePolicy `json:"recreatePolicy,omitempty"`
	ResourceSpecBase `json:",inline"`
}

VirtualMachineSpec defines the desired state of VirtualMachine

func (*VirtualMachineSpec) DeepCopy

func (in *VirtualMachineSpec) DeepCopy() *VirtualMachineSpec

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

func (*VirtualMachineSpec) DeepCopyInto

func (in *VirtualMachineSpec) DeepCopyInto(out *VirtualMachineSpec)

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

type VirtualMachineStatus

type VirtualMachineStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	ResourceStatusBase `json:",inline"`
	// +optional
	ExternalInfo VMInfo `json:"externalInfo,omitempty"`
}

VirtualMachineStatus defines the observed state of VirtualMachine

func (*VirtualMachineStatus) DeepCopy

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

func (*VirtualMachineStatus) DeepCopy2

func (vmStatus *VirtualMachineStatus) DeepCopy2() IResourceStatus

func (*VirtualMachineStatus) DeepCopyInto

func (in *VirtualMachineStatus) DeepCopyInto(out *VirtualMachineStatus)

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

func (*VirtualMachineStatus) GetBaseExternalInfo

func (vmStatus *VirtualMachineStatus) GetBaseExternalInfo() ExternalInfoBase

func (*VirtualMachineStatus) SetBaseExternalInfo

func (vmStatus *VirtualMachineStatus) SetBaseExternalInfo(info ExternalInfoBase)

type Yaml

type Yaml []byte

func (Yaml) DeepCopy

func (in Yaml) DeepCopy() Yaml

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

func (Yaml) DeepCopyInto

func (in Yaml) DeepCopyInto(out *Yaml)

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

func (Yaml) Interface

func (y Yaml) Interface() interface{}

func (Yaml) IsZero

func (y Yaml) IsZero() bool

func (Yaml) MarshalYAML

func (y Yaml) MarshalYAML() (interface{}, error)

Jump to

Keyboard shortcuts

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