v1alpha1

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 4 Imported by: 6

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the discovery v1alpha1 API group

Package v1alpha1 contains API Schema definitions for the discovery v1alpha1 API group +kubebuilder:object:generate=true +groupName=discovery.liqo.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "discovery.liqo.io", 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

	// ForeignClusterResource is the resource name used to register the ForeignCluster CRD.
	ForeignClusterResource = "foreignclusters"

	// ForeignClusterGroupVersionResource is the group version resource used to register the ForeignCluster CRD.
	ForeignClusterGroupVersionResource = GroupVersion.WithResource(ForeignClusterResource)

	// ForeignClusterGroupResource is the group resource used to register the ForeignCluster CRD.
	ForeignClusterGroupResource = schema.GroupResource{Group: GroupVersion.Group, Resource: ForeignClusterResource}

	// ResourceRequestResource is the resource name used to register the ResourceRequest CRD.
	ResourceRequestResource = "resourcerequests"

	// ResourceRequestGroupVersionResource is the group version resource used to register ResourceRequest CRD.
	ResourceRequestGroupVersionResource = GroupVersion.WithResource(ResourceRequestResource)

	// ResourceRequestGroupResource is the group resource used to register ResourceRequest CRD.
	ResourceRequestGroupResource = schema.GroupResource{Group: GroupVersion.Group, Resource: ResourceRequestResource}
)

Functions

This section is empty.

Types

type ClusterIdentity

type ClusterIdentity struct {
	// Foreign Cluster ID, this is a unique identifier of that cluster.
	ClusterID string `json:"clusterID"`
	// Foreign Cluster Name to be shown in GUIs.
	ClusterName string `json:"clusterName"`
}

ClusterIdentity contains the information about a remote cluster (ID and Name).

func (*ClusterIdentity) DeepCopy

func (in *ClusterIdentity) DeepCopy() *ClusterIdentity

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

func (*ClusterIdentity) DeepCopyInto

func (in *ClusterIdentity) DeepCopyInto(out *ClusterIdentity)

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

func (ClusterIdentity) String added in v0.4.0

func (i ClusterIdentity) String() string

String returns the ClusterName. It makes it possible to format ClusterIdentities with %s.

type ForeignCluster

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

	Spec   ForeignClusterSpec   `json:"spec,omitempty"`
	Status ForeignClusterStatus `json:"status,omitempty"`
}

