v1alpha1

package
v1.2.5-alpha.4 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API.

Package v1alpha1 contains API Schema definitions for the flomesh.io v1alpha1 API group

Index

Constants

This section is empty.

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register API objects in the policy.flomesh.io v1alpha1 API group
	SchemeGroupVersion = schema.GroupVersion{
		Group:   "connector.flomesh.io",
		Version: "v1alpha1",
	}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)

	// AddToScheme adds all Resources to the Scheme
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type AddrSelector

type AddrSelector string

+kubebuilder:validation:Enum=ExternalIP;ClusterIP

const (
	ExternalIP AddrSelector = "ExternalIP"
	ClusterIP  AddrSelector = "ClusterIP"
)

type C2KGateway added in v1.2.4

type C2KGateway struct {
	// +kubebuilder:default=false
	// +optional
	Enable bool `json:"enable,omitempty"`

	// +kubebuilder:default=true
	// +optional
	MultiGateways bool `json:"multiGateways,omitempty"`
}

func (*C2KGateway) DeepCopy added in v1.2.4

func (in *C2KGateway) DeepCopy() *C2KGateway

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

func (*C2KGateway) DeepCopyInto added in v1.2.4

func (in *C2KGateway) DeepCopyInto(out *C2KGateway)

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

type Connector

type Connector interface {
	runtime.Object
	metav1.Object
	GetProvider() DiscoveryServiceProvider
	GetReplicas() *int32
	GetResources() *corev1.ResourceRequirements
}

type ConsulAuthSpec

type ConsulAuthSpec struct {
	// +kubebuilder:default=""
	// +optional
	Username string `json:"username,omitempty"`

	// +kubebuilder:default=""
	// +optional
	Password string `json:"password,omitempty"`
}

ConsulAuthSpec is the type used to represent the Consul auth specification.

func (*ConsulAuthSpec) DeepCopy

func (in *ConsulAuthSpec) DeepCopy() *ConsulAuthSpec

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

func (*ConsulAuthSpec) DeepCopyInto

func (in *ConsulAuthSpec) DeepCopyInto(out *ConsulAuthSpec)

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

type ConsulConnector

type ConsulConnector struct {
	// Object's type metadata
	metav1.TypeMeta `json:",inline"`

	// Object's metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec is the Consul Connector specification
	Spec ConsulSpec `json:"spec"`

	// Status is the status of the Consul Connector configuration.
	// +optional
	Status ConsulStatus `json:"status,omitempty"`
}

ConsulConnector is the type used to represent a Consul Connector resource.

func (*ConsulConnector) DeepCopy

func (in *ConsulConnector) DeepCopy() *ConsulConnector

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

func (*ConsulConnector) DeepCopyInto

func (in *ConsulConnector) DeepCopyInto(out *ConsulConnector)

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

func (*ConsulConnector) DeepCopyObject

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

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

func (*ConsulConnector) GetProvider

func (c *ConsulConnector) GetProvider() DiscoveryServiceProvider

func (*ConsulConnector) GetReplicas added in v1.2.2

func (c *ConsulConnector) GetReplicas() *int32

func (*ConsulConnector) GetResources added in v1.2.2

func (c *ConsulConnector) GetResources() *corev1.ResourceRequirements

type ConsulConnectorList

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

	Items []ConsulConnector `json:"items"`
}

ConsulConnectorList contains a list of Consul Connectors.

func (*ConsulConnectorList) DeepCopy

func (in *ConsulConnectorList) DeepCopy() *ConsulConnectorList

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

func (*ConsulConnectorList) DeepCopyInto

func (in *ConsulConnectorList) DeepCopyInto(out *ConsulConnectorList)

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

func (*ConsulConnectorList) DeepCopyObject

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

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

type ConsulSpec

