v1alpha1

package
v0.0.0-...-97a9278 Latest Latest
Warning

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

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

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API.

Index

Constants

View Source
const (
	// LabelDummmySericeSelector is used as a dummy service selector for Kubernetes to
	// not find any application pod and then keep the kubernetes endpointslice empty. This selector
	// will be ignored by the endpointslice controllers of this PoC.
	LabelDummmySericeSelector = "l-3-4-gateway-api-poc/dummy-service-selector"

	// LabelServiceMaxEndpoints defines the maximum number of endpoints that a
	// service can handle.
	LabelServiceMaxEndpoints = "l-3-4-gateway-api-poc/service-max-endpoints"

	// PodSelectedNetworks represents the networks that must be in the pods selected by the services.
	PodSelectedNetworks = "l-3-4-gateway-api-poc/networks"

	// LabelKPNGInject indicates a pod must receive the KPNG and router containers.
	LabelKPNGInject = "l-3-4-gateway-api-poc/kpng-inject"
)
View Source
const GroupName = "l34.gateway.api.poc"

GroupName is the group name used in this package.

Variables

View Source
var (
	// SchemeBuilder initializes a scheme builder.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme is a global function that registers this API group & version to a scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects.

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 BfdSpec

type BfdSpec struct {
	// BFD monitoring.
	// Valid values are:
	// - false: no BFD monitoring;
	// - true: turns on the BFD monitoring.
	// When left empty, there is no BFD monitoring.
	// +optional
	Switch *bool `json:"switch,omitempty"`

	// Min-tx timer of bfd session. Please refere to BFD material to understand what this implies.
	// The value must be a valid duration format. For example, 300ms, 90s, 1m, 1h.
	// The duration will be rounded by millisecond.
	// +optional
	MinTx string `json:"minTx,omitempty"`

	// Min-rx timer of bfd session. Please refere to BFD material to understand what this implies.
	// The value must be a valid duration format. For example, 300ms, 90s, 1m, 1h.
	// The duration will be rounded by millisecond.
	// +optional
	MinRx string `json:"minRx,omitempty"`

	// Multiplier of bfd session.
	// When this number of bfd packets failed to receive, bfd session will go down.
	// +optional
	Multiplier *uint16 `json:"multiplier,omitempty"`
}

Bfd defines the parameters to configure the BFD session. The static gateway routers shares the same interface shall define the same bfd configuration.

func (*BfdSpec) DeepCopy

func (in *BfdSpec) DeepCopy() *BfdSpec

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

func (*BfdSpec) DeepCopyInto

func (in *BfdSpec) DeepCopyInto(out *BfdSpec)

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

type BgpAuth

type BgpAuth struct {
	// Name of the BGP authentication key, used internally as a reference.
	// KeyName is a key in the data section of a Secret. The associated value in
	// the Secret is the password (pre-shared key) to be used for authentication.
	// Must consist of alphanumeric characters, ".", "-" or "_".
	KeyName string `json:"keyName,omitempty"`

	// Name of the kubernetes Secret containing the password (pre-shared key)
	// that can be looked up based on KeyName.
	// Must be a valid lowercase RFC 1123 subdomain. (Must consist of lower case alphanumeric
	// characters, '-' or '.', and must start and end with an alphanumeric character.)
	KeySource string `json:"keySource,omitempty"`
}

BgpAuth defines the parameters to configure BGP authentication.

func (*BgpAuth) DeepCopy

func (in *BgpAuth) DeepCopy() *BgpAuth

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

func (*BgpAuth) DeepCopyInto

func (in *BgpAuth) DeepCopyInto(out *BgpAuth)

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

type BgpSpec

type BgpSpec struct {
	// The ASN number of the Gateway Router
	//nolint:tagliatelle
	RemoteASN *uint32 `json:"remoteASN,omitempty"`

	// The ASN number of the system where the Attractor FrontEnds locates
	//nolint:tagliatelle
	LocalASN *uint32 `json:"localASN,omitempty"`

	// BFD monitoring of BGP session.
	// +optional
	BFD BfdSpec `json:"bfd,omitempty"`

	// Hold timer of the BGP session. Please refere to BGP material to understand what this implies.
	// The value must be a valid duration format. For example, 90s, 1m, 1h.
	// The duration will be rounded by second
	// Minimum duration is 3s.
	// +optional
	HoldTime string `json:"holdTime,omitempty"`

	// BGP listening port of the Gateway Router.
	// +optional
	RemotePort *uint16 `json:"remotePort,omitempty"`

	// BGP listening port of the Attractor FrontEnds.
	// +optional
	LocalPort *uint16 `json:"localPort,omitempty"`

	// BGP authentication (RFC2385).
	// +optional
	Auth *BgpAuth `json:"auth,omitempty"`
}

BgpSpec defines the parameters to set up a BGP session.

func (*BgpSpec) DeepCopy

func (in *BgpSpec) DeepCopy() *BgpSpec

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

func (*BgpSpec) DeepCopyInto

func (in *BgpSpec) DeepCopyInto(out *BgpSpec)

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

type GatewayRouter

type GatewayRouter struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Specification of the desired behavior of the GatewayRouter.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
	// +optional
	Spec GatewayRouterSpec `json:"spec"`

	// Most recently observed status of the GatewayRouter.
	// Populated by the system.
	// Read-only.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
	// +optional
	Status GatewayRouterStatus `json:"status"`
}

