common_types

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudProvider

type CloudProvider string

+kubebuilder:validation:Enum=aws;do;azure;gcp

const (
	CloudProviderAWS          CloudProvider = "aws"
	CloudProviderDigitalOcean CloudProvider = "digitalocean"
	CloudProviderAzure        CloudProvider = "azure"
	CloudProviderGCP          CloudProvider = "gcp"
)

type ConfigMapRef

type ConfigMapRef struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
}

type ConfigRef

type ConfigRef struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace,omitempty"`
}

type CpuT

type CpuT struct {
	// +kubebuilder:validation:Pattern=[\d]+m$
	Min string `json:"min"`
	// +kubebuilder:validation:Pattern=[\d]+m$
	Max string `json:"max"`
}

func (*CpuT) DeepCopy

func (in *CpuT) DeepCopy() *CpuT

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

func (*CpuT) DeepCopyInto

func (in *CpuT) DeepCopyInto(out *CpuT)

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

type FsType

type FsType string
const (
	Ext4 FsType = "ext4"
	Xfs  FsType = "xfs"
)

type LocalObjectReference added in v1.1.0

type LocalObjectReference struct {
	// .metadata.name of the resource
	Name string `json:"name"`
}

type ManagedResourceOutput added in v1.1.0

type ManagedResourceOutput struct {
	// refers to a k8s secret that exists in the same namespace as managed resource
	CredentialsRef LocalObjectReference `json:"credentialsRef"`
}

type ManagedServiceOutput added in v1.1.0

type ManagedServiceOutput struct {
	// refers to a k8s secret that exists in the same namespace as managed service
	CredentialsRef LocalObjectReference `json:"credentialsRef"`
}

type MemoryT

type MemoryT struct {
	// +kubebuilder:validation:Pattern=[\d]+Mi$
	Min string `json:"min"`
	// +kubebuilder:validation:Pattern=[\d]+Mi$
	Max string `json:"max"`
}

type MinMaxFloat

type MinMaxFloat struct {
	// +kubebuilder:validation:Pattern="^[0-9]+([.][0-9]{1,2})?$"
	Min string `json:"min"`
	// +kubebuilder:validation:Pattern="^[0-9]+([.][0-9]{1,2})?$"
	Max string `json:"max"`
}

type MinMaxInt

type MinMaxInt struct {
	// +kubebuilder:validation:Minimum=0
	Min int `json:"min"`
	// +kubebuilder:validation:Minimum=0
	Max int `json:"max"`
}

type MsvcRef

type MsvcRef struct {
	metav1.TypeMeta `json:",inline"`
	Name            string `json:"name"`
	Namespace       string `json:"namespace"`
}

+kubebuilder:object:generate=true

func (*MsvcRef) DeepCopy added in v1.1.0

func (in *MsvcRef) DeepCopy() *MsvcRef

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

func (*MsvcRef) DeepCopyInto added in v1.1.0

func (in *MsvcRef) DeepCopyInto(out *MsvcRef)

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

type NamespacedResourceRef added in v1.1.0

type NamespacedResourceRef struct {
	// .metadata.name of the resource
	Name string `json:"name"`

	// .metadata.namespace of the resource
	Namespace string `json:"namespace"`
}

type NodeSelectorAndTolerations added in v1.1.0

type NodeSelectorAndTolerations struct {
	NodeSelector map[string]string   `json:"nodeSelector,omitempty"`
	Tolerations  []corev1.Toleration `json:"tolerations,omitempty"`
}

+kubebuilder:object:generate=true

func (*NodeSelectorAndTolerations) DeepCopy added in v1.1.0

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

func (*NodeSelectorAndTolerations) DeepCopyInto added in v1.1.0

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

type Output

type Output struct {
	SecretRef *SecretRef `json:"secretRef,omitempty"`
	ConfigRef *ConfigRef `json:"configRef,omitempty"`
}

func (*Output) DeepCopy

func (in *Output) DeepCopy() *Output

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

func (*Output) DeepCopyInto

func (in *Output) DeepCopyInto(out *Output)

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

type Resources

type Resources struct {
	Cpu    CpuT    `json:"cpu"`
	Memory MemoryT `json:"memory"`

	Storage *Storage `json:"storage,omitempty"`
}

func (*Resources) DeepCopy

func (in *Resources) DeepCopy() *Resources

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

func (*Resources) DeepCopyInto

func (in *Resources) DeepCopyInto(out *Resources)

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

type SecretKeyRef

type SecretKeyRef struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace,omitempty"`
	Key       string `json:"key"`
}

type SecretRef

type SecretRef struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace,omitempty"`
}

type Storage

type Storage struct {
	Size StorageSize `json:"size"`

	// +kubebuilder:validation:Optional
	StorageClass string `json:"storageClass,omitempty"`
}

type StorageSize added in v1.1.0

type StorageSize string

+kubebuilder:validation:Pattern=[\d]+(M|G)i$

func (StorageSize) ToInt added in v1.1.0

func (s StorageSize) ToInt() (int64, error)

Jump to

Keyboard shortcuts

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