type ConsulSpec struct {
	HTTPAddr        string `json:"httpAddr"`
	DeriveNamespace string `json:"deriveNamespace"`

	// +kubebuilder:default=false
	// +optional
	AsInternalServices bool `json:"asInternalServices,omitempty"`

	// +kubebuilder:default={}
	// +optional
	Auth NacosAuthSpec `json:"auth,omitempty"`

	// +kubebuilder:validation:Format="duration"
	// +kubebuilder:default="5s"
	// +optional
	SyncPeriod  metav1.Duration       `json:"syncPeriod"`
	SyncToK8S   ConsulSyncToK8SSpec   `json:"syncToK8S"`
	SyncFromK8S ConsulSyncFromK8SSpec `json:"syncFromK8S"`

	// +kubebuilder:default={limit:500, burst:750}
	// +optional
	Limiter *Limiter `json:"limiter,omitempty"`

	// Compute Resources required by connector container.
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

	// +kubebuilder:default=1
	// +kubebuilder:validation:Minimum=1
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`
}

ConsulSpec is the type used to represent the Consul Connector specification.

func (*ConsulSpec) DeepCopy

func (in *ConsulSpec) DeepCopy() *ConsulSpec

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

func (*ConsulSpec) DeepCopyInto

func (in *ConsulSpec) DeepCopyInto(out *ConsulSpec)

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

type ConsulStatus

type ConsulStatus struct {
	// CurrentStatus defines the current status of a Consul Connector resource.
	// +optional
	CurrentStatus string `json:"currentStatus,omitempty"`

	// Reason defines the reason for the current status of a Consul Connector resource.
	// +optional
	Reason string `json:"reason,omitempty"`

	ToK8SServiceCnt int `json:"toK8SServiceCnt"`

	FromK8SServiceCnt int `json:"fromK8SServiceCnt"`
}

ConsulStatus is the type used to represent the status of a Consul Connector resource.

func (*ConsulStatus) DeepCopy

func (in *ConsulStatus) DeepCopy() *ConsulStatus

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

func (*ConsulStatus) DeepCopyInto

func (in *ConsulStatus) DeepCopyInto(out *ConsulStatus)

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

type ConsulSyncFromK8SSpec

type ConsulSyncFromK8SSpec struct {
	Enable bool `json:"enable"`

	// +kubebuilder:default=true
	// +optional
	DefaultSync bool `json:"defaultSync,omitempty"`

	// +kubebuilder:default=true
	// +optional
	SyncClusterIPServices bool `json:"syncClusterIPServices,omitempty"`

	// +kubebuilder:default=false
	// +optional
	SyncLoadBalancerEndpoints bool `json:"syncLoadBalancerEndpoints,omitempty"`

	// +kubebuilder:default=ExternalOnly
	// +optional
	NodePortSyncType NodePortSyncType `json:"nodePortSyncType"`

	// +kubebuilder:default=false
	// +optional
	SyncIngress bool `json:"syncIngress,omitempty"`

	// +kubebuilder:default=false
	// +optional
	SyncIngressLoadBalancerIPs bool `json:"syncIngressLoadBalancerIPs,omitempty"`

	// +kubebuilder:default=""
	// +optional
	AddServicePrefix string `json:"addServicePrefix,omitempty"`

	// +kubebuilder:default=false
	// +optional
	AddK8SNamespaceAsServiceSuffix bool `json:"addK8SNamespaceAsServiceSuffix,omitempty"`

	// +optional
	AppendTags []string `json:"appendTags,omitempty"`

	// +optional
	AppendMetadatas []Metadata `json:"appendMetadatas,omitempty"`

	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:default={"*"}
	// +optional
	AllowK8sNamespaces []string `json:"allowK8sNamespaces,omitempty"`

	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:default={""}
	// +optional
	DenyK8sNamespaces []string `json:"denyK8sNamespaces,omitempty"`

	// +kubebuilder:default={enable: false, gatewayMode: forward}
	// +optional
	WithGateway K2CGateway `json:"withGateway,omitempty"`

	// +optional
	ConsulNodeName string `json:"consulNodeName,omitempty"`

	// +kubebuilder:default=false
	// +optional
	ConsulEnableNamespaces bool `json:"consulEnableNamespaces,omitempty"`

	// +kubebuilder:default=default
	// +optional
	ConsulDestinationNamespace string `json:"consulDestinationNamespace,omitempty"`

	// +kubebuilder:default=false
	// +optional
	ConsulEnableK8SNSMirroring bool `json:"consulEnableK8SNSMirroring,omitempty"`

	// +kubebuilder:default=""
	// +optional
	ConsulK8SNSMirroringPrefix string `json:"consulK8SNSMirroringPrefix,omitempty"`

	// +kubebuilder:default=""
	// +optional
	ConsulCrossNamespaceACLPolicy string `json:"consulCrossNamespaceACLPolicy,omitempty"`
}

ConsulSyncFromK8SSpec is the type used to represent the sync from K8S to Consul specification.

func (*ConsulSyncFromK8SSpec) DeepCopy

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

func (*ConsulSyncFromK8SSpec) DeepCopyInto

func (in *ConsulSyncFromK8SSpec) DeepCopyInto(out *ConsulSyncFromK8SSpec)

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

type ConsulSyncToK8SSpec

type ConsulSyncToK8SSpec struct {
	Enable bool `json:"enable"`

	// +kubebuilder:default=""
	// +optional
	ClusterId string `json:"clusterId,omitempty"`

	// +kubebuilder:default=true
	// +optional
	PassingOnly bool `json:"passingOnly,omitempty"`

	// +optional
	FilterTag string `json:"filterTag,omitempty"`

	// +optional
	PrefixTag string `json:"prefixTag,omitempty"`

	// +optional
	SuffixTag string `json:"suffixTag,omitempty"`

	// +optional
	FilterMetadatas []Metadata `json:"filterMetadatas,omitempty"`

	// +optional
	PrefixMetadata string `json:"prefixMetadata,omitempty"`

	// +optional
	SuffixMetadata string `json:"suffixMetadata,omitempty"`

	// +kubebuilder:default={enable: false, multiGateways: true}
	// +optional
	WithGateway C2KGateway `json:"withGateway,omitempty"`
}

ConsulSyncToK8SSpec is the type used to represent the sync from Consul to K8S specification.

func (*ConsulSyncToK8SSpec) DeepCopy

func (in *ConsulSyncToK8SSpec) DeepCopy() *ConsulSyncToK8SSpec

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

func (*ConsulSyncToK8SSpec) DeepCopyInto

func (in *ConsulSyncToK8SSpec) DeepCopyInto(out *ConsulSyncToK8SSpec)

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

type DiscoveryServiceProvider

type DiscoveryServiceProvider string
const (
	//ConsulDiscoveryService defines consul discovery service name
	ConsulDiscoveryService DiscoveryServiceProvider = "consul"

	//EurekaDiscoveryService defines eureka discovery service name
	EurekaDiscoveryService DiscoveryServiceProvider = "eureka"

	//NacosDiscoveryService defines nacos discovery service name
	NacosDiscoveryService DiscoveryServiceProvider = "nacos"

	//MachineDiscoveryService defines machine discovery service name
	MachineDiscoveryService DiscoveryServiceProvider = "machine"

	//GatewayDiscoveryService defines gateway integrated service name
	GatewayDiscoveryService DiscoveryServiceProvider = "gateway"
)

type EgressSelectorSpec

type EgressSelectorSpec struct {
	// +kubebuilder:default=ClusterIP
	// +optional
	IPSelector AddrSelector `json:"ipSelector,omitempty"`

	// +kubebuilder:default=10090
	// +optional
	HTTPPort int32 `json:"httpPort,omitempty"`

	// +optional
	GRPCPort int32 `json:"grpcPort,omitempty"`
}

EgressSelectorSpec is the type used to represent the egress selector specification.

func (*EgressSelectorSpec) DeepCopy

func (in *EgressSelectorSpec) DeepCopy() *EgressSelectorSpec

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

func (*EgressSelectorSpec) DeepCopyInto

func (in *EgressSelectorSpec) DeepCopyInto(out *EgressSelectorSpec)

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

type EurekaConnector

type EurekaConnector struct {
	// Object's type metadata
	metav1.TypeMeta `json:",inline"`

	// Object's metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec is the Eureka Connector specification
	Spec EurekaSpec `json:"spec"`

	// Status is the status of the Eureka Connector configuration.
	// +optional
	Status EurekaStatus `json:"status,omitempty"`
}

EurekaConnector is the type used to represent a Eureka Connector resource.

func (*EurekaConnector) DeepCopy

func (in *EurekaConnector) DeepCopy() *EurekaConnector

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

func (*EurekaConnector) DeepCopyInto

func (in *EurekaConnector) DeepCopyInto(out *EurekaConnector)

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

func (*EurekaConnector) DeepCopyObject

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

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

func (*EurekaConnector) GetProvider

func (c *EurekaConnector) GetProvider() DiscoveryServiceProvider

func (*EurekaConnector) GetReplicas added in v1.2.2

func (c *EurekaConnector) GetReplicas() *int32

func (*EurekaConnector) GetResources added in v1.2.2

func (c *EurekaConnector) GetResources() *corev1.ResourceRequirements

type EurekaConnectorList

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

	Items []EurekaConnector `json:"items"`
}

EurekaConnectorList contains a list of Eureka Connectors.

func (*EurekaConnectorList) DeepCopy

func (in *EurekaConnectorList) DeepCopy() *EurekaConnectorList

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

func (*EurekaConnectorList) DeepCopyInto

func (in *EurekaConnectorList) DeepCopyInto(out *EurekaConnectorList)

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

func (*EurekaConnectorList) DeepCopyObject

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

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

type EurekaSpec

type EurekaSpec struct {
	HTTPAddr        string `json:"httpAddr"`
	DeriveNamespace string `json:"deriveNamespace"`

	// +kubebuilder:default=false
	// +optional
	AsInternalServices bool `json:"asInternalServices,omitempty"`

	// +kubebuilder:validation:Format="duration"
	// +kubebuilder:default="5s"
	// +optional
	SyncPeriod  metav1.Duration       `json:"syncPeriod"`
	SyncToK8S   EurekaSyncToK8SSpec   `json:"syncToK8S"`
	SyncFromK8S EurekaSyncFromK8SSpec `json:"syncFromK8S"`

	// +kubebuilder:default={limit:500, burst:750}
	// +optional
	Limiter *Limiter `json:"Limiter,omitempty"`

	// Compute Resources required by connector container.
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

	// +kubebuilder:default=1
	// +kubebuilder:validation:Minimum=1
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`
}

