v1alpha1

package
v1.4.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API.

Index

Constants

View Source
const (
	// FilterConditionAccepted indicates whether the filter has been accepted or
	// rejected by a targeted resource, and why.
	//
	// Possible reasons for this condition to be True are:
	//
	// * "Accepted"
	//
	// Possible reasons for this condition to be False are:
	//
	// * "Conflicted"
	// * "Invalid"
	// * "TargetNotFound"
	//
	FilterConditionAccepted FilterConditionType = "Accepted"

	// FilterReasonAccepted is used with the "Accepted" condition when the policy
	// has been accepted by the targeted resource.
	FilterReasonAccepted FilterConditionReason = "Accepted"

	// FilterReasonConflicted is used with the "Accepted" condition when the
	// policy has not been accepted by a targeted resource because there is
	// another policy that targets the same resource and a merge is not possible.
	FilterReasonConflicted FilterConditionReason = "Conflicted"

	// FilterReasonInvalid is used with the "Accepted" condition when the policy
	// is syntactically or semantically invalid.
	FilterReasonInvalid FilterConditionReason = "Invalid"

	// FilterReasonTargetNotFound is used with the "Accepted" condition when the
	// policy is attached to an invalid target resource.
	FilterReasonTargetNotFound FilterConditionReason = "TargetNotFound"
)
View Source
const GroupName = "extension.gateway.flomesh.io"

GroupName specifies the group name used to register the objects.

Variables

View Source
var (
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	// Deprecated: use Install instead
	AddToScheme = localSchemeBuilder.AddToScheme
	Install     = localSchemeBuilder.AddToScheme
)
View Source
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}

GroupVersion specifies the group and the version used to register the objects.

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Filter

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

	// Spec defines the desired state of Filter.
	Spec FilterSpec `json:"spec,omitempty"`

	// Status defines the current state of Filter.
	Status FilterStatus `json:"status,omitempty"`
}

Filter provides a way to configure filters for HTTP/HTTPS/GRPC/GRPCS/TCP protocols +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:storageversion +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:scope=Namespaced,categories=gateway-api +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +kubebuilder:metadata:labels={app.kubernetes.io/name=flomesh.io}

func (*Filter) DeepCopy

func (in *Filter) DeepCopy() *Filter

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

func (*Filter) DeepCopyInto

func (in *Filter) DeepCopyInto(out *Filter)

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

func (*Filter) DeepCopyObject

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

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

type FilterConditionReason

type FilterConditionReason string

FilterConditionReason is a reason for a policy condition.

type FilterConditionType

type FilterConditionType string

FilterConditionType is a type of condition for a filter. This type should be used with a Filter resource Status.Conditions field.

type FilterList

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

FilterList contains a list of Filter

func (*FilterList) DeepCopy

func (in *FilterList) DeepCopy() *FilterList

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

func (*FilterList) DeepCopyInto

func (in *FilterList) DeepCopyInto(out *FilterList)

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

func (*FilterList) DeepCopyObject

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

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

type FilterProtocol

type FilterProtocol string

FilterProtocol defines the protocol of filter

const (
	// FilterProtocolHTTP is the type of filter for HTTP/HTTPS/GRPC/GRPCS protocols
	FilterProtocolHTTP FilterProtocol = "http"

	// FilterProtocolTCP is the type of filter for TCP protocol
	FilterProtocolTCP FilterProtocol = "tcp"
)

type FilterSpec

type FilterSpec struct {
	// Protocol is the protocol of filter
	// +kubebuilder:default=http
	// +kubebuilder:validation:Enum=http;tcp
	Protocol FilterProtocol `json:"protocol"`

	// Type is the type of the filter in PascalCase, it should be unique within the namespace
	// +kubebuilder:validation:Pattern=`^[A-Z](([a-z0-9]+[A-Z]?)*)$`
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=63
	Type string `json:"type"`

	// Script is the list of scripts to be executed, key is the script name and value is the script content
	// +kubebuilder:validation:MinLength=1
	Script string `json:"script"`

	// Config is the list of configurations to be used by the filter
	Config map[string]string `json:"config,omitempty"`
}

FilterSpec defines the desired state of Filter

func (*FilterSpec) DeepCopy

func (in *FilterSpec) DeepCopy() *FilterSpec

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

func (*FilterSpec) DeepCopyInto

func (in *FilterSpec) DeepCopyInto(out *FilterSpec)

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

type FilterStatus

type FilterStatus struct {
	// Conditions describes the status of the Filter with respect to the given Ancestor.
	//
	// +listType=map
	// +listMapKey=type
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:MaxItems=8
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

FilterStatus defines the common attributes that all filters should include within their status.

func (*FilterStatus) DeepCopy

func (in *FilterStatus) DeepCopy() *FilterStatus

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

func (*FilterStatus) DeepCopyInto

func (in *FilterStatus) DeepCopyInto(out *FilterStatus)

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