v2

package
v1.37.0 Latest Latest
Warning

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

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

Documentation

Overview

Package v2 is the v2 version of the API. +groupName=apisix.apache.org

Index

Constants

This section is empty.

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: apisix.GroupName, Version: "v2"}

SchemeGroupVersion is group version used to register these objects

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 ApisixRoute

type ApisixRoute struct {
	metav1.TypeMeta   `json:",inline" yaml:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`
	Spec              ApisixRouteSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
	Status            ApisixStatus    `json:"status,omitempty" yaml:"status,omitempty"`
}

+genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:subresource:status ApisixRoute is used to define the route rules and upstreams for Apache APISIX.

func (*ApisixRoute) DeepCopy

func (in *ApisixRoute) DeepCopy() *ApisixRoute

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

func (*ApisixRoute) DeepCopyInto

func (in *ApisixRoute) DeepCopyInto(out *ApisixRoute)

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

func (*ApisixRoute) DeepCopyObject

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

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

type ApisixRouteAuthentication

type ApisixRouteAuthentication struct {
	Enable  bool                             `json:"enable" yaml:"enable"`
	Type    string                           `json:"type" yaml:"type"`
	KeyAuth ApisixRouteAuthenticationKeyAuth `json:"keyAuth,omitempty" yaml:"keyAuth,omitempty"`
	JwtAuth ApisixRouteAuthenticationJwtAuth `json:"jwtAuth,omitempty" yaml:"jwtAuth,omitempty"`
}

ApisixRouteAuthentication is the authentication-related configuration in ApisixRoute.

func (*ApisixRouteAuthentication) DeepCopy

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

func (*ApisixRouteAuthentication) DeepCopyInto

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

type ApisixRouteAuthenticationJwtAuth

type ApisixRouteAuthenticationJwtAuth struct {
	Header string `json:"header,omitempty" yaml:"header,omitempty"`
	Query  string `json:"query,omitempty" yaml:"query,omitempty"`
	Cookie string `json:"cookie,omitempty" yaml:"cookie,omitempty"`
}

ApisixRouteAuthenticationJwtAuth is the jwt auth related configuration in ApisixRouteAuthentication.

func (*ApisixRouteAuthenticationJwtAuth) DeepCopy

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

func (*ApisixRouteAuthenticationJwtAuth) DeepCopyInto

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

type ApisixRouteAuthenticationKeyAuth

type ApisixRouteAuthenticationKeyAuth struct {
	Header string `json:"header,omitempty" yaml:"header,omitempty"`
}

ApisixRouteAuthenticationKeyAuth is the keyAuth-related configuration in ApisixRouteAuthentication.

func (*ApisixRouteAuthenticationKeyAuth) DeepCopy

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

func (*ApisixRouteAuthenticationKeyAuth) DeepCopyInto

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

type ApisixRouteHTTP

type ApisixRouteHTTP struct {
	// The rule name, cannot be empty.
	Name string `json:"name" yaml:"name"`
	// Route priority, when multiple routes contains
	// same URI path (for path matching), route with
	// higher priority will take effect.
	Priority int                  `json:"priority,omitempty" yaml:"priority,omitempty"`
	Timeout  *UpstreamTimeout     `json:"timeout,omitempty" yaml:"timeout,omitempty"`
	Match    ApisixRouteHTTPMatch `json:"match,omitempty" yaml:"match,omitempty"`
	// Backends represents potential backends to proxy after the route
	// rule matched. When number of backends are more than one, traffic-split
	// plugin in APISIX will be used to split traffic based on the backend weight.
	Backends         []ApisixRouteHTTPBackend   `json:"backends,omitempty" yaml:"backends,omitempty"`
	Websocket        bool                       `json:"websocket" yaml:"websocket"`
	PluginConfigName string                     `json:"plugin_config_name,omitempty" yaml:"plugin_config_name,omitempty"`
	Plugins          []ApisixRoutePlugin        `json:"plugins,omitempty" yaml:"plugins,omitempty"`
	Authentication   *ApisixRouteAuthentication `json:"authentication,omitempty" yaml:"authentication,omitempty"`
}

ApisixRouteHTTP represents a single route in for HTTP traffic.

func (*ApisixRouteHTTP) DeepCopy

func (in *ApisixRouteHTTP) DeepCopy() *ApisixRouteHTTP

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

func (*ApisixRouteHTTP) DeepCopyInto

func (in *ApisixRouteHTTP) DeepCopyInto(out *ApisixRouteHTTP)

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

type ApisixRouteHTTPBackend

type ApisixRouteHTTPBackend struct {
	// The name (short) of the service, note cross namespace is forbidden,
	// so be sure the ApisixRoute and Service are in the same namespace.
	ServiceName string `json:"serviceName" yaml:"serviceName"`
	// The service port, could be the name or the port number.
	ServicePort intstr.IntOrString `json:"servicePort" yaml:"servicePort"`
	// The resolve granularity, can be "endpoints" or "service",
	// when set to "endpoints", the pod ips will be used; other
	// wise, the service ClusterIP or ExternalIP will be used,
	// default is endpoints.
	ResolveGranularity string `json:"resolveGranularity,omitempty" yaml:"resolveGranularity,omitempty"`
	// Weight of this backend.
	Weight *int `json:"weight" yaml:"weight"`
	// Subset specifies a subset for the target Service. The subset should be pre-defined
	// in ApisixUpstream about this service.
	Subset string `json:"subset,omitempty" yaml:"subset,omitempty"`
}