EurekaSpec is the type used to represent the Eureka Connector specification.

func (*EurekaSpec) DeepCopy

func (in *EurekaSpec) DeepCopy() *EurekaSpec

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

func (*EurekaSpec) DeepCopyInto

func (in *EurekaSpec) DeepCopyInto(out *EurekaSpec)

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

type EurekaStatus

type EurekaStatus struct {
	// CurrentStatus defines the current status of a Eureka Connector resource.
	// +optional
	CurrentStatus string `json:"currentStatus,omitempty"`

	// Reason defines the reason for the current status of a Eureka Connector resource.
	// +optional
	Reason string `json:"reason,omitempty"`

	ToK8SServiceCnt int `json:"toK8SServiceCnt"`

	FromK8SServiceCnt int `json:"fromK8SServiceCnt"`
}

EurekaStatus is the type used to represent the status of a Eureka Connector resource.

func (*EurekaStatus) DeepCopy

func (in *EurekaStatus) DeepCopy() *EurekaStatus

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

func (*EurekaStatus) DeepCopyInto

func (in *EurekaStatus) DeepCopyInto(out *EurekaStatus)

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

type EurekaSyncFromK8SSpec

type EurekaSyncFromK8SSpec struct {
	Enable bool `json:"enable"`

	// +kubebuilder:default=true
	// +optional
	DefaultSync bool `json:"defaultSync,omitempty"`

	// +kubebuilder:default=true
	// +optional
	SyncClusterIPServices bool `json:"syncClusterIPServices,omitempty"`

	// +kubebuilder:default=false
	// +optional
	SyncLoadBalancerEndpoints bool `json:"syncLoadBalancerEndpoints,omitempty"`

	// +kubebuilder:default=ExternalOnly
	// +optional
	NodePortSyncType NodePortSyncType `json:"nodePortSyncType"`

	// +kubebuilder:default=false
	// +optional
	SyncIngress bool `json:"syncIngress,omitempty"`

	// +kubebuilder:default=false
	// +optional
	SyncIngressLoadBalancerIPs bool `json:"syncIngressLoadBalancerIPs,omitempty"`

	// +kubebuilder:default=""
	// +optional
	AddServicePrefix string `json:"addServicePrefix,omitempty"`

	// +kubebuilder:default=false
	// +optional
	AddK8SNamespaceAsServiceSuffix bool `json:"addK8SNamespaceAsServiceSuffix,omitempty"`

	// +optional
	AppendMetadatas []Metadata `json:"appendMetadatas,omitempty"`

	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:default={"*"}
	// +optional
	AllowK8sNamespaces []string `json:"allowK8sNamespaces,omitempty"`

	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:default={""}
	// +optional
	DenyK8sNamespaces []string `json:"denyK8sNamespaces,omitempty"`

	// +kubebuilder:default={enable: false, gatewayMode: forward}
	// +optional
	WithGateway K2CGateway `json:"withGateway,omitempty"`
}

