v1beta1

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: BSD-3-Clause Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GroupName    = "machine.appuio.io"
	GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
)

Functions

func RawExtensionFromProviderSpec

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

RawExtensionFromProviderSpec marshals the machine provider spec.

func RawExtensionFromProviderStatus

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

RawExtensionFromProviderStatus marshals the provider status

Types

type Address

type Address struct {
	// Address is an optional IP address to assign to the interface.
	Address string `json:"address"`
	// SubnetUUID is the UUID of the subnet to assign the address to.
	// Must be compatible with Interface.NetworkUUID if both are specified.
	SubnetUUID string `json:"subnetUUID"`
}

Address is an address to assign to a network interface.

func (*Address) DeepCopy

func (in *Address) DeepCopy() *Address

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

func (*Address) DeepCopyInto

func (in *Address) DeepCopyInto(out *Address)

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

type CloudscaleMachineProviderSpec

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

	// ObjectMeta is the standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// UserDataSecret is a reference to a secret that contains the UserData to apply to the instance.
	// The secret must contain a key named userData. The value is evaluated using Jsonnet; it can be either pure JSON or a Jsonnet template.
	// The Jsonnet template has access to the following variables:
	// - std.extVar('context').machine: the Machine object. The name can be accessed via std.extVar('context').machine.metadata.name for example.
	// - std.extVar('context').data: all keys from the UserDataSecret. For example, std.extVar('context').data.foo will access the value of the key foo.
	// - std.extVar('context').secrets: all secrets matching UserDataSecretSelector. For example, std.extVar('context').secrets[0].metadata.name will access the name of the first secret.
	// Also see UserDataSecretSelector.
	// +optional
	UserDataSecret *corev1.LocalObjectReference `json:"userDataSecret,omitempty"`
	// UserDataSecretSelector allows passing secrets with the matching selector into the user data Jsonnet context.
	// Only secrets in the same namespace as the controller are considered.
	// +optional
	// `null` means no secrets are passed.
	// And empty selector means all secrets in the namespace are passed.
	UserDataSecretSelector *metav1.LabelSelector `json:"userDataSecretSelector,omitempty"`

	// TokenSecret is a reference to the secret with the cloudscale API token.
	// The secret must contain a key named token.
	// If no token is provided, the operator will try to use the default token from CLOUDSCALE_API_TOKEN.
	// +optional
	TokenSecret *corev1.LocalObjectReference `json:"tokenSecret,omitempty"`

	// BaseDomain is the base domain to use for the machine.
	// +optional
	BaseDomain string `json:"baseDomain,omitempty"`
	// Zone is the zone in which the machine will be created.
	Zone string `json:"zone"`
	// AntiAffinityKey is a key to use for anti-affinity. If set, the machine will be placed in different cloudscale server groups based on this key.
	// The machines are automatically distributed across server groups with the same key.
	// +optional
	AntiAffinityKey string `json:"antiAffinityKey,omitempty"`
	// ServerGroups is a list of UUIDs identifying the server groups to which the new server will be added.
	// Used for anti-affinity.
	// https://www.cloudscale.ch/en/api/v1#server-groups
	ServerGroups []string `json:"serverGroups,omitempty"`
	// Tags is a map of tags to apply to the machine.
	Tags map[string]string `json:"tags"`
	// Flavor is the flavor of the machine.
	Flavor string `json:"flavor"`
	// Image is the base image to use for the machine.
	// For images provided by cloudscale: the image’s slug.
	// For custom images: the image’s slug prefixed with custom: (e.g. custom:ubuntu-foo), or its UUID.
	// If multiple custom images with the same slug exist, the newest custom image will be used.
	// https://www.cloudscale.ch/en/api/v1#images
	Image string `json:"image"`
	// RootVolumeSizeGB is the size of the root volume in GB.
	RootVolumeSizeGB int `json:"rootVolumeSizeGB"`
	// RootVolumeTags is a map of tags to apply to the root volume.
	RootVolumeTags map[string]string `json:"rootVolumeTags"`
	// SSHKeys is a list of SSH keys to add to the machine.
	SSHKeys []string `json:"sshKeys"`
	// UseIPV6 is a flag to enable IPv6 on the machine.
	// Defaults to true.
	UseIPV6 *bool `json:"useIPV6,omitempty"`
	// Interfaces is a list of network interfaces to add to the machine.
	Interfaces []Interface `json:"interfaces"`
}

CloudscaleMachineProviderSpec is the type that will be embedded in a Machine.Spec.ProviderSpec field for a cloudscale virtual machine. It is used by the cloudscale machine actuator to create a single Machine. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func ProviderSpecFromRawExtension

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

ProviderSpecFromRawExtension unmarshals the JSON-encoded spec

func (*CloudscaleMachineProviderSpec) DeepCopy

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

func (*CloudscaleMachineProviderSpec) DeepCopyInto

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

func (*CloudscaleMachineProviderSpec) DeepCopyObject

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

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

type CloudscaleMachineProviderStatus

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

	// InstanceID is the ID of the instance in Cloudscale.
	// +optional
	InstanceID string `json:"instanceId,omitempty"`
	// Status is the status of the instance in Cloudscale.
	// Can be "changing", "running" or "stopped".
	Status string `json:"status,omitempty"`
	// Conditions is a set of conditions associated with the Machine to indicate
	// errors or other status
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

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

func ProviderStatusFromRawExtension

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

ProviderStatusFromRawExtension unmarshals a raw extension into a GCPMachineProviderStatus type

func (*CloudscaleMachineProviderStatus) DeepCopy

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

func (*CloudscaleMachineProviderStatus) DeepCopyInto

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

type Interface

type Interface struct {
	// Type is the type of the interface. Required.
	Type InterfaceType `json:"type"`
	// NetworkUUID is the UUID of the network to attach the interface to.
	// Can only be set if type is private.
	// Must be compatible with Addresses.SubnetUUID if both are specified.
	NetworkUUID string `json:"networkUUID"`
	// Addresses is an optional list of addresses to assign to the interface.
	// Can only be set if type is private.
	Addresses []Address `json:"addresses"`
}

Interface is a network interface to add to a machine.

func (*Interface) DeepCopy

func (in *Interface) DeepCopy() *Interface

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

func (*Interface) DeepCopyInto

func (in *Interface) DeepCopyInto(out *Interface)

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

type InterfaceType

type InterfaceType string
const (
	// InterfaceTypePublic is a public network interface.
	InterfaceTypePublic InterfaceType = "Public"
	// InterfaceTypePrivate is a private network interface.
	InterfaceTypePrivate InterfaceType = "Private"
)

Jump to

Keyboard shortcuts

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