v1alpha1

package
v0.0.0-...-4d19ac6 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the tenancy v1alpha1 API group +kubebuilder:object:generate=true +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=sigs.k8s.io/cluster-api-provider-nested/virtualcluster/pkg/apis/tenancy +k8s:defaulter-gen=TypeMeta +groupName=tenancy.x-k8s.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "tenancy.x-k8s.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}

	// AddToScheme is required by pkg/client/...
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource is required by pkg/client/listers/...

Types

type ClusterCondition

type ClusterCondition struct {
	// Cluster Condition Status
	// Can be True, False, Unknown.
	Status corev1.ConditionStatus `json:"status"`

	// Last time the condition transitioned from one status to another.
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`

	// Unique, one-word, CamelCase reason for the condition's last transition.
	// +optional
	Reason string `json:"reason,omitempty"`

	// Human-readable message indicating details about last transition.
	// +optional
	Message string `json:"message,omitempty"`
}

func (*ClusterCondition) DeepCopy

func (in *ClusterCondition) DeepCopy() *ClusterCondition

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

func (*ClusterCondition) DeepCopyInto

func (in *ClusterCondition) DeepCopyInto(out *ClusterCondition)

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

type ClusterPhase

type ClusterPhase string
const (
	// ClusterPending is when Cluster is processed by Operator, but not all components are ready
	ClusterPending ClusterPhase = "Pending"

	// ClusterRunning is when all components are ready
	ClusterRunning ClusterPhase = "Running"

	// ClusterUpdating when update cluster spec, phase will be updating
	ClusterUpdating ClusterPhase = "Updating"

	// ClusterError happens when Cluster can not be initiated, or occur the error that Operator
	// can not recover
	ClusterError ClusterPhase = "Error"
)

type ClusterVersion

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

	Spec   ClusterVersionSpec   `json:"spec,omitempty"`
	Status ClusterVersionStatus `json:"status,omitempty"`
}

ClusterVersion is the Schema for the clusterversions API +k8s:openapi-gen=true

func (*ClusterVersion) DeepCopy

func (in *ClusterVersion) DeepCopy() *ClusterVersion

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

func (*ClusterVersion) DeepCopyInto

func (in *ClusterVersion) DeepCopyInto(out *ClusterVersion)

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

func (*ClusterVersion) DeepCopyObject

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

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

func (*ClusterVersion) GetAPIServerDomain

func (cv *ClusterVersion) GetAPIServerDomain(namespace string) string

GetAPIServerDomain returns the dns of the apiserver service

TODO support NodePort and ClusterIP for accessing apiserver from outside the cluster

func (*ClusterVersion) GetEtcdDomain

func (cv *ClusterVersion) GetEtcdDomain() string

GetEtcdDomain returns the dns of etcd service, note that, though the complete etcd svc dns is {etcdSvcName}.{namespace}.svc.{clusterdomain}, this EtcdDomain is only used by apiserver that in the same namespace, so the etcdSvcName is adequate

func (*ClusterVersion) GetEtcdServers

func (cv *ClusterVersion) GetEtcdServers() (etcdServers []string)

GetEtcdServers returns the list of hostnames of etcd pods

type ClusterVersionList

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

ClusterVersionList contains a list of ClusterVersion

func (*ClusterVersionList) DeepCopy

func (in *ClusterVersionList) DeepCopy() *ClusterVersionList

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

func (*ClusterVersionList) DeepCopyInto

func (in *ClusterVersionList) DeepCopyInto(out *ClusterVersionList)

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

func (*ClusterVersionList) DeepCopyObject

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

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

type ClusterVersionSpec

type ClusterVersionSpec struct {
	// APIserver configuration of the virtual cluster
	APIServer *StatefulSetSvcBundle `json:"apiServer,omitempty"`

	// Controller-manager configuration of the virtual cluster
	ControllerManager *StatefulSetSvcBundle `json:"controllerManager,omitempty"`

	// ETCD configuration of the virtual cluster
	ETCD *StatefulSetSvcBundle `json:"etcd,omitempty"`
}

ClusterVersionSpec defines the desired state of ClusterVersion

func (*ClusterVersionSpec) DeepCopy

func (in *ClusterVersionSpec) DeepCopy() *ClusterVersionSpec

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

func (*ClusterVersionSpec) DeepCopyInto

func (in *ClusterVersionSpec) DeepCopyInto(out *ClusterVersionSpec)

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

type ClusterVersionStatus

type ClusterVersionStatus struct {
}

ClusterVersionStatus defines the observed state of ClusterVersion

func (*ClusterVersionStatus) DeepCopy

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

func (*ClusterVersionStatus) DeepCopyInto

func (in *ClusterVersionStatus) DeepCopyInto(out *ClusterVersionStatus)

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

type StatefulSetSvcBundle

type StatefulSetSvcBundle struct {
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// StatefulSet that manages the specified component
	// +kubebuilder:validation:XEmbeddedResource
	StatefulSet *appsv1.StatefulSet `json:"statefulset,omitempty"`

	// Service that exposes the StatefulSet
	// +kubebuilder:validation:XEmbeddedResource
	Service *corev1.Service `json:"service,omitempty"`
}

StatefulSetSvcBundle contains a StatefulSet and the Service that exposed the StatefulSet

func (*StatefulSetSvcBundle) DeepCopy

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

func (*StatefulSetSvcBundle) DeepCopyInto

func (in *StatefulSetSvcBundle) DeepCopyInto(out *StatefulSetSvcBundle)

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

type VirtualCluster

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

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

VirtualCluster is the Schema for the virtualclusters API +k8s:openapi-gen=true +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase" +kubebuilder:printcolumn:name="ClusterVersion",type="string",JSONPath=".spec.clusterVersionName" +kubebuilder:printcolumn:name="ClusterNamespace",type="string",JSONPath=".status.clusterNamespace",priority=1

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.

func (*VirtualCluster) SetupWebhookWithManager

func (vc *VirtualCluster) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*VirtualCluster) ValidateCreate

func (vc *VirtualCluster) ValidateCreate() error

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

func (*VirtualCluster) ValidateDelete

func (vc *VirtualCluster) ValidateDelete() error

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

func (*VirtualCluster) ValidateUpdate

func (vc *VirtualCluster) ValidateUpdate(old runtime.Object) error

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

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 VirtualClusterSpec

type VirtualClusterSpec struct {
	// ClusterDomain is the domain name of the virtual cluster
	// e.g. a pod dns will be
	// {some-pod}.{some-namespace}.svc.{ClusterDomain}
	// +optional
	ClusterDomain string `json:"clusterDomain,omitempty"`

	// The name of the desired cluster version
	ClusterVersionName string `json:"clusterVersionName"`

	// The valid period of the tenant cluster PKI, if not set
	// the PKI will never expire (i.e. 10 years)
	// +optional
	PKIExpireDays int64 `json:"pkiExpireDays,omitempty"`

	// The key prefix of labels or annotations that should be back populated to Virtual Cluster.
	// These meta data are generated by super control plane controllers, which are needed by
	// virtual cluster to interact with external systems.
	// +optional
	TransparentMetaPrefixes []string `json:"transparentMetaPrefixes,omitempty"`

	// The key prefix of labels or annotations that are not visible to Virtual Cluster but
	// are kept in super control plane. For example, the annotations added by syncer controller.
	// +optional
	OpaqueMetaPrefixes []string `json:"opaqueMetaPrefixes,omitempty"`

	// Service CIDRs used by VirtualCluster
	// +optional
	ServiceCidr string `json:"serviceCidr,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 {
	// cluster phase of the virtual cluster
	Phase ClusterPhase `json:"phase"`

	// ClusterNamespace defines the namespace where the control plane components
	// are deployed into.
	// +optional
	ClusterNamespace string `json:"clusterNamespace,omitempty"`

	// A human readable message indicating details about why the cluster is in
	// this condition.
	// +optional
	Message string `json:"message"`

	// A brief CamelCase message indicating details about why the cluster is in
	// this state.
	// e.g. 'Evicted'
	// +optional
	Reason string `json:"reason"`

	// Cluster Conditions
	Conditions []ClusterCondition `json:"conditions,omitempty"`
}

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.

Jump to

Keyboard shortcuts

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