v1alpha1

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Overview

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

Index

Constants

View Source
const (
	RateLimitStagePREAUTH  RateLimitStage = "PREAUTH"
	RateLimitStagePOSTAUTH RateLimitStage = "POSTAUTH"
	RateLimitStageBOTH     RateLimitStage = "BOTH"

	NetworkingRefTypeHR NetworkingRefType = "HTTPRoute"
	NetworkingRefTypeVS NetworkingRefType = "VirtualService"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "apim.kuadrant.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
)
View Source
var RateLimitStageValue = map[RateLimitStage]int32{
	"PREAUTH":  0,
	"POSTAUTH": 1,
}

Functions

This section is empty.

Types

type ActionSpecifier

type ActionSpecifier struct {
	// +optional
	GenericKey *GenericKeySpec `json:"generic_key,omitempty"`
	// +optional
	Metadata *MetadataSpec `json:"metadata,omitempty"`
	// +optional
	RemoteAddress *RemoteAddressSpec `json:"remote_address,omitempty"`
	// +optional
	RequestHeaders *RequestHeadersSpec `json:"request_headers,omitempty"`
}

Action_Specifier defines one envoy rate limit action

func (*ActionSpecifier) DeepCopy

func (in *ActionSpecifier) DeepCopy() *ActionSpecifier

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

func (*ActionSpecifier) DeepCopyInto

func (in *ActionSpecifier) DeepCopyInto(out *ActionSpecifier)

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

type GenericKeySpec

type GenericKeySpec struct {
	DescriptorValue string `json:"descriptor_value"`
	// +optional
	DescriptorKey *string `json:"descriptor_key,omitempty"`
}

func (*GenericKeySpec) DeepCopy

func (in *GenericKeySpec) DeepCopy() *GenericKeySpec

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

func (*GenericKeySpec) DeepCopyInto

func (in *GenericKeySpec) DeepCopyInto(out *GenericKeySpec)

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

type MetadataKeySpec

type MetadataKeySpec struct {
	Key  string                `json:"key"`
	Path []MetadataPathSegment `json:"path"`
}

func (*MetadataKeySpec) DeepCopy

func (in *MetadataKeySpec) DeepCopy() *MetadataKeySpec

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

func (*MetadataKeySpec) DeepCopyInto

func (in *MetadataKeySpec) DeepCopyInto(out *MetadataKeySpec)

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

type MetadataPathSegment

type MetadataPathSegment struct {
	Key string `json:"key"`
}

func (*MetadataPathSegment) DeepCopy

func (in *MetadataPathSegment) DeepCopy() *MetadataPathSegment

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

func (*MetadataPathSegment) DeepCopyInto

func (in *MetadataPathSegment) DeepCopyInto(out *MetadataPathSegment)

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

type MetadataSpec

type MetadataSpec struct {
	DescriptorKey string          `json:"descriptor_key"`
	MetadataKey   MetadataKeySpec `json:"metadata_key"`
	// +optional
	DefaultValue *string `json:"default_value,omitempty"`
	// +optional
	Source *MetadataSource `json:"source,omitempty"`
}

func (*MetadataSpec) DeepCopy

func (in *MetadataSpec) DeepCopy() *MetadataSpec

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

func (*MetadataSpec) DeepCopyInto

func (in *MetadataSpec) DeepCopyInto(out *MetadataSpec)

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

type NetworkingRef

type NetworkingRef struct {
	Type NetworkingRefType `json:"type"`
	Name string            `json:"name"`
}

func (*NetworkingRef) DeepCopy

func (in *NetworkingRef) DeepCopy() *NetworkingRef

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

func (*NetworkingRef) DeepCopyInto

func (in *NetworkingRef) DeepCopyInto(out *NetworkingRef)

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

type NetworkingRefType

type NetworkingRefType string

+kubebuilder:validation:Enum=HTTPRoute;VirtualService

type ObjectRefStatus

type ObjectRefStatus struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
}

func (*ObjectRefStatus) DeepCopy

func (in *ObjectRefStatus) DeepCopy() *ObjectRefStatus

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

func (*ObjectRefStatus) DeepCopyInto

func (in *ObjectRefStatus) DeepCopyInto(out *ObjectRefStatus)

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

type RateLimit

type RateLimit struct {
	// Definfing phase at which rate limits will be applied.
	// Valid values are: PREAUTH, POSTAUTH, BOTH
	Stage RateLimitStage `json:"stage"`
	// +optional
	Actions []*ActionSpecifier `json:"actions,omitempty"`
}

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.

type RateLimitPolicy

type RateLimitPolicy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   RateLimitPolicySpec   `json:"spec,omitempty"`
	Status RateLimitPolicyStatus `json:"status,omitempty"`
}

RateLimitPolicy is the Schema for the ratelimitpolicies API

func (*RateLimitPolicy) DeepCopy

