v1alpha1

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "stunner.l7mp.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type Dataplane added in v0.15.1

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 added in v0.15.1

func (in *Dataplane) DeepCopy() *Dataplane

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

func (*Dataplane) DeepCopyInto added in v0.15.1

func (in *Dataplane) DeepCopyInto(out *Dataplane)

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

func (*Dataplane) DeepCopyObject added in v0.15.1

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

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

type DataplaneList added in v0.15.1

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 added in v0.15.1

func (in *DataplaneList) DeepCopy() *DataplaneList

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

func (*DataplaneList) DeepCopyInto added in v0.15.1

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 added in v0.15.1

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

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

type DataplaneSpec added in v0.15.1

type DataplaneSpec struct {

	// Number of desired pods. This is a pointer to distinguish between explicit zero and not
	// specified. Defaults to 1.
	//
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`

	// Container image name.
	//
	// +optional
	Image string `json:"image,omitempty"`

	// Image pull policy. One of Always, Never, IfNotPresent.
	//
	// +optional
	ImagePullPolicy *corev1.PullPolicy `json:"imagePullPolicy,omitempty"`

	// Entrypoint array. Defaults: "stunnerd".
	//
	// +optional
	Command []string `json:"command,omitempty"`

	// Arguments to the entrypoint.
	//
	// +optional
	Args []string `json:"args,omitempty"`

	// List of environment variables to set in the stunnerd container.
	//
	// +optional
	Env []corev1.EnvVar `json:"env,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"`

	// If specified, the health-check port.
	//
	// +optional
	HealthCheckPort *int `json:"healthCheckPort,omitempty"`
}

DataplaneSpec describes the prefixes reachable via a Dataplane.

func (*DataplaneSpec) DeepCopy added in v0.15.1

func (in *DataplaneSpec) DeepCopy() *DataplaneSpec

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

func (*DataplaneSpec) DeepCopyInto added in v0.15.1

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.

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 {
	// StunnerConfig specifies the name of the ConfigMap into which the operator renders the
	// stunnerd configfile.
	//
	// +optional
	// +kubebuilder:validation:MaxLength=64
	// +kubebuilder:validation:Pattern=`^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$`
	// +kubebuilder:default:="stunnerd-config"
	StunnerConfig *string `json:"stunnerConfig,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"`

	// MetricsEndpoint is the URI in the form `http://address:port/path` exposed for metric
	// scraping (Prometheus). The scheme (`http://`) is mandatory. Default is to expose no
	// metric endpoint.
	//
	// +optional
	MetricsEndpoint *string `json:"metricsEndpoint,omitempty"`

	// HealthCheckEndpoint is the URI of the form `http://address:port` exposed for external
	// HTTP health-checking. A liveness probe responder will be exposed on path `/live` and
	// readiness probe on path `/ready`. The scheme (`http://`) is mandatory, default is to
	// enable health-checking at "http://0.0.0.0:8086".
	//
	// +optional
	HealthCheckEndpoint *string `json:"healthCheckEndpoint,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"`

	// SharedSecret defines the shared secret to be used for "longterm" authentication.
	//
	// +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"`

	// MinRelayPort is the smallest relay port assigned for STUNner relay connections.
	//
	// +optional
	// +kubebuilder:validation:Minimum:1
	// +kubebuilder:validation:Maximum:65535
	MinPort *int32 `json:"minPort,omitempty"`

	// MaxRelayPort is the smallest relay port assigned for STUNner relay connections.
	//
	// +kubebuilder:validation:Minimum:1
	// +kubebuilder:validation:Maximum:65535
	MaxPort *int32 `json:"maxPort,omitempty"`

	// Dataplane defines the TURN server to set up for the STUNner Gateways using this
	// GatewayConfig. Can be used to select the stunnerd image repo and version or deploy into
	// the host-network namespace.
	//
	// +optional
	// +kubebuilder:default:="default"
	Dataplane *string `json:"dataplane,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 added in v0.15.1

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 Route. The purpose is to allow a Service-like CRD containing a set of static IP address prefixes to be set as the backend of a UDPRoute (or TCPRoute).

func (*StaticService) DeepCopy added in v0.15.1

func (in *StaticService) DeepCopy() *StaticService

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

func (*StaticService) DeepCopyInto added in v0.15.1

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 added in v0.15.1

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

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

type StaticServiceList added in v0.15.1

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 added in v0.15.1

func (in *StaticServiceList) DeepCopy() *StaticServiceList

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

func (*StaticServiceList) DeepCopyInto added in v0.15.1

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 added in v0.15.1

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

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

type StaticServiceSpec added in v0.15.1

type StaticServiceSpec struct {
	// The list of ports reachable via this service (currently omitted).
	// +patchMergeKey=port
	// +patchStrategy=merge
	// +listType=map
	// +listMapKey=port
	// +listMapKey=protocol
	// +optional
	Ports []corev1.ServicePort `json:"ports,omitempty" patchStrategy:"merge" patchMergeKey:"port" protobuf:"bytes,1,rep,name=ports"`

	// 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 added in v0.15.1

func (in *StaticServiceSpec) DeepCopy() *StaticServiceSpec

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

func (*StaticServiceSpec) DeepCopyInto added in v0.15.1

func (in *StaticServiceSpec) DeepCopyInto(out *StaticServiceSpec)

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