Documentation ¶
Overview ¶
Package v1 contains API Schema definitions for the stunner v1 API group +kubebuilder:object:generate=true +groupName=stunner.l7mp.io
Index ¶
- Variables
- func ConvertV1A2UDPRouteToV1Into(src *gwapiv1a2.UDPRoute, dst *UDPRoute)
- func ConvertV1A2UDPRouteToV1ListInto(src *gwapiv1a2.UDPRouteList, dst *UDPRouteList)
- func ConvertV1UDPRouteToV1A2(src *UDPRoute) *gwapiv1a2.UDPRoute
- func ConvertV1UDPRouteToV1A2Into(src *UDPRoute, dst *gwapiv1a2.UDPRoute)
- type BackendObjectReference
- type BackendRef
- type Dataplane
- type DataplaneList
- type DataplaneSpec
- type GatewayConfig
- type GatewayConfigList
- type GatewayConfigSpec
- type StaticService
- type StaticServiceList
- type StaticServiceSpec
- type UDPRoute
- type UDPRouteList
- type UDPRouteRule
- type UDPRouteSpec
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "stunner.l7mp.io", Version: "v1"} // 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 )
Functions ¶
func ConvertV1A2UDPRouteToV1ListInto ¶
func ConvertV1A2UDPRouteToV1ListInto(src *gwapiv1a2.UDPRouteList, dst *UDPRouteList)
func ConvertV1UDPRouteToV1A2 ¶
Types ¶
type BackendObjectReference ¶
type BackendObjectReference struct { // Group is the group of the referent. For example, "gateway.networking.k8s.io". // When unspecified or empty string, core API group is inferred. // // +optional // +kubebuilder:default="" Group *gwapiv1.Group `json:"group,omitempty"` // Kind is the Kubernetes resource kind of the referent. For example // "Service". // // +optional // +kubebuilder:default=Service Kind *gwapiv1.Kind `json:"kind,omitempty"` // Name is the name of the referent. Name gwapiv1.ObjectName `json:"name"` // Namespace is the namespace of the backend. When unspecified, the local // namespace is inferred. // // +optional Namespace *gwapiv1.Namespace `json:"namespace,omitempty"` // Port specifies the destination port number to use for this resource. If port is not // specified, all ports are allowed. If port is defined but endPort is not, allow only // access to the given port. If both are specified, allows access in the port-range [port, // endPort] inclusive. // // +optional Port *gwapiv1.PortNumber `json:"port,omitempty"` // EndPort specifies the upper threshold of the port-range. Only considered of port is also specified. // // +optional EndPort *gwapiv1.PortNumber `json:"endPort,omitempty"` }
func (*BackendObjectReference) DeepCopy ¶
func (in *BackendObjectReference) DeepCopy() *BackendObjectReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackendObjectReference.
func (*BackendObjectReference) DeepCopyInto ¶
func (in *BackendObjectReference) DeepCopyInto(out *BackendObjectReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackendRef ¶
type BackendRef struct { // BackendObjectReference references a Kubernetes object. BackendObjectReference `json:",inline"` }
BackendRef defines how a Route should forward a request to a Kubernetes resource.
func (*BackendRef) DeepCopy ¶
func (in *BackendRef) DeepCopy() *BackendRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackendRef.
func (*BackendRef) DeepCopyInto ¶
func (in *BackendRef) DeepCopyInto(out *BackendRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Dataplane ¶
type Dataplane struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // Spec defines the behavior of a Dataplane resource. Spec DataplaneSpec `json:"spec,omitempty"` }
Dataplane is a collection of configuration parameters that can be used for spawning a `stunnerd` instance for a Gateway. Labels and annotations on the Dataplane object will be copied verbatim into the target Deployment.
func (*Dataplane) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Dataplane.
func (*Dataplane) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Dataplane) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DataplaneList ¶
type DataplaneList struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ListMeta `json:"metadata,omitempty"` // List of services. Items []Dataplane `json:"items"` }
DataplaneList holds a list of static services.
func (*DataplaneList) DeepCopy ¶
func (in *DataplaneList) DeepCopy() *DataplaneList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataplaneList.
func (*DataplaneList) DeepCopyInto ¶
func (in *DataplaneList) DeepCopyInto(out *DataplaneList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DataplaneList) DeepCopyObject ¶
func (in *DataplaneList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DataplaneSpec ¶
type DataplaneSpec struct { // Container image name. // // +optional Image string `json:"image,omitempty"` // Image pull policy. One of Always, Never, IfNotPresent. // // +optional ImagePullPolicy *corev1.PullPolicy `json:"imagePullPolicy,omitempty"` // ImagePullSecrets is an optional list of references to secrets to use for pulling the // stunnerd image. Note that the referenced secrets are not watched by the operator, so // modifications will in effect only for newly created pods. Also note that the Secret is // always searched in the same namespace as the Gateway, which allows to use separate pull // secrets per each namespace. // // +optional ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"` // Custom labels to add to dataplane pods. Note that this does not affect the labels added // to the Deployment (those come from the Gateway), just the pods. Note also that mandatory // pod labels override whatever you set here on conflict. The only way to set pod labels is // here: whatever you set manually on the dataplane pod will be reset by the opetator. // // +optional Labels map[string]string `json:"labels,omitempty"` // Custom annotations to add to dataplane pods. Note that this does not affect the // annotations added to the Deployment (this come from the correspnding Gateway), just the // pods. Note also that mandatory pod annotations override whatever you set here on // conflict, and the annotations set here override annotations manually added to the pods. // // +optional Annotations map[string]string `json:"annotations,omitempty"` // Entrypoint array. Defaults: "stunnerd". // // +optional Command []string `json:"command,omitempty"` // Arguments to the entrypoint. // // +optional Args []string `json:"args,omitempty"` // List of sources to populate environment variables in the stunnerd container. // +optional EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"` // List of environment variables to set in the stunnerd container. // // +optional Env []corev1.EnvVar `json:"env,omitempty"` // ContainerSecurityContext holds container-level security attributes specifically for the // stunnerd container. // // +optional ContainerSecurityContext *corev1.SecurityContext `json:"containerSecurityContext,omitempty"` // Number of desired pods. If empty or set to 1, use whatever is in the target Deployment. // Otherwise, enforce this setting, overwiting whatever is set in the Deployment (this may // block autoscaling the dataplane though). Defaults to 1. // // +optional Replicas *int32 `json:"replicas,omitempty"` // Resources required by stunnerd. // // +optional Resources *corev1.ResourceRequirements `json:"resources,omitempty"` // Optional duration in seconds the stunnerd needs to terminate gracefully. Defaults to 3600 seconds. // // +optional TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"` // Host networking requested for the stunnerd pod to use the host's network namespace. // Can be used to implement public TURN servers with Kubernetes. Defaults to false. // // +optional HostNetwork bool `json:"hostNetwork,omitempty"` // Scheduling constraints. // // +optional Affinity *corev1.Affinity `json:"affinity,omitempty"` // SecurityContext holds pod-level security attributes and common container settings. // // +optional SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"` // If specified, the pod's tolerations. // // +optional Tolerations []corev1.Toleration `json:"tolerations,omitempty"` // TopologySpreadConstraints describes how stunnerd pods ought to spread across topology // domains. // // +optional TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` // Disable health-checking. Default is to enable HTTP health-checks on port 8086: a // liveness probe responder will be exposed on path `/live` and readiness probe on path // `/ready`. // // +optional DisableHealthCheck bool `json:"disableHealthCheck,omitempty"` // EnableMetricsEnpoint can be used to enable metrics scraping (Prometheus). If enabled, a // metrics endpoint will be available at http://0.0.0.0:8080 at all dataplane pods. Default // is no metrics collection. // // +optional EnableMetricsEnpoint bool `json:"enableMetricsEndpoint,omitempty"` }
DataplaneSpec describes the prefixes reachable via a Dataplane.
func (*DataplaneSpec) DeepCopy ¶
func (in *DataplaneSpec) DeepCopy() *DataplaneSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataplaneSpec.
func (*DataplaneSpec) DeepCopyInto ¶
func (in *DataplaneSpec) DeepCopyInto(out *DataplaneSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GatewayConfig ¶
type GatewayConfig struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec GatewayConfigSpec `json:"spec,omitempty"` }
GatewayConfig is the Schema for the gatewayconfigs API
func (*GatewayConfig) DeepCopy ¶
func (in *GatewayConfig) DeepCopy() *GatewayConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatewayConfig.
func (*GatewayConfig) DeepCopyInto ¶
func (in *GatewayConfig) DeepCopyInto(out *GatewayConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GatewayConfig) DeepCopyObject ¶
func (in *GatewayConfig) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*GatewayConfig) Hub ¶
func (*GatewayConfig) Hub()
Hub marks GatewayConfig.v1 as a conversion hub.
type GatewayConfigList ¶
type GatewayConfigList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []GatewayConfig `json:"items"` }
GatewayConfigList contains a list of GatewayConfig
func (*GatewayConfigList) DeepCopy ¶
func (in *GatewayConfigList) DeepCopy() *GatewayConfigList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatewayConfigList.
func (*GatewayConfigList) DeepCopyInto ¶
func (in *GatewayConfigList) DeepCopyInto(out *GatewayConfigList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GatewayConfigList) DeepCopyObject ¶
func (in *GatewayConfigList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type GatewayConfigSpec ¶
type GatewayConfigSpec struct { // Dataplane defines the dataplane (stunnerd image, version, etc) for STUNner gateways // using this GatewayConfig. // // +optional // +kubebuilder:default:="default" Dataplane *string `json:"dataplane,omitempty"` // Realm defines the STUN/TURN authentication realm to be used for clients toauthenticate // with STUNner. // // The realm must consist of lower case alphanumeric characters or '-', and must start and // end with an alphanumeric character. No other punctuation is allowed. // // +optional // +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$` // +kubebuilder:default:="stunner.l7mp.io" Realm *string `json:"realm,omitempty"` // AuthType is the type of the STUN/TURN authentication mechanism. // // +optional // +kubebuilder:validation:Pattern=`^plaintext|static|longterm|ephemeral|timewindowed$` // +kubebuilder:default:="plaintext" AuthType *string `json:"authType,omitempty"` // Username defines the `username` credential for "plaintext" authentication. // // +optional // +kubebuilder:validation:Pattern=`^[A-Za-z0-9!#$%&'*+\-.^_\x60|~]+$` Username *string `json:"userName,omitempty"` // Password defines the `password` credential for "plaintext" authentication. // // +optional // +kubebuilder:validation:Pattern=`^[A-Za-z0-9!#$%&'*+\-.^_\x60|~]+$` Password *string `json:"password,omitempty"` // // +optional SharedSecret *string `json:"sharedSecret,omitempty"` // AuthLifetime defines the lifetime of "longterm" authentication credentials in seconds. // // +optional AuthLifetime *int32 `json:"authLifetime,omitempty"` // Note that externally set credentials override any inline auth credentials (AuthType, // AuthUsername, etc.): if AuthRef is nonempty then it is expected that the referenced // Secret exists and *all* authentication credentials are correctly set in the referenced // Secret (username/password or shared secret). Mixing of credential sources // (inline/external) is not supported. // // +optional AuthRef *gwapiv1.SecretObjectReference `json:"authRef,omitempty"` // LoadBalancerServiceAnnotations is a list of annotations that will go into the // LoadBalancer services created automatically by the operator to wrap Gateways. // // NOTE: removing annotations from a GatewayConfig will not result in the removal of the // corresponding annotations from the LoadBalancer service, in order to prevent the // accidental removal of an annotation installed there by Kubernetes or the cloud // provider. If you really want to remove an annotation, do this manually or simply remove // all Gateways (which will remove the corresponding LoadBalancer services), update the // GatewayConfig and then recreate the Gateways, so that the newly created LoadBalancer // services will contain the required annotations. // // +optional LoadBalancerServiceAnnotations map[string]string `json:"loadBalancerServiceAnnotations,omitempty"` // LogLevel specifies the default loglevel for the STUNner daemon. // // +optional LogLevel *string `json:"logLevel,omitempty"` }
GatewayConfigSpec defines the desired state of GatewayConfig
func (*GatewayConfigSpec) DeepCopy ¶
func (in *GatewayConfigSpec) DeepCopy() *GatewayConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatewayConfigSpec.
func (*GatewayConfigSpec) DeepCopyInto ¶
func (in *GatewayConfigSpec) DeepCopyInto(out *GatewayConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StaticService ¶
type StaticService struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the behavior of a service. Spec StaticServiceSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` }
StaticService is a set of static IP address prefixes STUNner allows access to via a UDPRoute (or TCPRoute in the future). In contrast to Kubernetes Services, StaticServices expose all ports on the given IPs. See also https://github.com/kubernetes/enhancements/pull/2611.
func (*StaticService) DeepCopy ¶
func (in *StaticService) DeepCopy() *StaticService
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StaticService.
func (*StaticService) DeepCopyInto ¶
func (in *StaticService) DeepCopyInto(out *StaticService)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*StaticService) DeepCopyObject ¶
func (in *StaticService) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*StaticService) Hub ¶
func (*StaticService) Hub()
Hub marks StaticService.v1 as a conversion hub.
type StaticServiceList ¶
type StaticServiceList struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of services. Items []StaticService `json:"items"` }
StaticServiceList holds a list of static services.
func (*StaticServiceList) DeepCopy ¶
func (in *StaticServiceList) DeepCopy() *StaticServiceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StaticServiceList.
func (*StaticServiceList) DeepCopyInto ¶
func (in *StaticServiceList) DeepCopyInto(out *StaticServiceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*StaticServiceList) DeepCopyObject ¶
func (in *StaticServiceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type StaticServiceSpec ¶
type StaticServiceSpec struct { // Prefixes is a list of IP address prefixes reachable via this route. Prefixes []string `json:"prefixes"` }
StaticServiceSpec describes the prefixes reachable via a StaticService.
func (*StaticServiceSpec) DeepCopy ¶
func (in *StaticServiceSpec) DeepCopy() *StaticServiceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StaticServiceSpec.
func (*StaticServiceSpec) DeepCopyInto ¶
func (in *StaticServiceSpec) DeepCopyInto(out *StaticServiceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UDPRoute ¶
type UDPRoute struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec defines the desired state of UDPRoute. Spec UDPRouteSpec `json:"spec"` // Status defines the current state of UDPRoute. Status gwapiv1a2.UDPRouteStatus `json:"status,omitempty"` }
UDPRoute provides a way to route UDP traffic. When combined with a Gateway listener, it can be used to forward traffic on the port specified by the listener to a set of backends specified by the UDPRoute.
Differences from Gateway API UDPRoutes
- port-ranges are correctly handled ([port, endPort])
- port is not mandatory
- backend weight is not supported
+kubebuilder:object:root=true +kubebuilder:resource:categories=stunner +kubebuilder:subresource:status +kubebuilder:storageversion +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
func ConvertV1A2UDPRouteToV1 ¶
conversions
func (*UDPRoute) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UDPRoute.
func (*UDPRoute) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*UDPRoute) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type UDPRouteList ¶
type UDPRouteList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []UDPRoute `json:"items"` }
UDPRouteList contains a list of UDPRoute
func ConvertV1A2UDPRouteToV1List ¶
func ConvertV1A2UDPRouteToV1List(src *gwapiv1a2.UDPRouteList) *UDPRouteList
func (*UDPRouteList) DeepCopy ¶
func (in *UDPRouteList) DeepCopy() *UDPRouteList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UDPRouteList.
func (*UDPRouteList) DeepCopyInto ¶
func (in *UDPRouteList) DeepCopyInto(out *UDPRouteList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*UDPRouteList) DeepCopyObject ¶
func (in *UDPRouteList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type UDPRouteRule ¶
type UDPRouteRule struct { // BackendRefs defines the backend(s) where matching requests should be // sent. UDPRouteRules correctly handle port ranges. // // +kubebuilder:validation:MinItems=1 // +kubebuilder:validation:MaxItems=16 BackendRefs []BackendRef `json:"backendRefs,omitempty"` }
UDPRouteRule is the configuration for a given rule.
func (*UDPRouteRule) DeepCopy ¶
func (in *UDPRouteRule) DeepCopy() *UDPRouteRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UDPRouteRule.
func (*UDPRouteRule) DeepCopyInto ¶
func (in *UDPRouteRule) DeepCopyInto(out *UDPRouteRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UDPRouteSpec ¶
type UDPRouteSpec struct { gwapiv1.CommonRouteSpec `json:",inline"` // Rules are a list of UDP matchers and actions. // // +kubebuilder:validation:MinItems=1 // +kubebuilder:validation:MaxItems=16 Rules []UDPRouteRule `json:"rules"` }
UDPRouteSpec defines the desired state of UDPRoute.
func (*UDPRouteSpec) DeepCopy ¶
func (in *UDPRouteSpec) DeepCopy() *UDPRouteSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UDPRouteSpec.
func (*UDPRouteSpec) DeepCopyInto ¶
func (in *UDPRouteSpec) DeepCopyInto(out *UDPRouteSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.