EurekaSyncFromK8SSpec is the type used to represent the sync from K8S to Eureka specification.

func (*EurekaSyncFromK8SSpec) DeepCopy

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

func (*EurekaSyncFromK8SSpec) DeepCopyInto

func (in *EurekaSyncFromK8SSpec) DeepCopyInto(out *EurekaSyncFromK8SSpec)

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

type EurekaSyncToK8SSpec

type EurekaSyncToK8SSpec struct {
	Enable bool `json:"enable"`

	// +kubebuilder:default=""
	// +optional
	ClusterId string `json:"clusterId,omitempty"`

	// +optional
	FilterMetadatas []Metadata `json:"filterMetadatas,omitempty"`

	// +optional
	PrefixMetadata string `json:"prefixMetadata,omitempty"`

	// +optional
	SuffixMetadata string `json:"suffixMetadata,omitempty"`

	// +kubebuilder:default={enable: false, multiGateways: true}
	// +optional
	WithGateway C2KGateway `json:"withGateway,omitempty"`
}

EurekaSyncToK8SSpec is the type used to represent the sync from Eureka to K8S specification.

func (*EurekaSyncToK8SSpec) DeepCopy

func (in *EurekaSyncToK8SSpec) DeepCopy() *EurekaSyncToK8SSpec

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

func (*EurekaSyncToK8SSpec) DeepCopyInto

func (in *EurekaSyncToK8SSpec) DeepCopyInto(out *EurekaSyncToK8SSpec)

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

type GatewayConnector

type GatewayConnector struct {
	// Object's type metadata
	metav1.TypeMeta `json:",inline"`

	// Object's metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec is the Gateway Connector specification
	Spec GatewaySpec `json:"spec"`

	// Status is the status of the Gateway Connector configuration.
	// +optional
	Status GatewayStatus `json:"status,omitempty"`
}

