v1alpha1

package
v0.0.0-...-b8df13e Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the vcluster v1alpha1 API group +kubebuilder:object:generate=true +groupName=vcluster.zacharyseguin.ca

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "vcluster.zacharyseguin.ca", Version: "v1alpha1"}

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

This section is empty.

Types

type VirtualCluster

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

	Spec   VirtualClusterSpec   `json:"spec"`
	Status VirtualClusterStatus `json:"status,omitempty"`
}

VirtualCluster is the Schema for the virtualclusters API

func (*VirtualCluster) DeepCopy

func (in *VirtualCluster) DeepCopy() *VirtualCluster

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

func (*VirtualCluster) DeepCopyInto

func (in *VirtualCluster) DeepCopyInto(out *VirtualCluster)

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

func (*VirtualCluster) DeepCopyObject

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

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

type VirtualClusterComponentSpec

type VirtualClusterComponentSpec struct {
	// The image of the virtual cluster container
	Image VirtualClusterImageSpec `json:"image,omitempty"`

	// Extra arguments provided to the virtual cluster
	// +optional
	ExtraArgs []string `json:"extraArgs,omitempty"`
}

VirtualClusterComponentSpec defines the desired state of a component of the Virtual Cluster

func (*VirtualClusterComponentSpec) DeepCopy

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

func (*VirtualClusterComponentSpec) DeepCopyInto

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

type VirtualClusterImageSpec

type VirtualClusterImageSpec struct {
	// The image repository
	Repository string `json:"repository,omitempty"`

	// The image tag
	Tag string `json:"tag,omitempty"`
}

func (*VirtualClusterImageSpec) DeepCopy

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

func (*VirtualClusterImageSpec) DeepCopyInto

func (in *VirtualClusterImageSpec) DeepCopyInto(out *VirtualClusterImageSpec)

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

func (VirtualClusterImageSpec) String

func (img VirtualClusterImageSpec) String() string

String returns the image spec as an image string

type VirtualClusterIngressSpec

type VirtualClusterIngressSpec struct {
	IngressClassName *string `json:"ingressClassName,omitempty"`
	Hostname         string  `json:"hostname"`
	TLSSecretName    *string `json:"tlsSecretName,omitempty"`
}

VirtualClusterIngressSpec defines the ingress specification for the virtual cluster

func (*VirtualClusterIngressSpec) DeepCopy

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

func (*VirtualClusterIngressSpec) DeepCopyInto

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

type VirtualClusterList

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

VirtualClusterList contains a list of VirtualCluster

func (*VirtualClusterList) DeepCopy

func (in *VirtualClusterList) DeepCopy() *VirtualClusterList

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

func (*VirtualClusterList) DeepCopyInto

func (in *VirtualClusterList) DeepCopyInto(out *VirtualClusterList)

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

func (*VirtualClusterList) DeepCopyObject

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

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

type VirtualClusterNodeSyncSpec

type VirtualClusterNodeSyncSpec struct {
	// Node sync strategy
	//
	// Note: If set to VirtualClusterNodeSyncStrategyRealLabelSelector,
	// then the SelectorLabels must be provided
	// +kubebuilder:validation:Enum=Fake;Real;RealAll;RealLabelSelector
	Strategy VirtualClusterNodeSyncStrategy `json:"strategy"`

	// SelectorLabels when strategy is set to VirtualClusterNodeSyncStrategyLabelSelector
	// +optional
	SelectorLabels map[string]string `json:"selectorLabels,omitempty"`

	// When using VirtualClusterNodeSyncStrategyRealLabelSelector, enforce the node
	// selector for scheduling of pods
	// +optional
	EnforceNodeSelector bool `json:"enforceNodeSelector,omitempty"`
}

VirtualClusterNodeSyncSpec defines how nodes are synced into the virtual cluster

func (*VirtualClusterNodeSyncSpec) DeepCopy

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

func (*VirtualClusterNodeSyncSpec) DeepCopyInto

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

type VirtualClusterNodeSyncStrategy

type VirtualClusterNodeSyncStrategy string
const (
	VirtualClusterNodeSyncStrategyFake              VirtualClusterNodeSyncStrategy = "Fake"
	VirtualClusterNodeSyncStrategyReal              VirtualClusterNodeSyncStrategy = "Real"
	VirtualClusterNodeSyncStrategyRealAll           VirtualClusterNodeSyncStrategy = "RealAll"
	VirtualClusterNodeSyncStrategyRealLabelSelector VirtualClusterNodeSyncStrategy = "RealLabelSelector"
)

type VirtualClusterPodSchedulingSpec

type VirtualClusterPodSchedulingSpec struct {
	// Enable the use of priority classes for pod scheduling
	// +optional
	EnablePriorityClasses bool `json:"enablePriorityClasses"`
}

VirtualClusterPodSchedulingSpec defines how pods are scheduled in the Virtual Cluster

func (*VirtualClusterPodSchedulingSpec) DeepCopy

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

func (*VirtualClusterPodSchedulingSpec) DeepCopyInto

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

type VirtualClusterSpec

type VirtualClusterSpec struct {
	// Defines the control plane specification
	// +kubebuilder:default={image:{repository:"rancher/k3s", tag:"latest"}}
	ControlPlane VirtualClusterComponentSpec `json:"controlPlane,omitempty"`

	// Defines the syncer specification
	// +kubebuilder:default={image:{repository:"loftsh/vcluster", tag:"latest"}}
	Syncer VirtualClusterComponentSpec `json:"syncer,omitempty"`

	// Define how nodes are synced into the virtual cluster
	//
	// Note: If using a strategy other than "VirtualClusterNodeSyncStrategyLabelSelector",
	// then a ClusterRole will be created.
	// +kubebuilder:default={strategy:"Fake"}
	NodeSync VirtualClusterNodeSyncSpec `json:"nodeSync,omitempty"`

	// Define how pods are scheduled within the virtual cluster
	// +optional
	PodScheduling VirtualClusterPodSchedulingSpec `json:"podScheduling,omitempty"`

	// Define storage configuration for the virtual cluster.
	// +optional
	Storage VirtualClusterStorageSpec `json:"storage,omitempty"`

	// Specify the ingress template for the cluster
	// +optional
	Ingress *VirtualClusterIngressSpec `json:"ingress,omitempty"`
}

VirtualClusterSpec defines the desired state of VirtualCluster

func (*VirtualClusterSpec) DeepCopy

func (in *VirtualClusterSpec) DeepCopy() *VirtualClusterSpec

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

func (*VirtualClusterSpec) DeepCopyInto

func (in *VirtualClusterSpec) DeepCopyInto(out *VirtualClusterSpec)

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

type VirtualClusterStatus

type VirtualClusterStatus struct {
}

VirtualClusterStatus defines the observed state of VirtualCluster

func (*VirtualClusterStatus) DeepCopy

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

func (*VirtualClusterStatus) DeepCopyInto

func (in *VirtualClusterStatus) DeepCopyInto(out *VirtualClusterStatus)

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

type VirtualClusterStorageSpec

type VirtualClusterStorageSpec struct {
	// Synchronize storage classes from the host cluster
	// +optional
	EnableStorageClasses bool `json:"enableStorageClasses"`

	// Synchronize persistent volumes from the host cluster to the virtual cluster
	// rather than creating fake persistent volumes
	// +optional
	SyncPersistentVolumes bool `json:"syncPersistentVolumes"`
}

func (*VirtualClusterStorageSpec) DeepCopy

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

func (*VirtualClusterStorageSpec) DeepCopyInto

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