ApisixRouteHTTPBackend represents a HTTP backend (a Kuberentes Service).

func (*ApisixRouteHTTPBackend) DeepCopy

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

func (*ApisixRouteHTTPBackend) DeepCopyInto

func (in *ApisixRouteHTTPBackend) DeepCopyInto(out *ApisixRouteHTTPBackend)

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

type ApisixRouteHTTPMatch

type ApisixRouteHTTPMatch struct {
	// URI path predicates, at least one path should be
	// configured, path could be exact or prefix, for prefix path,
	// append "*" after it, for instance, "/foo*".
	Paths []string `json:"paths" yaml:"paths"`
	// HTTP request method predicates.
	Methods []string `json:"methods,omitempty" yaml:"methods,omitempty"`
	// HTTP Host predicates, host can be a wildcard domain or
	// an exact domain. For wildcard domain, only one generic
	// level is allowed, for instance, "*.foo.com" is valid but
	// "*.*.foo.com" is not.
	Hosts []string `json:"hosts,omitempty" yaml:"hosts,omitempty"`
	// Remote address predicates, items can be valid IPv4 address
	// or IPv6 address or CIDR.
	RemoteAddrs []string `json:"remoteAddrs,omitempty" yaml:"remoteAddrs,omitempty"`
	// NginxVars represents generic match predicates,
	// it uses Nginx variable systems, so any predicate
	// like headers, querystring and etc can be leveraged
	// here to match the route.
	// For instance, it can be:
	// nginxVars:
	//   - subject: "$remote_addr"
	//     op: in
	//     value:
	//       - "127.0.0.1"
	//       - "10.0.5.11"
	NginxVars []ApisixRouteHTTPMatchExpr `json:"exprs,omitempty" yaml:"exprs,omitempty"`
}

ApisixRouteHTTPMatch represents the match condition for hitting this route.

func (*ApisixRouteHTTPMatch) DeepCopy

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

func (*ApisixRouteHTTPMatch) DeepCopyInto

func (in *ApisixRouteHTTPMatch) DeepCopyInto(out *ApisixRouteHTTPMatch)

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

type ApisixRouteHTTPMatchExpr

type ApisixRouteHTTPMatchExpr struct {
	// Subject is the expression subject, it can
	// be any string composed by literals and nginx
	// vars.
	Subject ApisixRouteHTTPMatchExprSubject `json:"subject" yaml:"subject"`
	// Op is the operator.
	Op string `json:"op" yaml:"op"`
	// Set is an array type object of the expression.
	// It should be used when the Op is "in" or "not_in";
	Set []string `json:"set" yaml:"set"`
	// Value is the normal type object for the expression,
	// it should be used when the Op is not "in" and "not_in".
	// Set and Value are exclusive so only of them can be set
	// in the same time.
	Value *string `json:"value" yaml:"value"`
}

ApisixRouteHTTPMatchExpr represents a binary route match expression .

func (*ApisixRouteHTTPMatchExpr) DeepCopy

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

func (*ApisixRouteHTTPMatchExpr) DeepCopyInto

func (in *ApisixRouteHTTPMatchExpr) DeepCopyInto(out *ApisixRouteHTTPMatchExpr)

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

type ApisixRouteHTTPMatchExprSubject

type ApisixRouteHTTPMatchExprSubject struct {
	// The subject scope, can be:
	// ScopeQuery, ScopeHeader, ScopePath
	// when subject is ScopePath, Name field
	// will be ignored.
	Scope string `json:"scope" yaml:"scope"`
	// The name of subject.
	Name string `json:"name" yaml:"name"`
}

ApisixRouteHTTPMatchExprSubject describes the route match expression subject.

func (*ApisixRouteHTTPMatchExprSubject) DeepCopy

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

func (*ApisixRouteHTTPMatchExprSubject) DeepCopyInto

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

type ApisixRouteList

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

ApisixRouteList contains a list of ApisixRoute.

func (*ApisixRouteList) DeepCopy

func (in *ApisixRouteList) DeepCopy() *ApisixRouteList

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

func (*ApisixRouteList) DeepCopyInto

func (in *ApisixRouteList) DeepCopyInto(out *ApisixRouteList)

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

func (*ApisixRouteList) DeepCopyObject

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

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

type ApisixRoutePlugin

type ApisixRoutePlugin struct {
	// The plugin name.
	Name string `json:"name" yaml:"name"`
	// Whether this plugin is in use, default is true.
	Enable bool `json:"enable" yaml:"enable"`
	// Plugin configuration.
	Config ApisixRoutePluginConfig `json:"config" yaml:"config"`
}

ApisixRoutePlugin represents an APISIX plugin.

func (*ApisixRoutePlugin) DeepCopy

func (in *ApisixRoutePlugin) DeepCopy() *ApisixRoutePlugin

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