ForeignCluster is the Schema for the foreignclusters API. +kubebuilder:printcolumn:name="Type",type=string,JSONPath=`.spec.peeringType` +kubebuilder:printcolumn:name="ClusterID",type=string,priority=1,JSONPath=`.spec.clusterIdentity.clusterID` +kubebuilder:printcolumn:name="ClusterName",type=string,priority=1,JSONPath=`.spec.clusterIdentity.clusterName` +kubebuilder:printcolumn:name="Outgoing peering",type=string,JSONPath=`.status.peeringConditions[?(@.type == 'OutgoingPeering')].status` +kubebuilder:printcolumn:name="Incoming peering",type=string,JSONPath=`.status.peeringConditions[?(@.type == 'IncomingPeering')].status` +kubebuilder:printcolumn:name="Networking",type=string,JSONPath=`.status.peeringConditions[?(@.type == 'NetworkStatus')].status` +kubebuilder:printcolumn:name="API Server",type=string,priority=1,JSONPath=`.status.peeringConditions[?(@.type == 'APIServerStatus')].status` +kubebuilder:printcolumn:name="Authentication",type=string,JSONPath=`.status.peeringConditions[?(@.type == 'AuthenticationStatus')].status` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`

func (*ForeignCluster) DeepCopy

func (in *ForeignCluster) DeepCopy() *ForeignCluster

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

func (*ForeignCluster) DeepCopyInto

func (in *ForeignCluster) DeepCopyInto(out *ForeignCluster)

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

func (*ForeignCluster) DeepCopyObject

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

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

type ForeignClusterList

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

ForeignClusterList contains a list of ForeignCluster.

func (*ForeignClusterList) DeepCopy

func (in *ForeignClusterList) DeepCopy() *ForeignClusterList

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

func (*ForeignClusterList) DeepCopyInto

func (in *ForeignClusterList) DeepCopyInto(out *ForeignClusterList)

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

func (*ForeignClusterList) DeepCopyObject

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

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

type ForeignClusterSpec

type ForeignClusterSpec struct {
	// The type of peering to be established.
	// +kubebuilder:validation:Enum="OutOfBand";"InBand"
	// +kubebuilder:default="OutOfBand"
	// +kubebuilder:validation:Optional
	PeeringType PeeringType `json:"peeringType,omitempty"`

	// Foreign Cluster Identity.
	ClusterIdentity ClusterIdentity `json:"clusterIdentity,omitempty"`
	// Enable the peering process to the remote cluster.
	// +kubebuilder:validation:Enum="Auto";"No";"Yes"
	// +kubebuilder:default="Auto"
	// +kubebuilder:validation:Optional
	OutgoingPeeringEnabled PeeringEnabledType `json:"outgoingPeeringEnabled"`
	// Allow the remote cluster to establish a peering with our cluster.
	// +kubebuilder:validation:Enum="Auto";"No";"Yes"
	// +kubebuilder:default="Auto"
	// +kubebuilder:validation:Optional
	IncomingPeeringEnabled PeeringEnabledType `json:"incomingPeeringEnabled"`
	// URL where to contact foreign Auth service.
	// +kubebuilder:validation:Pattern=`https:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)`
	ForeignAuthURL string `json:"foreignAuthUrl"`
	// URL where to contact foreign proxy for the api server. This URL is used when
	// creating the k8s clients toward the remote cluster.
	ForeignProxyURL string `json:"foreignProxyUrl,omitempty"`
	// Indicates if the local cluster has to skip the tls verification over the remote Authentication Service or not.
	// +kubebuilder:default=true
	// +kubebuilder:validation:Optional
	InsecureSkipTLSVerify *bool `json:"insecureSkipTLSVerify"`
	// If discoveryType is LAN, this indicates the number of seconds after that
	// this ForeignCluster will be removed if no updates have been received.
	// +kubebuilder:validation:Minimum=0
	TTL int `json:"ttl,omitempty"`
}

ForeignClusterSpec defines the desired state of ForeignCluster.

func (*ForeignClusterSpec) DeepCopy

func (in *ForeignClusterSpec) DeepCopy() *ForeignClusterSpec

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

func (*ForeignClusterSpec) DeepCopyInto

func (in *ForeignClusterSpec) DeepCopyInto(out *ForeignClusterSpec)

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

type ForeignClusterStatus

type ForeignClusterStatus struct {

	// TenantNamespace names in the peered clusters
	// +kubebuilder:validation:Optional
	TenantNamespace TenantNamespaceType `json:"tenantNamespace"`

	// PeeringConditions contains the conditions about the peering related to this
	// ForeignCluster.
	PeeringConditions []PeeringCondition `json:"peeringConditions,omitempty"`
}

ForeignClusterStatus defines the observed state of ForeignCluster.

func (*ForeignClusterStatus) DeepCopy

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

func (*ForeignClusterStatus) DeepCopyInto

func (in *ForeignClusterStatus) DeepCopyInto(out *ForeignClusterStatus)

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

type OfferStateType added in v0.3.0

type OfferStateType string

OfferStateType defines the state of the child ResourceOffer resource.

const (
	// OfferStateCreated indicates that the child ResourceOffer resource has been created.
	OfferStateCreated OfferStateType = "Created"
	// OfferStateNone indicates that the child ResourceOffer resource has not been created.
	OfferStateNone OfferStateType = "None"
)

type PeeringCondition added in v0.3.0

type PeeringCondition struct {
	// Type of the peering condition.
	// +kubebuilder:validation:Enum="OutgoingPeering";"IncomingPeering";"NetworkStatus";"APIServerStatus";"AuthenticationStatus";"ProcessForeignClusterStatus"
	Type PeeringConditionType `json:"type"`
	// Status of the condition.
	// +kubebuilder:validation:Enum="None";"Pending";"Established";"Disconnecting";"Denied";"EmptyDenied";"Error";"Success";"External"
	// +kubebuilder:default="None"
	Status PeeringConditionStatusType `json:"status"`
	// LastTransitionTime -> timestamp for when the condition last transitioned from one status to another.
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
	// Reason -> Machine-readable, UpperCamelCase text indicating the reason for the condition's last transition.
	Reason string `json:"reason,omitempty"`
	// Message -> Human-readable message indicating details about the last status transition.
	Message string `json:"message,omitempty"`
}

PeeringCondition contains details about state of the peering.

func (*PeeringCondition) DeepCopy added in v0.3.0

func (in *PeeringCondition) DeepCopy() *PeeringCondition

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

func (*PeeringCondition) DeepCopyInto added in v0.3.0

func (in *PeeringCondition) DeepCopyInto(out *PeeringCondition)

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

type PeeringConditionStatusType added in v0.3.0

type PeeringConditionStatusType string

PeeringConditionStatusType indicates the phase of a peering with a remote cluster.

const (
	// PeeringConditionStatusNone indicates that there is no peering.
	PeeringConditionStatusNone PeeringConditionStatusType = "None"
	// PeeringConditionStatusPending indicates that the peering is pending,
	// and we are either waiting for the remote cluster feedback or for us to accept the ResourceOffer.
	PeeringConditionStatusPending PeeringConditionStatusType = "Pending"
	// PeeringConditionStatusEstablished indicates that the peering has been established.
	PeeringConditionStatusEstablished PeeringConditionStatusType = "Established"
	// PeeringConditionStatusDisconnecting indicates that the peering is being deleted.
	PeeringConditionStatusDisconnecting PeeringConditionStatusType = "Disconnecting"
	// PeeringConditionStatusDenied indicates that the condition has been denied.
	// This is only used by the AuthenticationCondition Type, and indicates that
	// the authentication has been denied even if we provided a token.
	PeeringConditionStatusDenied PeeringConditionStatusType = "Denied"
	// PeeringConditionStatusEmptyDenied indicates that the condition has been denied.
	// This is only used by the AuthenticationCondition Type, and indicates that
	// the identity verification was denied with an empty token.
	PeeringConditionStatusEmptyDenied PeeringConditionStatusType = "EmptyDenied"
	// PeeringConditionStatusError indicates that an error has occurred.
	PeeringConditionStatusError PeeringConditionStatusType = "Error"
	// PeeringConditionStatusSuccess indicates that the condition is successful.
	PeeringConditionStatusSuccess PeeringConditionStatusType = "Success"
	// PeeringConditionStatusExternal indicates that the condition is managed by an external component.
	PeeringConditionStatusExternal PeeringConditionStatusType = "External"
)

type PeeringConditionType added in v0.3.0

type PeeringConditionType string

PeeringConditionType represents different conditions that a peering could assume.

const (
	// OutgoingPeeringCondition informs users about the outgoing peering status.
	OutgoingPeeringCondition PeeringConditionType = "OutgoingPeering"
	// IncomingPeeringCondition informs users about the incoming peering status.
	IncomingPeeringCondition PeeringConditionType = "IncomingPeering"
	// NetworkStatusCondition informs users about the network status.
	NetworkStatusCondition PeeringConditionType = "NetworkStatus"
	// APIServerStatusCondition informs users about the foreign API server status.
	APIServerStatusCondition PeeringConditionType = "APIServerStatus"
	// AuthenticationStatusCondition informs users about the Authentication status.
	AuthenticationStatusCondition PeeringConditionType = "AuthenticationStatus"
	// ProcessForeignClusterStatusCondition informs users whether the Foreign Cluster is processable.
	ProcessForeignClusterStatusCondition PeeringConditionType = "ProcessForeignClusterStatus"
)

These are valid conditions of a peering.

type PeeringEnabledType added in v0.3.0

type PeeringEnabledType string

PeeringEnabledType indicates the desired state for the peering with this remote cluster.

const (
	// PeeringEnabledAuto indicates to use the default settings for the discovery method.
	// This is useful to track that the user did not set the peering state for that cluster,
	// if the peering is Auto liqo will use the default for that discovery method:
	// manual -> No.
	// incomingPeering -> No.
	// LAN -> Yes.
	PeeringEnabledAuto PeeringEnabledType = "Auto"
	// PeeringEnabledNo indicates to disable the peering with this remote cluster.
	PeeringEnabledNo PeeringEnabledType = "No"
	// PeeringEnabledYes indicates to enable the peering with this remote cluster.
	PeeringEnabledYes PeeringEnabledType = "Yes"
)

type PeeringType added in v0.6.0

type PeeringType string

PeeringType defines the type of peering to be established.

const (
	// PeeringTypeOutOfBand represents an out-of-band control-plane peering
	// (i.e., control plane traffic flows outside the network fabric).
	PeeringTypeOutOfBand PeeringType = "OutOfBand"
	// PeeringTypeInBand represents an in-band control-plane peering.
	// (i.e., control plane traffic flows inside the network fabric).
	PeeringTypeInBand PeeringType = "InBand"
	// PeeringTypeUnknown represents the empty value for the peering type.
	PeeringTypeUnknown PeeringType = ""
)

type ResourceRequest

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

	Spec   ResourceRequestSpec   `json:"spec,omitempty"`
	Status ResourceRequestStatus `json:"status,omitempty"`
}

ResourceRequest is the Schema for the ResourceRequests API. +kubebuilder:printcolumn:name="Local",type=string,JSONPath=`.metadata.labels.liqo\.io/replication` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`