GatewayConnector is the type used to represent a Gateway Connector resource.

func (*GatewayConnector) DeepCopy

func (in *GatewayConnector) DeepCopy() *GatewayConnector

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

func (*GatewayConnector) DeepCopyInto

func (in *GatewayConnector) DeepCopyInto(out *GatewayConnector)

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

func (*GatewayConnector) DeepCopyObject

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

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

func (*GatewayConnector) GetProvider

func (c *GatewayConnector) GetProvider() DiscoveryServiceProvider

func (*GatewayConnector) GetReplicas added in v1.2.2

func (c *GatewayConnector) GetReplicas() *int32

func (*GatewayConnector) GetResources added in v1.2.2

func (c *GatewayConnector) GetResources() *corev1.ResourceRequirements

type GatewayConnectorList

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

	Items []GatewayConnector `json:"items"`
}

GatewayConnectorList contains a list of Gateway Connectors.

func (*GatewayConnectorList) DeepCopy

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

func (*GatewayConnectorList) DeepCopyInto

func (in *GatewayConnectorList) DeepCopyInto(out *GatewayConnectorList)

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

func (*GatewayConnectorList) DeepCopyObject

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

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

type GatewaySpec

type GatewaySpec struct {
	Ingress IngressSelectorSpec `json:"ingress"`

	Egress IngressSelectorSpec `json:"egress"`

	SyncToFgw SyncToFgwSpec `json:"syncToFgw"`

	// Compute Resources required by connector container.
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

	// +kubebuilder:default=1
	// +kubebuilder:validation:Minimum=1
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`
}

GatewaySpec is the type used to represent the Gateway Connector specification.

func (*GatewaySpec) DeepCopy

func (in *GatewaySpec) DeepCopy() *GatewaySpec

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

func (*GatewaySpec) DeepCopyInto

func (in *GatewaySpec) DeepCopyInto(out *GatewaySpec)

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

type GatewayStatus

type GatewayStatus struct {
	// CurrentStatus defines the current status of a Gateway Connector resource.
	// +optional
	CurrentStatus string `json:"currentStatus,omitempty"`

	// Reason defines the reason for the current status of a Gateway Connector resource.
	// +optional
	Reason string `json:"reason,omitempty"`
}

GatewayStatus is the type used to represent the status of a Gateway Connector resource.

func (*GatewayStatus) DeepCopy

func (in *GatewayStatus) DeepCopy() *GatewayStatus

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

func (*GatewayStatus) DeepCopyInto

func (in *GatewayStatus) DeepCopyInto(out *GatewayStatus)

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

type IngressSelectorSpec

type IngressSelectorSpec struct {
	// +kubebuilder:default=ExternalIP
	// +optional
	IPSelector AddrSelector `json:"ipSelector,omitempty"`

	// +kubebuilder:default=10080
	// +optional
	HTTPPort int32 `json:"httpPort,omitempty"`

	// +optional
	GRPCPort int32 `json:"grpcPort,omitempty"`
}

IngressSelectorSpec is the type used to represent the ingress selector specification.

func (*IngressSelectorSpec) DeepCopy

func (in *IngressSelectorSpec) DeepCopy() *IngressSelectorSpec

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

func (*IngressSelectorSpec) DeepCopyInto

func (in *IngressSelectorSpec) DeepCopyInto(out *IngressSelectorSpec)

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

type K2CGateway added in v1.2.4

type K2CGateway struct {
	// +kubebuilder:default=false
	// +optional
	Enable bool `json:"enable,omitempty"`

	// +kubebuilder:default=forward
	// +optional
	GatewayMode WithGatewayMode `json:"gatewayMode,omitempty"`
}

func (*K2CGateway) DeepCopy added in v1.2.4

func (in *K2CGateway) DeepCopy() *K2CGateway

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

func (*K2CGateway) DeepCopyInto added in v1.2.4

func (in *K2CGateway) DeepCopyInto(out *K2CGateway)

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

type Limiter

type Limiter struct {
	Limit uint32 `json:"limit"`
	Burst uint32 `json:"burst"`
}

func (*Limiter) DeepCopy

func (in *Limiter) DeepCopy() *Limiter

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

func (*Limiter) DeepCopyInto

func (in *Limiter) DeepCopyInto(out *Limiter)

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

type MachineConnector

type MachineConnector struct {
	// Object's type metadata
	metav1.TypeMeta `json:",inline"`

	// Object's metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec is the Machine Connector specification
	Spec MachineSpec `json:"spec"`

	// Status is the status of the Machine Connector configuration.
	// +optional
	Status MachineStatus `json:"status,omitempty"`
}

MachineConnector is the type used to represent a Machine Connector resource.

func (*MachineConnector) DeepCopy

func (in *MachineConnector) DeepCopy() *MachineConnector

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

func (*MachineConnector) DeepCopyInto

func (in *MachineConnector) DeepCopyInto(out *MachineConnector)

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

func (*MachineConnector) DeepCopyObject

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

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

func (*MachineConnector) GetProvider

func (c *MachineConnector) GetProvider() DiscoveryServiceProvider

func (*MachineConnector) GetReplicas added in v1.2.2

func (c *MachineConnector) GetReplicas() *int32

func (*MachineConnector) GetResources added in v1.2.2

func (c *MachineConnector) GetResources() *corev1.ResourceRequirements

type MachineConnectorList

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

	Items []MachineConnector `json:"items"`
}

MachineConnectorList contains a list of Machine Connectors.

func (*MachineConnectorList) DeepCopy

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

func (*MachineConnectorList) DeepCopyInto

func (in *MachineConnectorList) DeepCopyInto(out *MachineConnectorList)

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

func (*MachineConnectorList) DeepCopyObject

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

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

type MachineSpec

type MachineSpec struct {
	DeriveNamespace string `json:"deriveNamespace"`

	// +kubebuilder:default=false
	// +optional
	AsInternalServices bool `json:"asInternalServices,omitempty"`

	SyncToK8S MachineSyncToK8SSpec `json:"syncToK8S"`

	// Compute Resources required by connector container.
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

	// +kubebuilder:default=1
	// +kubebuilder:validation:Minimum=1
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`
}

