v1alpha1

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 5 Imported by: 7

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API. +k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +groupName=networking.karmada.io

Index

Constants

View Source
const (
	// ResourceKindMultiClusterIngress is kind name of MultiClusterIngress.
	ResourceKindMultiClusterIngress = "MultiClusterIngress"
	// ResourceSingularMultiClusterIngress is singular name of MultiClusterIngress.
	ResourceSingularMultiClusterIngress = "multiclusteringress"
	// ResourcePluralMultiClusterIngress is plural name of MultiClusterIngress.
	ResourcePluralMultiClusterIngress = "multiclusteringresses"
	// ResourceNamespaceScopedMultiClusterIngress indicates if MultiClusterIngress is NamespaceScoped.
	ResourceNamespaceScopedMultiClusterIngress = true
)
View Source
const (
	// ResourceKindMultiClusterService is kind name of MultiClusterService.
	ResourceKindMultiClusterService = "MultiClusterService"
	// ResourceSingularMultiClusterService is singular name of MultiClusterService.
	ResourceSingularMultiClusterService = "multiclusterservice"
	// ResourcePluralMultiClusterService is plural name of MultiClusterService.
	ResourcePluralMultiClusterService = "multiclusterservices"
	// ResourceNamespaceScopedMultiClusterService indicates if MultiClusterService is NamespaceScoped.
	ResourceNamespaceScopedMultiClusterService = true
	// MCSServiceAppliedConditionType is indicates the condition type of mcs service applied.
	MCSServiceAppliedConditionType = "ServiceApplied"
	// EndpointSliceDispatched indicates whether the EndpointSlice is dispatched to consumption clusters
	EndpointSliceDispatched string = "EndpointSliceDispatched"
)
View Source
const (
	// MultiClusterServicePermanentIDLabel is the identifier of a MultiClusterService object.
	// Karmada generates a unique identifier, such as metadata.UUID, for each MultiClusterService object.
	// This identifier will be used as a label selector to locate corresponding work of service.
	// The reason for generating a new unique identifier instead of simply using metadata.UUID is because:
	// In backup scenarios, when applying the backup resource manifest in a new cluster, the UUID may change.
	MultiClusterServicePermanentIDLabel = "multiclusterservice.karmada.io/permanent-id"

	// MultiClusterServiceNameAnnotation is the name of a MultiClusterService object.
	// This annotation will be added to the resource template and ResourceBinding
	MultiClusterServiceNameAnnotation = "multiclusterservice.karmada.io/name"

	// MultiClusterServiceNamespaceAnnotation is the namespace of a MultiClusterService object.
	// This annotation will be added to the resource template and ResourceBinding
	MultiClusterServiceNamespaceAnnotation = "multiclusterservice.karmada.io/namespace"
)
View Source
const GroupName = "networking.karmada.io"

GroupName specifies the group name used to register the objects.

Variables

View Source
var (
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	// Depreciated: use Install instead
	AddToScheme = localSchemeBuilder.AddToScheme
	Install     = localSchemeBuilder.AddToScheme
)
View Source
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}

GroupVersion specifies the group and the version used to register the objects.

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type ClusterSelector added in v1.9.0

type ClusterSelector struct {
	// Name is the name of the cluster to be selected.
	// +required
	Name string `json:"name,omitempty"`
}

ClusterSelector specifies the cluster to be selected.

func (*ClusterSelector) DeepCopy added in v1.9.0

func (in *ClusterSelector) DeepCopy() *ClusterSelector

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

func (*ClusterSelector) DeepCopyInto added in v1.9.0

func (in *ClusterSelector) DeepCopyInto(out *ClusterSelector)

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

type ExposurePort added in v1.7.0

type ExposurePort struct {
	// Name is the name of the port that needs to be exposed within the service.
	// The port name must be the same as that defined in the service.
	// +optional
	Name string `json:"name,omitempty"`

	// Port specifies the exposed service port.
	// +required
	Port int32 `json:"port"`
}

ExposurePort describes which port will be exposed.

func (*ExposurePort) DeepCopy added in v1.7.0

func (in *ExposurePort) DeepCopy() *ExposurePort

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