GatewayRouter is a specification for a GatewayRouter resource.

func (*GatewayRouter) DeepCopy

func (in *GatewayRouter) DeepCopy() *GatewayRouter

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

func (*GatewayRouter) DeepCopyInto

func (in *GatewayRouter) DeepCopyInto(out *GatewayRouter)

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

func (*GatewayRouter) DeepCopyObject

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

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

type GatewayRouterList

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

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

GatewayRouterList is a list of GatewayRouter resources.

func (*GatewayRouterList) DeepCopy

func (in *GatewayRouterList) DeepCopy() *GatewayRouterList

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

func (*GatewayRouterList) DeepCopyInto

func (in *GatewayRouterList) DeepCopyInto(out *GatewayRouterList)

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

func (*GatewayRouterList) DeepCopyObject

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

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

type GatewayRouterSpec

type GatewayRouterSpec struct {
	// Address of the Gateway Router
	Address string `json:"address"`

	// Interface used to access the Gateway Router
	Interface string `json:"interface"`

	// The routing choice between the Gateway Router and Attractor FrontEnds.
	// +optional
	Protocol RoutingProtocol `json:"protocol,omitempty"`

	// Parameters to set up the BGP session to specified Address.
	// If the Protocol is static, this property must be empty.
	// If the Protocol is bgp, the minimal parameters to be defined in bgp properties
	// are RemoteASN and LocalASN
	// +optional
	Bgp BgpSpec `json:"bgp,omitempty"`

	// Parameters to work with the static routing configured on the Gateway Router with specified Address.
	// If the Protocol is bgp, this property must be empty.
	// +optional
	Static StaticSpec `json:"static,omitempty"`
}

GatewayRouterSpec defines the desired state of GatewayRouter.

func (*GatewayRouterSpec) DeepCopy

func (in *GatewayRouterSpec) DeepCopy() *GatewayRouterSpec

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

func (*GatewayRouterSpec) DeepCopyInto

func (in *GatewayRouterSpec) DeepCopyInto(out *GatewayRouterSpec)

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

type GatewayRouterStatus

type GatewayRouterStatus struct{}

GatewayRouterStatus is the status for a GatewayRouter resource.

func (*GatewayRouterStatus) DeepCopy

func (in *GatewayRouterStatus) DeepCopy() *GatewayRouterStatus

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

func (*GatewayRouterStatus) DeepCopyInto

func (in *GatewayRouterStatus) DeepCopyInto(out *GatewayRouterStatus)

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

type L34Route

type L34Route struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Specification of the desired behavior of the L34Route.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
	// +optional
	Spec L34RouteSpec `json:"spec"`

	// Most recently observed status of the L34Route.
	// Populated by the system.
	// Read-only.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
	// +optional
	Status L34RouteStatus `json:"status"`
}

L34Route is a specification for a L34Route resource.

func (*L34Route) DeepCopy

func (in *L34Route) DeepCopy() *L34Route

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

func (*L34Route) DeepCopyInto

func (in *L34Route) DeepCopyInto(out *L34Route)

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

func (*L34Route) DeepCopyObject

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

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

type L34RouteList

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

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

L34RouteList is a list of L34Route resources.

func (*L34RouteList) DeepCopy

func (in *L34RouteList) DeepCopy() *L34RouteList

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

func (*L34RouteList) DeepCopyInto

func (in *L34RouteList) DeepCopyInto(out *L34RouteList)

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

func (*L34RouteList) DeepCopyObject

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

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

type L34RouteSpec