func (in *RateLimitPolicy) DeepCopy() *RateLimitPolicy

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

func (*RateLimitPolicy) DeepCopyInto

func (in *RateLimitPolicy) DeepCopyInto(out *RateLimitPolicy)

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

func (*RateLimitPolicy) DeepCopyObject

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

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

type RateLimitPolicyList

type RateLimitPolicyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []RateLimitPolicy `json:"items"`
}

RateLimitPolicyList contains a list of RateLimitPolicy

func (*RateLimitPolicyList) DeepCopy

func (in *RateLimitPolicyList) DeepCopy() *RateLimitPolicyList

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

func (*RateLimitPolicyList) DeepCopyInto

func (in *RateLimitPolicyList) DeepCopyInto(out *RateLimitPolicyList)

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

func (*RateLimitPolicyList) DeepCopyObject

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

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

type RateLimitPolicySpec

type RateLimitPolicySpec struct {
	// route specific staging and actions
	//+listType=map
	//+listMapKey=name
	Routes []Route `json:"routes,omitempty"`

	// RateLimits are used for all of the matching rules
	// +optional
	RateLimits []*RateLimit                      `json:"rateLimits,omitempty"`
	Limits     []limitadorv1alpha1.RateLimitSpec `json:"limits,omitempty"`
}

RateLimitPolicySpec defines the desired state of RateLimitPolicy

func (*RateLimitPolicySpec) DeepCopy

func (in *RateLimitPolicySpec) DeepCopy() *RateLimitPolicySpec

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

func (*RateLimitPolicySpec) DeepCopyInto

func (in *RateLimitPolicySpec) DeepCopyInto(out *RateLimitPolicySpec)

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

type RateLimitPolicyStatus

type RateLimitPolicyStatus struct {
	// VirtualServices represents the current VirtualService objects with reference to this ratelimitpolicy object
	// +optional
	VirtualServices []VirtualServicesStatus `json:"virtualservices,omitempty"`
}

RateLimitPolicyStatus defines the observed state of RateLimitPolicy

func (*RateLimitPolicyStatus) AddVirtualService

func (r *RateLimitPolicyStatus) AddVirtualService(vs *istiov1alpha3.VirtualService) bool

AddVirtualService Adds virtualservice to the list of objects only if it does not exit. Returns true when added.

func (*RateLimitPolicyStatus) DeepCopy

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

func (*RateLimitPolicyStatus) DeepCopyInto

func (in *RateLimitPolicyStatus) DeepCopyInto(out *RateLimitPolicyStatus)

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

func (*RateLimitPolicyStatus) DeleteVirtualService

func (r *RateLimitPolicyStatus) DeleteVirtualService(vs *istiov1alpha3.VirtualService) bool

DeleteVirtualService removes virtualservice from the list of objects only if it does exit. Returns true when deleted from the list.

type RateLimitStage

type RateLimitStage string

+kubebuilder:validation:Enum=PREAUTH;POSTAUTH;BOTH

type RemoteAddressSpec

type RemoteAddressSpec struct {
}

RemoteAddressSpec no need to specify descriptor entry is populated using the trusted address from [x-forwarded-for](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_conn_man/headers#config-http-conn-man-headers-x-forwarded-for)

func (*RemoteAddressSpec) DeepCopy

func (in *RemoteAddressSpec) DeepCopy() *RemoteAddressSpec

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

func (*RemoteAddressSpec) DeepCopyInto

func (in *RemoteAddressSpec) DeepCopyInto(out *RemoteAddressSpec)

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

type RequestHeadersSpec

type RequestHeadersSpec struct {
	HeaderName    string `json:"header_name"`
	DescriptorKey string `json:"descriptor_key"`
	// +optional
	SkipIfAbsent *bool `json:"skip_if_absent,omitempty"`
}

RequestHeadersSpec Rate limit on request headers.

func (*RequestHeadersSpec) DeepCopy

func (in *RequestHeadersSpec) DeepCopy() *RequestHeadersSpec

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

func (*RequestHeadersSpec) DeepCopyInto

func (in *RequestHeadersSpec) DeepCopyInto(out *RequestHeadersSpec)

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

type Route

type Route struct {
	// name of the route present in the virutalservice
	Name string `json:"name"`
	// +optional
	RateLimits []*RateLimit `json:"rateLimits,omitempty"`
}

func (*Route) DeepCopy

func (in *Route) DeepCopy() *Route

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

func (*Route) DeepCopyInto

func (in *Route) DeepCopyInto(out *Route)

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

type VirtualServicesStatus

type VirtualServicesStatus struct {
	Name string `json:"name"`

	// +optional
	Gateways []ObjectRefStatus `json:"gateways,omitempty"`
}

func (*VirtualServicesStatus) DeepCopy

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

func (*VirtualServicesStatus) DeepCopyInto

func (in *VirtualServicesStatus) DeepCopyInto(out *VirtualServicesStatus)

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