func (*ResourceRequest) DeepCopy

func (in *ResourceRequest) DeepCopy() *ResourceRequest

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

func (*ResourceRequest) DeepCopyInto

func (in *ResourceRequest) DeepCopyInto(out *ResourceRequest)

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

func (*ResourceRequest) DeepCopyObject

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

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

type ResourceRequestList

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

ResourceRequestList contains a list of ResourceRequest.

func (*ResourceRequestList) DeepCopy

func (in *ResourceRequestList) DeepCopy() *ResourceRequestList

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

func (*ResourceRequestList) DeepCopyInto

func (in *ResourceRequestList) DeepCopyInto(out *ResourceRequestList)

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

func (*ResourceRequestList) DeepCopyObject

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

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

type ResourceRequestSpec

type ResourceRequestSpec struct {

	// Foreign Cluster Identity
	ClusterIdentity ClusterIdentity `json:"clusterIdentity"`
	// Local auth service address
	AuthURL string `json:"authUrl"`
	// WithdrawalTimestamp is set when a graceful deletion is requested by the user.
	WithdrawalTimestamp *metav1.Time `json:"withdrawalTimestamp,omitempty"`
}

ResourceRequestSpec defines the desired state of ResourceRequest.

func (*ResourceRequestSpec) DeepCopy