func (*ApisixRoutePlugin) DeepCopyInto

func (in *ApisixRoutePlugin) DeepCopyInto(out *ApisixRoutePlugin)

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

type ApisixRoutePluginConfig

type ApisixRoutePluginConfig map[string]interface{}

ApisixRoutePluginConfig is the configuration for any plugins.

func (*ApisixRoutePluginConfig) DeepCopy

func (ApisixRoutePluginConfig) DeepCopyInto

func (p ApisixRoutePluginConfig) DeepCopyInto(out *ApisixRoutePluginConfig)

type ApisixRouteSpec

type ApisixRouteSpec struct {
	HTTP   []ApisixRouteHTTP   `json:"http,omitempty" yaml:"http,omitempty"`
	Stream []ApisixRouteStream `json:"stream,omitempty" yaml:"stream,omitempty"`
}

ApisixRouteSpec is the spec definition for ApisixRouteSpec.

func (*ApisixRouteSpec) DeepCopy

func (in *ApisixRouteSpec) DeepCopy() *ApisixRouteSpec

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

func (*ApisixRouteSpec) DeepCopyInto

func (in *ApisixRouteSpec) DeepCopyInto(out *ApisixRouteSpec)

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

type ApisixRouteStream

type ApisixRouteStream struct {
	// The rule name, cannot be empty.
	Name     string                   `json:"name" yaml:"name"`
	Protocol string                   `json:"protocol" yaml:"protocol"`
	Match    ApisixRouteStreamMatch   `json:"match" yaml:"match"`
	Backend  ApisixRouteStreamBackend `json:"backend" yaml:"backend"`
	Plugins  []ApisixRoutePlugin      `json:"plugins,omitempty" yaml:"plugins,omitempty"`
}

ApisixRouteStream is the configuration for level 4 route

func (*ApisixRouteStream) DeepCopy

func (in *ApisixRouteStream) DeepCopy() *ApisixRouteStream

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

func (*ApisixRouteStream) DeepCopyInto

func (in *ApisixRouteStream) DeepCopyInto(out *ApisixRouteStream)

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

type ApisixRouteStreamBackend

type ApisixRouteStreamBackend struct {
	// The name (short) of the service, note cross namespace is forbidden,
	// so be sure the ApisixRoute and Service are in the same namespace.
	ServiceName string `json:"serviceName" yaml:"serviceName"`
	// The service port, could be the name or the port number.
	ServicePort intstr.IntOrString `json:"servicePort" yaml:"servicePort"`
	// The resolve granularity, can be "endpoints" or "service",
	// when set to "endpoints", the pod ips will be used; other
	// wise, the service ClusterIP or ExternalIP will be used,
	// default is endpoints.
	ResolveGranularity string `json:"resolveGranularity,omitempty" yaml:"resolveGranularity,omitempty"`
	// Subset specifies a subset for the target Service. The subset should be pre-defined
	// in ApisixUpstream about this service.
	Subset string `json:"subset,omitempty" yaml:"subset,omitempty"`
}

ApisixRouteStreamBackend represents a TCP backend (a Kubernetes Service).

func (*ApisixRouteStreamBackend) DeepCopy

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

func (*ApisixRouteStreamBackend) DeepCopyInto

func (in *ApisixRouteStreamBackend) DeepCopyInto(out *ApisixRouteStreamBackend)

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

type ApisixRouteStreamMatch

type ApisixRouteStreamMatch struct {
	// IngressPort represents the port listening on the Ingress proxy server.
	// It should be pre-defined as APISIX doesn't support dynamic listening.
	IngressPort int32 `json:"ingressPort" yaml:"ingressPort"`
}

ApisixRouteStreamMatch represents the match conditions of stream route.

func (*ApisixRouteStreamMatch) DeepCopy

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

func (*ApisixRouteStreamMatch) DeepCopyInto

func (in *ApisixRouteStreamMatch) DeepCopyInto(out *ApisixRouteStreamMatch)

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

type ApisixStatus

type ApisixStatus struct {
	Conditions []metav1.Condition `json:"conditions,omitempty" yaml:"conditions,omitempty"`
}

ApisixStatus is the status report for Apisix ingress Resources

func (*ApisixStatus) DeepCopy

func (in *ApisixStatus) DeepCopy() *ApisixStatus

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

func (*ApisixStatus) DeepCopyInto

func (in *ApisixStatus) DeepCopyInto(out *ApisixStatus)

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

type UpstreamTimeout

type UpstreamTimeout struct {
	Connect metav1.Duration `json:"connect,omitempty" yaml:"connect,omitempty"`
	Send    metav1.Duration `json:"send,omitempty" yaml:"send,omitempty"`
	Read    metav1.Duration `json:"read,omitempty" yaml:"read,omitempty"`
}

UpstreamTimeout is settings for the read, send and connect to the upstream.

func (*UpstreamTimeout) DeepCopy

func (in *UpstreamTimeout) DeepCopy() *UpstreamTimeout

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

func (*UpstreamTimeout) DeepCopyInto

func (in *UpstreamTimeout) DeepCopyInto(out *UpstreamTimeout)

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