v1alpha2

package
v1.7.0 Latest Latest
Warning

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

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

Documentation

Overview

Package v1alpha2 defines and implements Nginx Service Mesh APIs

Index

Constants

This section is empty.

Variables

View Source
var (
	// SchemeBuilder collects functions that add things to a scheme. It's to allow
	// code to compile without explicitly referencing generated types. You should
	// declare one in each package that will have generated deep copy or conversion
	// functions.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)

	// AddToScheme applies all the stored functions to the scheme. A non-nil error
	// indicates that one function failed and the attempt was abandoned.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{
	Group:   specs.GroupName,
	Version: "v1alpha2",
}

SchemeGroupVersion is the identifier for the API which includes the name of the group and the version of the API.

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 RateLimit

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

	// Spec defines the limit set on traffic between the specified resources
	Spec RateLimitSpec `json:"spec"`
}

RateLimit creates a maximum flow rate between resources. This can include:

Deployments
Services

func (*RateLimit) DeepCopy

func (in *RateLimit) DeepCopy() *RateLimit

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

func (*RateLimit) DeepCopyInto

func (in *RateLimit) DeepCopyInto(out *RateLimit)

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

func (*RateLimit) DeepCopyObject

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

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

type RateLimitList

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

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

RateLimitList satisfies K8s code gen requirements.

func (*RateLimitList) DeepCopy

func (in *RateLimitList) DeepCopy() *RateLimitList

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

func (*RateLimitList) DeepCopyInto

func (in *RateLimitList) DeepCopyInto(out *RateLimitList)

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

func (*RateLimitList) DeepCopyObject

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

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

type RateLimitRule

type RateLimitRule struct {
	// Kind is the kind of TrafficSpec to allow.
	Kind string `json:"kind"`
	// Name of the TrafficSpec to use.
	Name string `json:"name"`
	// Matches is a list of TrafficSpec routes that are applied to the Rate Limit object.
	// +optional
	Matches []string `json:"matches,omitempty"`
}

RateLimitRule is the TrafficSpec that applies to a Rate Limit.

func (*RateLimitRule) DeepCopy

func (in *RateLimitRule) DeepCopy() *RateLimitRule

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

func (*RateLimitRule) DeepCopyInto

func (in *RateLimitRule) DeepCopyInto(out *RateLimitRule)

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

type RateLimitSpec

type RateLimitSpec struct {
	// Delay sets the amount a request will be delayed (in seconds) when the rate
	// limit is hit. Set to "nodelay" to send back an 503 status immediately
	Delay *intstr.IntOrString `json:"delay,omitempty"`

	// Destination is the resource to which traffic should be rate limited
	Destination v1.ObjectReference `json:"destination"`

	// Name of Rate Limit, i.e. 10rs
	Name string `json:"name"`

	// Maximum allowed rate of traffic
	Rate string `json:"rate"`

	// Sources defines from where traffic should be limited
	// +optional
	Sources []v1.ObjectReference `json:"sources,omitempty"`

	// Rules allows defining a list of HTTP Route Groups that this rate limit
	// object should match.
	// +optional
	Rules []RateLimitRule `json:"rules,omitempty"`

	// Burst sets the maximum number of requests a client can make in excess of rate
	// see: https://www.nginx.com/blog/rate-limiting-nginx/#bursts
	// +optional
	Burst int `json:"burst,omitempty"`
}

RateLimitSpec defines the limit spec that restricts the flow of traffic.

func (*RateLimitSpec) DeepCopy

func (in *RateLimitSpec) DeepCopy() *RateLimitSpec

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

func (*RateLimitSpec) DeepCopyInto

func (in *RateLimitSpec) DeepCopyInto(out *RateLimitSpec)

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