v1alpha1

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

+groupName=server.upcloud.kubeform.com

Index

Constants

This section is empty.

Variables

View Source
var (
	// TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	AddToScheme = localSchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: server.GroupName, Version: "v1alpha1"}

Functions

func GetDecoder

func GetDecoder() map[string]jsoniter.ValDecoder

func GetEncoder

func GetEncoder() map[string]jsoniter.ValEncoder

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Server

type Server struct {
	metav1.TypeMeta   `json:",inline,omitempty"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              ServerSpec   `json:"spec,omitempty"`
	Status            ServerStatus `json:"status,omitempty"`
}

func (*Server) DeepCopy

func (in *Server) DeepCopy() *Server

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

func (*Server) DeepCopyInto

func (in *Server) DeepCopyInto(out *Server)

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

func (*Server) DeepCopyObject

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

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

func (*Server) SetupWebhookWithManager

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

func (*Server) ValidateCreate

func (r *Server) ValidateCreate() error

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

func (*Server) ValidateDelete

func (r *Server) ValidateDelete() error

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

func (*Server) ValidateUpdate

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

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

type ServerList

type ServerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	// Items is a list of Server CRD objects
	Items []Server `json:"items,omitempty"`
}

ServerList is a list of Servers

func (*ServerList) DeepCopy

func (in *ServerList) DeepCopy() *ServerList

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

func (*ServerList) DeepCopyInto

func (in *ServerList) DeepCopyInto(out *ServerList)

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

func (*ServerList) DeepCopyObject

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

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

type ServerSpec

type ServerSpec struct {
	State *ServerSpecResource `json:"state,omitempty" tf:"-"`

	Resource ServerSpecResource `json:"resource" tf:"resource"`

	UpdatePolicy base.UpdatePolicy `json:"updatePolicy,omitempty" tf:"-"`

	TerminationPolicy base.TerminationPolicy `json:"terminationPolicy,omitempty" tf:"-"`

	ProviderRef core.LocalObjectReference `json:"providerRef" tf:"-"`

	BackendRef *core.LocalObjectReference `json:"backendRef,omitempty" tf:"-"`
}

func (*ServerSpec) DeepCopy

func (in *ServerSpec) DeepCopy() *ServerSpec

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

func (*ServerSpec) DeepCopyInto

func (in *ServerSpec) DeepCopyInto(out *ServerSpec)

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

type ServerSpecLogin

type ServerSpecLogin struct {
	// Indicates a password should be create to allow access
	// +optional
	CreatePassword *bool `json:"createPassword,omitempty" tf:"create_password"`
	// A list of ssh keys to access the server
	// +optional
	Keys []string `json:"keys,omitempty" tf:"keys"`
	// The delivery method for the server’s root password
	// +optional
	PasswordDelivery *string `json:"passwordDelivery,omitempty" tf:"password_delivery"`
	// Username to be create to access the server
	// +optional
	User *string `json:"user,omitempty" tf:"user"`
}

func (*ServerSpecLogin) DeepCopy

func (in *ServerSpecLogin) DeepCopy() *ServerSpecLogin

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

func (*ServerSpecLogin) DeepCopyInto

func (in *ServerSpecLogin) DeepCopyInto(out *ServerSpecLogin)

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

type ServerSpecLoginCodec

type ServerSpecLoginCodec struct {
}

+k8s:deepcopy-gen=false

func (ServerSpecLoginCodec) Decode

func (ServerSpecLoginCodec) Encode

func (ServerSpecLoginCodec) Encode(ptr unsafe.Pointer, stream *jsoniter.Stream)

func (ServerSpecLoginCodec) IsEmpty

func (ServerSpecLoginCodec) IsEmpty(ptr unsafe.Pointer) bool

type ServerSpecNetworkInterface

type ServerSpecNetworkInterface struct {
	// `true` if this interface should be used for network booting.
	// +optional
	Bootable *bool `json:"bootable,omitempty" tf:"bootable"`
	// The assigned IP address.
	// +optional
	IpAddress *string `json:"ipAddress,omitempty" tf:"ip_address"`
	// The IP address type of this interface (one of `IPv4` or `IPv6`).
	// +optional
	IpAddressFamily *string `json:"ipAddressFamily,omitempty" tf:"ip_address_family"`
	// `true` is a floating IP address is attached.
	// +optional
	IpAddressFloating *bool `json:"ipAddressFloating,omitempty" tf:"ip_address_floating"`
	// The assigned MAC address.
	// +optional
	MacAddress *string `json:"macAddress,omitempty" tf:"mac_address"`
	// The unique ID of a network to attach this network to.
	// +optional
	Network *string `json:"network,omitempty" tf:"network"`
	// `true` if source IP should be filtered.
	// +optional
	SourceIPFiltering *bool `json:"sourceIPFiltering,omitempty" tf:"source_ip_filtering"`
	// Network interface type. For private network interfaces, a network must be specified with an existing network id.
	Type *string `json:"type" tf:"type"`
}

func (*ServerSpecNetworkInterface) DeepCopy

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

func (*ServerSpecNetworkInterface) DeepCopyInto

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

type ServerSpecResource

type ServerSpecResource struct {
	ID string `json:"id,omitempty" tf:"id,omitempty"`

	// The number of CPU for the server
	// +optional
	Cpu *int64 `json:"cpu,omitempty" tf:"cpu"`
	// Are firewall rules active for the server
	// +optional
	Firewall *bool `json:"firewall,omitempty" tf:"firewall"`
	// Use this to start the VM on a specific host. Refers to value from host -attribute. Only available for private cloud hosts
	// +optional
	Host *int64 `json:"host,omitempty" tf:"host"`
	// A valid domain name
	Hostname *string `json:"hostname" tf:"hostname"`
	// Configure access credentials to the server
	// +optional
	Login *ServerSpecLogin `json:"login,omitempty" tf:"login"`
	// The size of memory for the server (in megabytes)
	// +optional
	Mem *int64 `json:"mem,omitempty" tf:"mem"`
	// Is the metadata service active for the server
	// +optional
	Metadata *bool `json:"metadata,omitempty" tf:"metadata"`
	// One or more blocks describing the network interfaces of the server.
	// +kubebuilder:validation:MinItems=1
	NetworkInterface []ServerSpecNetworkInterface `json:"networkInterface" tf:"network_interface"`
	// The pricing plan used for the server
	// +optional
	Plan *string `json:"plan,omitempty" tf:"plan"`
	// Simple backup schedule configuration
	// 				The idea behind simple backups is to provide a simplified way of backing up *all* of the storages attached to a given server.
	// 				This means you cannot have simple backup set for a server, and then some individual backup_rules on the storages attached to said server.
	// 				Such configuration will throw an error during execution. This also apply to backup_rules set for server templates.
	// 				Also, due to how UpCloud API works with simple backups and how Terraform orders the update operations,
	// 				it is advised to never switch between simple_backup on the server and individual storages backup_rules in one apply.
	// 				If you want to switch from using server simple backup to per-storage defined backup rules,
	// 				please first remove simple_backup block from a server, run 'terraform apply',
	// 				then add backup_rule to desired storages and run 'terraform apply' again.
	// +optional
	SimpleBackup *ServerSpecSimpleBackup `json:"simpleBackup,omitempty" tf:"simple_backup"`
	// A list of storage devices associated with the server
	// +optional
	StorageDevices []ServerSpecStorageDevices `json:"storageDevices,omitempty" tf:"storage_devices"`
	// The server related tags
	// +optional
	Tags []string `json:"tags,omitempty" tf:"tags"`
	// Block describing the preconfigured operating system
	// +optional
	Template *ServerSpecTemplate `json:"template,omitempty" tf:"template"`
	// A short, informational description
	// +optional
	Title *string `json:"title,omitempty" tf:"title"`
	// Defines URL for a server setup script, or the script body itself
	// +optional
	UserData *string `json:"userData,omitempty" tf:"user_data"`
	// The zone in which the server will be hosted
	Zone *string `json:"zone" tf:"zone"`
}

func (*ServerSpecResource) DeepCopy

func (in *ServerSpecResource) DeepCopy() *ServerSpecResource

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

func (*ServerSpecResource) DeepCopyInto

func (in *ServerSpecResource) DeepCopyInto(out *ServerSpecResource)

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

type ServerSpecSimpleBackup added in v0.5.0

type ServerSpecSimpleBackup struct {
	// Simple backup plan. Accepted values: dailies, weeklies, monthlies.
	Plan *string `json:"plan" tf:"plan"`
	// Time of the day at which backup will be taken. Should be provided in a hhmm format (e.g. 2230).
	Time *string `json:"time" tf:"time"`
}

func (*ServerSpecSimpleBackup) DeepCopy added in v0.5.0

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

func (*ServerSpecSimpleBackup) DeepCopyInto added in v0.5.0

func (in *ServerSpecSimpleBackup) DeepCopyInto(out *ServerSpecSimpleBackup)

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

type ServerSpecSimpleBackupCodec added in v0.5.0

type ServerSpecSimpleBackupCodec struct {
}

+k8s:deepcopy-gen=false

func (ServerSpecSimpleBackupCodec) Decode added in v0.5.0

func (ServerSpecSimpleBackupCodec) Encode added in v0.5.0

func (ServerSpecSimpleBackupCodec) IsEmpty added in v0.5.0

type ServerSpecStorageDevices

type ServerSpecStorageDevices struct {
	// The device address the storage will be attached to. Specify only the bus name (ide/scsi/virtio) to auto-select next available address from that bus.
	// +optional
	Address *string `json:"address,omitempty" tf:"address"`
	// A valid storage UUID
	Storage *string `json:"storage" tf:"storage"`
	// The device type the storage will be attached as
	// +optional
	Type *string `json:"type,omitempty" tf:"type"`
}

func (*ServerSpecStorageDevices) DeepCopy

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

func (*ServerSpecStorageDevices) DeepCopyInto

func (in *ServerSpecStorageDevices) DeepCopyInto(out *ServerSpecStorageDevices)

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

type ServerSpecTemplate

type ServerSpecTemplate struct {
	// The device address the storage will be attached to. Specify only the bus name (ide/scsi/virtio) to auto-select next available address from that bus.
	// +optional
	Address *string `json:"address,omitempty" tf:"address"`
	// The criteria to backup the storage
	// 		Please keep in mind that it's not possible to have a server with backup_rule attached to a server with simple_backup specified.
	// 		Such configurations will throw errors during execution.
	// 		Also, due to how UpCloud API works with simple backups and how Terraform orders the update operations,
	// 		it is advised to never switch between simple_backup on the server and individual storages backup_rules in one apply.
	// 		If you want to switch from using server simple backup to per-storage defined backup rules,
	// 		please first remove simple_backup block from a server, run 'terraform apply',
	// 		then add 'backup_rule' to desired storages and run 'terraform apply' again.
	// +optional
	BackupRule *ServerSpecTemplateBackupRule `json:"backupRule,omitempty" tf:"backup_rule"`
	// The unique identifier for the storage
	// +optional
	ID *string `json:"ID,omitempty" tf:"id"`
	// The size of the storage in gigabytes
	// +optional
	Size *int64 `json:"size,omitempty" tf:"size"`
	// A valid storage UUID or template name
	Storage *string `json:"storage" tf:"storage"`
	// The storage tier to use
	// +optional
	Tier *string `json:"tier,omitempty" tf:"tier"`
	// A short, informative description
	// +optional
	Title *string `json:"title,omitempty" tf:"title"`
}

func (*ServerSpecTemplate) DeepCopy

func (in *ServerSpecTemplate) DeepCopy() *ServerSpecTemplate

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

func (*ServerSpecTemplate) DeepCopyInto

func (in *ServerSpecTemplate) DeepCopyInto(out *ServerSpecTemplate)

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

type ServerSpecTemplateBackupRule

type ServerSpecTemplateBackupRule struct {
	// The weekday when the backup is created
	Interval *string `json:"interval" tf:"interval"`
	// The number of days before a backup is automatically deleted
	Retention *int64 `json:"retention" tf:"retention"`
	// The time of day when the backup is created
	Time *string `json:"time" tf:"time"`
}

func (*ServerSpecTemplateBackupRule) DeepCopy

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

func (*ServerSpecTemplateBackupRule) DeepCopyInto

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

type ServerSpecTemplateBackupRuleCodec

type ServerSpecTemplateBackupRuleCodec struct {
}

+k8s:deepcopy-gen=false

func (ServerSpecTemplateBackupRuleCodec) Decode

func (ServerSpecTemplateBackupRuleCodec) Encode

func (ServerSpecTemplateBackupRuleCodec) IsEmpty

type ServerSpecTemplateCodec

type ServerSpecTemplateCodec struct {
}

+k8s:deepcopy-gen=false

func (ServerSpecTemplateCodec) Decode

func (ServerSpecTemplateCodec) Encode

func (ServerSpecTemplateCodec) Encode(ptr unsafe.Pointer, stream *jsoniter.Stream)

func (ServerSpecTemplateCodec) IsEmpty

type ServerStatus

type ServerStatus struct {
	// Resource generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// +optional
	Phase status.Status `json:"phase,omitempty"`
	// +optional
	Conditions []kmapi.Condition `json:"conditions,omitempty"`
}

func (*ServerStatus) DeepCopy

func (in *ServerStatus) DeepCopy() *ServerStatus

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

func (*ServerStatus) DeepCopyInto

func (in *ServerStatus) DeepCopyInto(out *ServerStatus)

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