func (in *ResourceRequestSpec) DeepCopy() *ResourceRequestSpec

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

func (*ResourceRequestSpec) DeepCopyInto

func (in *ResourceRequestSpec) DeepCopyInto(out *ResourceRequestSpec)

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

type ResourceRequestStatus

type ResourceRequestStatus struct {
	// OfferWithdrawalTimestamp is the withdrawal timestamp of the child ResourceOffer resource.
	OfferWithdrawalTimestamp *metav1.Time `json:"offerWithdrawalTimestamp,omitempty"`
	// +kubebuilder:validation:Enum="None";"Created"
	// +kubebuilder:default="None"
	OfferState OfferStateType `json:"offerState"`
}

ResourceRequestStatus defines the observed state of ResourceRequest.

func (*ResourceRequestStatus) DeepCopy

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

func (*ResourceRequestStatus) DeepCopyInto

func (in *ResourceRequestStatus) DeepCopyInto(out *ResourceRequestStatus)

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

type TenantNamespaceType added in v0.3.0

type TenantNamespaceType struct {
	// local TenantNamespace name
	Local string `json:"local,omitempty"`
	// remote TenantNamespace name
	Remote string `json:"remote,omitempty"`
}

TenantNamespaceType contains the names of the local and the remote namespaces assigned to the pair of clusters.

func (*TenantNamespaceType) DeepCopy added in v0.3.0

func (in *TenantNamespaceType) DeepCopy() *TenantNamespaceType

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

func (*TenantNamespaceType) DeepCopyInto added in v0.3.0

func (in *TenantNamespaceType) DeepCopyInto(out *TenantNamespaceType)

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