MachineSpec is the type used to represent the Machine Connector specification.

func (*MachineSpec) DeepCopy

func (in *MachineSpec) DeepCopy() *MachineSpec

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

func (*MachineSpec) DeepCopyInto

func (in *MachineSpec) DeepCopyInto(out *MachineSpec)

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

type MachineStatus

type MachineStatus struct {
	// CurrentStatus defines the current status of a Machine Connector resource.
	// +optional
	CurrentStatus string `json:"currentStatus,omitempty"`

	// Reason defines the reason for the current status of a Machine Connector resource.
	// +optional
	Reason string `json:"reason,omitempty"`

	ToK8SServiceCnt int `json:"toK8SServiceCnt"`
}

MachineStatus is the type used to represent the status of a Machine Connector resource.

func (*MachineStatus) DeepCopy

func (in *MachineStatus) DeepCopy() *MachineStatus

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

func (*MachineStatus) DeepCopyInto

func (in *MachineStatus) DeepCopyInto(out *MachineStatus)

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

type MachineSyncToK8SSpec

type MachineSyncToK8SSpec struct {
	Enable bool `json:"enable"`

	// +kubebuilder:default=""
	// +optional
	ClusterId string `json:"clusterId,omitempty"`

	// +kubebuilder:default=true
	// +optional
	PassingOnly bool `json:"passingOnly,omitempty"`

	// +kubebuilder:default=""
	// +optional
	FilterLabel string `json:"filterLabel,omitempty"`

	// +kubebuilder:default=""
	// +optional
	PrefixLabel string `json:"prefixLabel,omitempty"`

	// +kubebuilder:default=""
	// +optional
	SuffixLabel string `json:"suffixLabel,omitempty"`

	// +kubebuilder:default={enable: false, multiGateways: true}
	// +optional
	WithGateway C2KGateway `json:"withGateway,omitempty"`
}

MachineSyncToK8SSpec is the type used to represent the sync from Machine to K8S specification.

func (*MachineSyncToK8SSpec) DeepCopy

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

func (*MachineSyncToK8SSpec) DeepCopyInto

func (in *MachineSyncToK8SSpec) DeepCopyInto(out *MachineSyncToK8SSpec)

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

type Metadata

type Metadata struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

func (*Metadata) DeepCopy

func (in *Metadata) DeepCopy() *Metadata

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

func (*Metadata) DeepCopyInto

func (in *Metadata) DeepCopyInto(out *Metadata)

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

type NacosAuthSpec

type NacosAuthSpec struct {
	// +kubebuilder:default=""
	// +optional
	Username string `json:"username,omitempty"`

	// +kubebuilder:default=""
	// +optional
	Password string `json:"password,omitempty"`

	// +kubebuilder:default=""
	// +optional
	AccessKey string `json:"accessKey,omitempty"`

	// +kubebuilder:default=""
	// +optional
	SecretKey string `json:"secretKey,omitempty"`

	// +kubebuilder:default=public
	// +optional
	NamespaceId string `json:"namespaceId,omitempty"`
}

NacosAuthSpec is the type used to represent the Nacos auth specification.

func (*NacosAuthSpec) DeepCopy

func (in *NacosAuthSpec) DeepCopy() *NacosAuthSpec

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

func (*NacosAuthSpec) DeepCopyInto