type L34RouteSpec struct {
	gatewayapiv1.CommonRouteSpec `json:",inline"`

	// BackendRefs defines the backend(s) where matching requests should be
	// sent. If unspecified or invalid (refers to a non-existent resource or a
	// Service with no endpoints), the underlying implementation MUST actively
	// reject connection attempts to this backend. Connection rejections must
	// respect weight; if an invalid backend is requested to have 80% of
	// connections, then 80% of connections must be rejected instead.
	//
	// Support: Core for Kubernetes Service
	//
	// Support: Extended for Kubernetes ServiceImport
	//
	// Support: Implementation-specific for any other resource
	//
	// Support for weight: Extended
	//
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:MaxItems=16
	BackendRefs []gatewayapiv1.BackendRef `json:"backendRefs,omitempty"`

	// Destination CIDRs that this L34Route will send traffic to.
	// The destination CIDRs should not have overlaps.
	//nolint:tagliatelle
	DestinationCIDRs []string `json:"destinationCIDRs"`

	// Source CIDRs allowed in the L34Route.
	// The source CIDRs should not have overlaps.
	//nolint:tagliatelle
	SourceCIDRs []string `json:"sourceCIDRs,omitempty"`

	// Source port ranges allowed in the L34Route.
	// The ports should not have overlaps.
	// Ports can be defined by:
	// - a single port, such as 3000;
	// - a port range, such as 3000-4000;
	// - "any", which is equivalent to port range 0-65535.
	SourcePorts []string `json:"sourcePorts,omitempty"`

	// Destination port ranges allowed in the L34Route.
	// The ports should not have overlaps.
	// Ports can be defined by:
	// - a single port, such as 3000;
	// - a port range, such as 3000-4000;
	// - "any", which is equivalent to port range 0-65535.
	DestinationPorts []string `json:"destinationPorts,omitempty"`

	// Protocols allowed in this L34Route.
	// The protocols should not have overlaps.
	Protocols []TransportProtocol `json:"protocols"`

	// Priority of the L34Route
	Priority int32 `json:"priority"`

	// ByteMatches matches bytes in the L4 header in the L34Route.
	// +optional
	ByteMatches []string `json:"byteMatches,omitempty"`
}

L34RouteSpec is the spec for a L34Route resource.

func (*L34RouteSpec) DeepCopy

func (in *L34RouteSpec) DeepCopy() *L34RouteSpec

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

func (*L34RouteSpec) DeepCopyInto

func (in *L34RouteSpec) DeepCopyInto(out *L34RouteSpec)

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

type L34RouteStatus

type L34RouteStatus struct{}

L34RouteStatus is the status for a L34Route resource.

func (*L34RouteStatus) DeepCopy

func (in *L34RouteStatus) DeepCopy() *L34RouteStatus

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

func (*L34RouteStatus) DeepCopyInto

func (in *L34RouteStatus) DeepCopyInto(out *L34RouteStatus)

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

type Network

type Network struct {
	// Name of the network.
	Name string `json:"name,omitempty"`

	// NetworkAttachementAnnotation represents a network attached via an annotation.
	// +optional
	NetworkAttachementAnnotation *NetworkAttachementAnnotation `json:"networkAttachementAnnotation,omitempty"`
}

Network represents a single network, its way to attach it, and the way it should be mounted to the endpoints and proxy pods.

func (*Network) DeepCopy

func (in *Network) DeepCopy() *Network

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

func (*Network) DeepCopyInto

func (in *Network) DeepCopyInto(out *Network)

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

type NetworkAttachementAnnotation

type NetworkAttachementAnnotation struct {
	// Key of the network attachement (e.g.: k8s.v1.cni.cncf.io/networks).
	Key string `json:"key,omitempty"`

	// StatusKey of the network attachement status (e.g.: k8s.v1.cni.cncf.io/network-status).
	StatusKey string `json:"statusKey,omitempty"`

	// Value added for the "Key" (e.g.: [{"name":"macvlan-vlan-100","interface":"macvlan-100"}]).
	Value string `json:"value,omitempty"`
}

NetworkAttachementAnnotation represents a network attached via an annotation.

func (*NetworkAttachementAnnotation) DeepCopy

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

func (*NetworkAttachementAnnotation) DeepCopyInto

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

type RoutingProtocol

type RoutingProtocol string

RoutingProtocol represents the routing protocol used in a gateway router. +enum

const (
	// BGP, Border Gateway Protocol.
	BGP RoutingProtocol = "BGP"
	// Static Routing.
	Static RoutingProtocol = "Static"
)

type StaticSpec

type StaticSpec struct {
	// BFD monitoring of Static session.
	// +optional
	BFD BfdSpec `json:"bfd,omitempty"`
}

StaticSpec defines the parameters to set up static routes.

func (*StaticSpec) DeepCopy

func (in *StaticSpec) DeepCopy() *StaticSpec

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

func (*StaticSpec) DeepCopyInto

func (in *StaticSpec) DeepCopyInto(out *StaticSpec)

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

type TransportProtocol

type TransportProtocol string

+enum

const (
	// TCP represents the layer 4 protocol.
	TCP TransportProtocol = "TCP"
	// UDP represents the layer 4 protocol.
	UDP TransportProtocol = "UDP"
	// SCTP represents the layer 4 protocol.
	SCTP TransportProtocol = "SCTP"
)

Jump to

Keyboard shortcuts

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