func (*ExposurePort) DeepCopyInto added in v1.7.0

func (in *ExposurePort) DeepCopyInto(out *ExposurePort)

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

type ExposureRange added in v1.7.0

type ExposureRange struct {
	// ClusterNames is the list of clusters to be selected.
	// +optional
	ClusterNames []string `json:"clusterNames,omitempty"`
}

ExposureRange describes a list of clusters where the service is exposed. Now supports selecting cluster by name, leave the room for extend more methods such as using label selector.

func (*ExposureRange) DeepCopy added in v1.7.0

func (in *ExposureRange) DeepCopy() *ExposureRange

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

func (*ExposureRange) DeepCopyInto added in v1.7.0

func (in *ExposureRange) DeepCopyInto(out *ExposureRange)

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

type ExposureType added in v1.7.0

type ExposureType string

ExposureType describes how to expose the service.

const (
	// ExposureTypeCrossCluster means a service will be accessible across clusters.
	ExposureTypeCrossCluster ExposureType = "CrossCluster"

	// ExposureTypeLoadBalancer means a service will be exposed via an external
	// load balancer.
	ExposureTypeLoadBalancer ExposureType = "LoadBalancer"
)

type MultiClusterIngress

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

	// Spec is the desired state of the MultiClusterIngress.
	// +optional
	Spec networkingv1.IngressSpec `json:"spec,omitempty"`

	// Status is the current state of the MultiClusterIngress.
	// +optional
	Status MultiClusterIngressStatus `json:"status,omitempty"`
}

MultiClusterIngress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. The structure of MultiClusterIngress is same as Ingress, indicates the Ingress in multi-clusters.

func (*MultiClusterIngress) DeepCopy

func (in *MultiClusterIngress) DeepCopy() *MultiClusterIngress

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

func (*MultiClusterIngress) DeepCopyInto

func (in *MultiClusterIngress) DeepCopyInto(out *MultiClusterIngress)

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

func (*MultiClusterIngress) DeepCopyObject

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

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

type MultiClusterIngressList

type MultiClusterIngressList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	// Items is the list of MultiClusterIngress.
	Items []MultiClusterIngress `json:"items"`
}

MultiClusterIngressList is a collection of MultiClusterIngress.

func (*MultiClusterIngressList) DeepCopy

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

func (*MultiClusterIngressList) DeepCopyInto

func (in *MultiClusterIngressList) DeepCopyInto(out *MultiClusterIngressList)

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

func (*MultiClusterIngressList) DeepCopyObject

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

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

type MultiClusterIngressStatus added in v1.9.0

type MultiClusterIngressStatus struct {
	networkingv1.IngressStatus `json:",inline"`

	// TrafficBlockClusters records the cluster name list that needs to perform traffic block.
	// When the cloud provider implements its multicluster-cloud-provider and refreshes
	// the service backend address to the LoadBalancer Service, it needs to filter out
	// the backend addresses in these clusters.
	// +optional
	TrafficBlockClusters []string `json:"trafficBlockClusters,omitempty"`

	// ServiceLocations records the locations of MulticlusterIngress's backend
	// Service resources. It will be set by the system controller.
	// +optional
	ServiceLocations []ServiceLocation `json:"serviceLocations,omitempty"`
}

MultiClusterIngressStatus is the current state of the MultiClusterIngress.

func (*MultiClusterIngressStatus) DeepCopy added in v1.9.0

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

func (*MultiClusterIngressStatus) DeepCopyInto added in v1.9.0

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

type MultiClusterService added in v1.7.0

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

	// Spec is the desired state of the MultiClusterService.
	Spec MultiClusterServiceSpec `json:"spec"`

	// Status is the current state of the MultiClusterService.
	// +optional
	Status corev1.ServiceStatus `json:"status,omitempty"`
}

MultiClusterService is a named abstraction of multi-cluster software service. The name field of MultiClusterService is the same as that of Service name. Services with the same name in different clusters are regarded as the same service and are associated with the same MultiClusterService. MultiClusterService can control the exposure of services to outside multiple clusters, and also enable service discovery between clusters.