func (in *NacosAuthSpec) DeepCopyInto(out *NacosAuthSpec)

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

type NacosConnector

type NacosConnector struct {
	// Object's type metadata
	metav1.TypeMeta `json:",inline"`

	// Object's metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec is the Nacos Connector specification
	Spec NacosSpec `json:"spec"`

	// Status is the status of the Nacos Connector configuration.
	// +optional
	Status NacosStatus `json:"status,omitempty"`
}

NacosConnector is the type used to represent a Nacos Connector resource.

func (*NacosConnector) DeepCopy

func (in *NacosConnector) DeepCopy() *NacosConnector

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

func (*NacosConnector) DeepCopyInto

func (in *NacosConnector) DeepCopyInto(out *NacosConnector)

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

func (*NacosConnector) DeepCopyObject

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

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

func (*NacosConnector) GetProvider

func (c *NacosConnector) GetProvider() DiscoveryServiceProvider

func (*NacosConnector) GetReplicas added in v1.2.2

func (c *NacosConnector) GetReplicas() *int32

func (*NacosConnector) GetResources added in v1.2.2

func (c *NacosConnector) GetResources() *corev1.ResourceRequirements

type NacosConnectorList

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

	Items []NacosConnector `json:"items"`
}

NacosConnectorList contains a list of Nacos Connectors.

func (*NacosConnectorList) DeepCopy

func (in *NacosConnectorList) DeepCopy() *NacosConnectorList

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

func (*NacosConnectorList) DeepCopyInto

func (in *NacosConnectorList) DeepCopyInto(out *NacosConnectorList)

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

func (*NacosConnectorList) DeepCopyObject

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

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

type NacosSpec

