v2beta2

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

+k8s:deepcopy-gen=package +groupName=apisix.apache.org

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var (
	SchemeGroupVersion = schema.GroupVersion{
		Group:   _groupName,
		Version: _version,
	}
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)

Functions

func Resource

func Resource(resource string) schema.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"`
}

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 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       []v2alpha1.ApisixRouteHTTPBackend `json:"backends,omitempty" yaml:"backends,omitempty"`
	Websocket      bool                              `json:"websocket" yaml:"websocket"`
	Plugins        []ApisixRouteHTTPPlugin           `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 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 []v2alpha1.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 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 ApisixRouteHTTPPlugin

type ApisixRouteHTTPPlugin 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 ApisixRouteHTTPPluginConfig `json:"config" yaml:"config"`
}

ApisixRouteHTTPPlugin represents an APISIX plugin.

func (*ApisixRouteHTTPPlugin) DeepCopy

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

func (*ApisixRouteHTTPPlugin) DeepCopyInto

func (in *ApisixRouteHTTPPlugin) DeepCopyInto(out *ApisixRouteHTTPPlugin)

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

type ApisixRouteHTTPPluginConfig

type ApisixRouteHTTPPluginConfig map[string]interface{}

ApisixRouteHTTPPluginConfig is the configuration for any plugins.

func (*ApisixRouteHTTPPluginConfig) DeepCopy

func (ApisixRouteHTTPPluginConfig) DeepCopyInto

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 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"`
}

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