func (*MultiClusterService) DeepCopy added in v1.7.0

func (in *MultiClusterService) DeepCopy() *MultiClusterService

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

func (*MultiClusterService) DeepCopyInto added in v1.7.0

func (in *MultiClusterService) DeepCopyInto(out *MultiClusterService)

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

func (*MultiClusterService) DeepCopyObject added in v1.7.0

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

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

type MultiClusterServiceList added in v1.7.0

type MultiClusterServiceList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	// Items is the list of MultiClusterService.
	Items []MultiClusterService `json:"items"`
}

MultiClusterServiceList is a collection of MultiClusterService.

func (*MultiClusterServiceList) DeepCopy added in v1.7.0

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

func (*MultiClusterServiceList) DeepCopyInto added in v1.7.0

func (in *MultiClusterServiceList) DeepCopyInto(out *MultiClusterServiceList)

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

func (*MultiClusterServiceList) DeepCopyObject added in v1.7.0

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

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

type MultiClusterServiceSpec added in v1.7.0

type MultiClusterServiceSpec struct {
	// Types specifies how to expose the service referencing by this
	// MultiClusterService.
	// +required
	Types []ExposureType `json:"types"`

	// Ports is the list of ports that are exposed by this MultiClusterService.
	// No specified port will be filtered out during the service
	// exposure and discovery process.
	// All ports in the referencing service will be exposed by default.
	// +optional
	Ports []ExposurePort `json:"ports,omitempty"`

	// Range specifies the ranges where the referencing service should
	// be exposed.
	// Only valid and optional in case of Types contains CrossCluster.
	// If not set and Types contains CrossCluster, all clusters will
	// be selected, that means the referencing service will be exposed
	// across all registered clusters.
	// Deprecated: in favor of ProviderClusters/ConsumerClusters.
	// +optional
	Range ExposureRange `json:"range,omitempty"`

	// ServiceProvisionClusters specifies the clusters which will provision the service backend.
	// If leave it empty, we will collect the backend endpoints from all clusters and sync
	// them to the ServiceConsumptionClusters.
	// Deprecated: in favor of ProviderClusters/ConsumerClusters.
	// +optional
	ServiceProvisionClusters []string `json:"serviceProvisionClusters,omitempty"`

	// ServiceConsumptionClusters specifies the clusters where the service will be exposed, for clients.
	// If leave it empty, the service will be exposed to all clusters.
	// Deprecated: in favor of ProviderClusters/ConsumerClusters.
	// +optional
	ServiceConsumptionClusters []string `json:"serviceConsumptionClusters,omitempty"`

	// ProviderClusters specifies the clusters which will provide the service backend.
	// If leave it empty, we will collect the backend endpoints from all clusters and sync
	// them to the ConsumerClusters.
	// +optional
	ProviderClusters []ClusterSelector `json:"providerClusters,omitempty"`

	// ConsumerClusters specifies the clusters where the service will be exposed, for clients.
	// If leave it empty, the service will be exposed to all clusters.
	// +optional
	ConsumerClusters []ClusterSelector `json:"consumerClusters,omitempty"`
}

MultiClusterServiceSpec is the desired state of the MultiClusterService.

func (*MultiClusterServiceSpec) DeepCopy added in v1.7.0

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

func (*MultiClusterServiceSpec) DeepCopyInto added in v1.7.0

func (in *MultiClusterServiceSpec) DeepCopyInto(out *MultiClusterServiceSpec)

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

type ServiceLocation added in v1.9.0

type ServiceLocation struct {
	// name is the referenced service. The service must exist in
	// the same namespace as the MultiClusterService object.
	Name string `json:"name"`

	// Clusters records the cluster list where the Service is located.
	// +optional
	Clusters []string `json:"clusters,omitempty"`
}

ServiceLocation records the locations of MulticlusterIngress's backend Service resources.

func (*ServiceLocation) DeepCopy added in v1.9.0

func (in *ServiceLocation) DeepCopy() *ServiceLocation

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

func (*ServiceLocation) DeepCopyInto added in v1.9.0

func (in *ServiceLocation) DeepCopyInto(out *ServiceLocation)

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