type NacosSpec struct {
	HTTPAddr        string `json:"httpAddr"`
	DeriveNamespace string `json:"deriveNamespace"`

	// +kubebuilder:default=false
	// +optional
	AsInternalServices bool `json:"asInternalServices,omitempty"`

	// +kubebuilder:default={}
	// +optional
	Auth NacosAuthSpec `json:"auth,omitempty"`

	// +kubebuilder:validation:Format="duration"
	// +kubebuilder:default="5s"
	// +optional
	SyncPeriod  metav1.Duration      `json:"syncPeriod"`
	SyncToK8S   NacosSyncToK8SSpec   `json:"syncToK8S"`
	SyncFromK8S NacosSyncFromK8SSpec `json:"syncFromK8S"`

	// +kubebuilder:default={limit:500, burst:750}
	// +optional
	Limiter *Limiter `json:"Limiter,omitempty"`

	// Compute Resources required by connector container.
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

	// +kubebuilder:default=1
	// +kubebuilder:validation:Minimum=1
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`
}

NacosSpec is the type used to represent the Nacos Connector specification.

func (*NacosSpec) DeepCopy

func (in *NacosSpec) DeepCopy() *NacosSpec

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

func (*NacosSpec) DeepCopyInto

func (in *NacosSpec) DeepCopyInto(out *NacosSpec)

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

type NacosStatus

type NacosStatus struct {
	// CurrentStatus defines the current status of a Nacos Connector resource.
	// +optional
	CurrentStatus string `json:"currentStatus,omitempty"`

	// Reason defines the reason for the current status of a Nacos Connector resource.
	// +optional
	Reason string `json:"reason,omitempty"`

	ToK8SServiceCnt int `json:"toK8SServiceCnt"`

	FromK8SServiceCnt int `json:"fromK8SServiceCnt"`
}

NacosStatus is the type used to represent the status of a Nacos Connector resource.

func (*NacosStatus) DeepCopy

func (in *NacosStatus) DeepCopy() *NacosStatus

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

func (*NacosStatus) DeepCopyInto

func (in *NacosStatus) DeepCopyInto(out *NacosStatus)

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

type NacosSyncFromK8SSpec

type NacosSyncFromK8SSpec struct {
	Enable bool `json:"enable"`

	// +kubebuilder:default=DEFAULT
	// +optional
	ClusterId string `json:"clusterId,omitempty"`

	// +kubebuilder:default=DEFAULT_GROUP
	// +optional
	GroupId string `json:"groupId,omitempty"`

	// +kubebuilder:default=true
	// +optional
	DefaultSync bool `json:"defaultSync,omitempty"`

	// +kubebuilder:default=true
	// +optional
	SyncClusterIPServices bool `json:"syncClusterIPServices,omitempty"`

	// +kubebuilder:default=false
	// +optional
	SyncLoadBalancerEndpoints bool `json:"syncLoadBalancerEndpoints,omitempty"`

	// +kubebuilder:default=ExternalOnly
	// +optional
	NodePortSyncType NodePortSyncType `json:"nodePortSyncType"`

	// +kubebuilder:default=false
	// +optional
	SyncIngress bool `json:"syncIngress,omitempty"`

	// +kubebuilder:default=false
	// +optional
	SyncIngressLoadBalancerIPs bool `json:"syncIngressLoadBalancerIPs,omitempty"`

	// +kubebuilder:default=""
	// +optional
	AddServicePrefix string `json:"addServicePrefix,omitempty"`

	// +kubebuilder:default=false
	// +optional
	AddK8SNamespaceAsServiceSuffix bool `json:"addK8SNamespaceAsServiceSuffix,omitempty"`

	// +optional
	AppendMetadatas []Metadata `json:"appendMetadatas,omitempty"`

	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:default={"*"}
	// +optional
	AllowK8sNamespaces []string `json:"allowK8sNamespaces,omitempty"`

	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:default={""}
	// +optional
	DenyK8sNamespaces []string `json:"denyK8sNamespaces,omitempty"`

	// +kubebuilder:default={enable: false, gatewayMode: forward}
	// +optional
	WithGateway K2CGateway `json:"withGateway,omitempty"`
}

NacosSyncFromK8SSpec is the type used to represent the sync from K8S to Nacos specification.

func (*NacosSyncFromK8SSpec) DeepCopy

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

func (*NacosSyncFromK8SSpec) DeepCopyInto

func (in *NacosSyncFromK8SSpec) DeepCopyInto(out *NacosSyncFromK8SSpec)

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

type NacosSyncToK8SSpec

type NacosSyncToK8SSpec struct {
	Enable bool `json:"enable"`

	// +kubebuilder:default=""
	// +optional
	ClusterId string `json:"clusterId,omitempty"`

	// +kubebuilder:default=true
	// +optional
	PassingOnly bool `json:"passingOnly,omitempty"`

	// +optional
	FilterMetadatas []Metadata `json:"filterMetadatas,omitempty"`

	// +optional
	PrefixMetadata string `json:"prefixMetadata,omitempty"`

	// +optional
	SuffixMetadata string `json:"suffixMetadata,omitempty"`

	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:default={"DEFAULT"}
	// +optional
	ClusterSet []string `json:"clusterSet,omitempty"`

	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:default={"DEFAULT_GROUP"}
	// +optional
	GroupSet []string `json:"groupSet,omitempty"`

	// +kubebuilder:default={enable: false, multiGateways: true}
	// +optional
	WithGateway C2KGateway `json:"withGateway,omitempty"`
}

NacosSyncToK8SSpec is the type used to represent the sync from Nacos to K8S specification.

func (*NacosSyncToK8SSpec) DeepCopy

func (in *NacosSyncToK8SSpec) DeepCopy() *NacosSyncToK8SSpec

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

func (*NacosSyncToK8SSpec) DeepCopyInto

func (in *NacosSyncToK8SSpec) DeepCopyInto(out *NacosSyncToK8SSpec)

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

type NodePortSyncType

type NodePortSyncType string

+kubebuilder:validation:Enum=ExternalOnly;InternalOnly;ExternalFirst

const (
	// ExternalOnly only sync NodePort services with a node's ExternalIP address.
	// Doesn't sync if an ExternalIP doesn't exist.
	ExternalOnly NodePortSyncType = "ExternalOnly"

	// InternalOnly sync NodePort services using.
	InternalOnly NodePortSyncType = "InternalOnly"

	// ExternalFirst sync with an ExternalIP first, if it doesn't exist, use the
	// node's InternalIP address instead.
	ExternalFirst NodePortSyncType = "ExternalFirst"
)

type SyncToFgwSpec

type SyncToFgwSpec struct {
	Enable bool `json:"enable"`

	// +kubebuilder:validation:Format="duration"
	// +kubebuilder:default="5s"
	// +optional
	SyncPeriod metav1.Duration `json:"syncPeriod"`

	// +kubebuilder:default=true
	// +optional
	DefaultSync bool `json:"defaultSync,omitempty"`

	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:default={"*"}
	// +optional
	AllowK8sNamespaces []string `json:"allowK8sNamespaces,omitempty"`

	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:default={""}
	// +optional
	DenyK8sNamespaces []string `json:"denyK8sNamespaces,omitempty"`
}

SyncToFgwSpec is the type used to represent the sync to Gateway specification.

func (*SyncToFgwSpec) DeepCopy

func (in *SyncToFgwSpec) DeepCopy() *SyncToFgwSpec

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

func (*SyncToFgwSpec) DeepCopyInto

func (in *SyncToFgwSpec) DeepCopyInto(out *SyncToFgwSpec)

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

type WithGatewayMode added in v1.2.3

type WithGatewayMode string

+kubebuilder:validation:Enum=proxy;forward

const (
	Proxy   WithGatewayMode = "proxy"
	Forward WithGatewayMode = "forward"
)

Jump to

Keyboard shortcuts

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