v2alpha1

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: 7 Imported by: 0

Documentation

Overview

+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

View Source
const (
	// OpEqual means the equal ("==") operator in nginxVars.
	OpEqual = "Equal"
	// OpNotEqual means the not equal ("~=") operator in nginxVars.
	OpNotEqual = "NotEqual"
	// OpGreaterThan means the greater than (">") operator in nginxVars.
	OpGreaterThan = "GreaterThan"
	// OpGreaterThanEqual means the greater than (">=") operator in nginxVars.
	OpGreaterThanEqual = "GreaterThanEqual"
	// OpLessThan means the less than ("<") operator in nginxVars.
	OpLessThan = "LessThan"
	// OpLessThanEqual means the less than equal ("<=") operator in nginxVars.
	OpLessThanEqual = "LessThanEqual"
	// OpRegexMatch means the regex match ("~~") operator in nginxVars.
	OpRegexMatch = "RegexMatch"
	// OpRegexNotMatch means the regex not match ("!~~") operator in nginxVars.
	OpRegexNotMatch = "RegexNotMatch"
	// OpRegexMatchCaseInsensitive means the regex match "~*" (case insensitive mode) operator in nginxVars.
	OpRegexMatchCaseInsensitive = "RegexMatchCaseInsensitive"
	// OpRegexNotMatchCaseInsensitive means the regex not match "!~*" (case insensitive mode) operator in nginxVars.
	OpRegexNotMatchCaseInsensitive = "RegexNotMatchCaseInsensitive"
	// OpIn means the in operator ("in") in nginxVars.
	OpIn = "In"
	// OpNotIn means the not in operator ("not_in") in nginxVars.
	OpNotIn = "NotIn"

	// ScopeQuery means the route match expression subject is in the querystring.
	ScopeQuery = "Query"
	// ScopeHeader means the route match expression subject is in request headers.
	ScopeHeader = "Header"
	// ScopePath means the route match expression subject is the uri path.
	ScopePath = "Path"
	// ScopeCookie means the route match expression subject is in cookie.
	ScopeCookie = "Cookie"
)

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 ApisixClusterAdminConfig added in v1.0.0

type ApisixClusterAdminConfig struct {
	// BaseURL is the base URL for the APISIX Admin API.
	// It looks like "http://apisix-admin.default.svc.cluster.local:9080/apisix/admin"
	BaseURL string `json:"baseURL" yaml:"baseURL"`
	// AdminKey is used to verify the admin API user.
	AdminKey string `json:"adminKey" yaml:"adminKey"`
	// ClientTimeout is request timeout for the APISIX Admin API client
	ClientTimeout types.TimeDuration `json:"clientTimeout" yaml:"clientTimeout"`
}

ApisixClusterAdminConfig is the admin config for the corresponding APISIX Cluster.

func (*ApisixClusterAdminConfig) DeepCopy added in v1.0.0

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

func (*ApisixClusterAdminConfig) DeepCopyInto added in v1.0.0

func (in *ApisixClusterAdminConfig) DeepCopyInto(out *ApisixClusterAdminConfig)

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

type ApisixClusterConfig added in v1.0.0

type ApisixClusterConfig struct {
	metav1.TypeMeta   `json:",inline" yaml:",inline"`
	metav1.ObjectMeta `json:"metadata" yaml:"metadata"`

	// Spec defines the desired state of ApisixClusterConfigSpec.
	Spec   ApisixClusterConfigSpec `json:"spec" yaml:"spec"`
	Status ApisixStatus            `json:"status,omitempty" yaml:"status,omitempty"`
}

ApisixClusterConfig is the Schema for the ApisixClusterConfig resource. An ApisixClusterConfig is used to identify an APISIX cluster, it's a ClusterScoped resource so the name is unique. It also contains some cluster-level configurations like monitoring.

func (*ApisixClusterConfig) DeepCopy added in v1.0.0

func (in *ApisixClusterConfig) DeepCopy() *ApisixClusterConfig

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

func (*ApisixClusterConfig) DeepCopyInto added in v1.0.0

func (in *ApisixClusterConfig) DeepCopyInto(out *ApisixClusterConfig)

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

func (*ApisixClusterConfig) DeepCopyObject added in v1.0.0

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

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

type ApisixClusterConfigList added in v1.0.0

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

	Items []ApisixClusterConfig `json:"items" yaml:"items"`
}

ApisixClusterConfigList contains a list of ApisixClusterConfig.

func (*ApisixClusterConfigList) DeepCopy added in v1.0.0

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

func (*ApisixClusterConfigList) DeepCopyInto added in v1.0.0

func (in *ApisixClusterConfigList) DeepCopyInto(out *ApisixClusterConfigList)

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

func (*ApisixClusterConfigList) DeepCopyObject added in v1.0.0

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

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

type ApisixClusterConfigSpec added in v1.0.0

type ApisixClusterConfigSpec struct {
	// Monitoring categories all monitoring related features.
	// +optional
	Monitoring *ApisixClusterMonitoringConfig `json:"monitoring" yaml:"monitoring"`
	// Admin contains the Admin API information about APISIX cluster.
	// +optional
	Admin *ApisixClusterAdminConfig `json:"admin" yaml:"admin"`
}

ApisixClusterConfigSpec defines the desired state of ApisixClusterConfigSpec.

func (*ApisixClusterConfigSpec) DeepCopy added in v1.0.0

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

func (*ApisixClusterConfigSpec) DeepCopyInto added in v1.0.0

func (in *ApisixClusterConfigSpec) DeepCopyInto(out *ApisixClusterConfigSpec)

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

type ApisixClusterMonitoringConfig added in v1.0.0

type ApisixClusterMonitoringConfig struct {
	// Prometheus is the config for using Prometheus in APISIX Cluster.
	// +optional
	Prometheus ApisixClusterPrometheusConfig `json:"prometheus" yaml:"prometheus"`
	// Skywalking is the config for using Skywalking in APISIX Cluster.
	// +optional
	Skywalking ApisixClusterSkywalkingConfig `json:"skywalking" yaml:"skywalking"`
}

ApisixClusterMonitoringConfig categories all monitoring related features.

func (*ApisixClusterMonitoringConfig) DeepCopy added in v1.0.0

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

func (*ApisixClusterMonitoringConfig) DeepCopyInto added in v1.0.0

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

type ApisixClusterPrometheusConfig added in v1.0.0

type ApisixClusterPrometheusConfig struct {
	// Enable means whether enable Prometheus or not.
	Enable bool `json:"enable" yaml:"enable"`
}

ApisixClusterPrometheusConfig is the config for using Prometheus in APISIX Cluster.

func (*ApisixClusterPrometheusConfig) DeepCopy added in v1.0.0

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

func (*ApisixClusterPrometheusConfig) DeepCopyInto added in v1.0.0

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

type ApisixClusterSkywalkingConfig added in v1.0.0

type ApisixClusterSkywalkingConfig struct {
	// Enable means whether enable Skywalking or not.
	Enable bool `json:"enable" yaml:"enable"`
	// SampleRatio means the ratio to collect
	SampleRatio float64 `json:"sampleRatio" yaml:"sampleRatio"`
}

ApisixClusterSkywalkingConfig is the config for using Skywalking in APISIX Cluster.

func (*ApisixClusterSkywalkingConfig) DeepCopy added in v1.0.0

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

func (*ApisixClusterSkywalkingConfig) DeepCopyInto added in v1.0.0

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

type ApisixConsumer added in v1.0.0

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

ApisixConsumer is the Schema for the ApisixConsumer resource. An ApisixConsumer is used to identify a consumer.

func (*ApisixConsumer) DeepCopy added in v1.0.0

func (in *ApisixConsumer) DeepCopy() *ApisixConsumer

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

func (*ApisixConsumer) DeepCopyInto added in v1.0.0

func (in *ApisixConsumer) DeepCopyInto(out *ApisixConsumer)

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

func (*ApisixConsumer) DeepCopyObject added in v1.0.0

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

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

type ApisixConsumerAuthParameter added in v1.0.0

type ApisixConsumerAuthParameter struct {
	BasicAuth *ApisixConsumerBasicAuth `json:"basicAuth,omitempty" yaml:"basicAuth"`
	KeyAuth   *ApisixConsumerKeyAuth   `json:"keyAuth,omitempty" yaml:"keyAuth"`
}

func (*ApisixConsumerAuthParameter) DeepCopy added in v1.0.0

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

func (*ApisixConsumerAuthParameter) DeepCopyInto added in v1.0.0

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

type ApisixConsumerBasicAuth added in v1.0.0

type ApisixConsumerBasicAuth struct {
	SecretRef *corev1.LocalObjectReference  `json:"secretRef,omitempty" yaml:"secretRef,omitempty"`
	Value     *ApisixConsumerBasicAuthValue `json:"value,omitempty" yaml:"value,omitempty"`
}

ApisixConsumerBasicAuth defines the configuration for basic auth.

func (*ApisixConsumerBasicAuth) DeepCopy added in v1.0.0

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

func (*ApisixConsumerBasicAuth) DeepCopyInto added in v1.0.0

func (in *ApisixConsumerBasicAuth) DeepCopyInto(out *ApisixConsumerBasicAuth)

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

type ApisixConsumerBasicAuthValue added in v1.0.0

type ApisixConsumerBasicAuthValue struct {
	Username string `json:"username" yaml:"username"`
	Password string `json:"password" yaml:"username"`
}

ApisixConsumerBasicAuthValue defines the in-place username and password configuration for basic auth.

func (*ApisixConsumerBasicAuthValue) DeepCopy added in v1.0.0

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

func (*ApisixConsumerBasicAuthValue) DeepCopyInto added in v1.0.0

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

type ApisixConsumerKeyAuth added in v1.0.0

type ApisixConsumerKeyAuth struct {
	SecretRef *corev1.LocalObjectReference `json:"secretRef,omitempty" yaml:"secretRef,omitempty"`
	Value     *ApisixConsumerKeyAuthValue  `json:"value,omitempty" yaml:"value,omitempty"`
}

ApisixConsumerKeyAuth defines the configuration for the key auth.

func (*ApisixConsumerKeyAuth) DeepCopy added in v1.0.0

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

func (*ApisixConsumerKeyAuth) DeepCopyInto added in v1.0.0

func (in *ApisixConsumerKeyAuth) DeepCopyInto(out *ApisixConsumerKeyAuth)

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

type ApisixConsumerKeyAuthValue added in v1.0.0

type ApisixConsumerKeyAuthValue struct {
	Key string `json:"key" yaml:"key"`
}

ApisixConsumerKeyAuthValue defines the in-place configuration for basic auth.

func (*ApisixConsumerKeyAuthValue) DeepCopy added in v1.0.0

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

func (*ApisixConsumerKeyAuthValue) DeepCopyInto added in v1.0.0

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

type ApisixConsumerList added in v1.0.0

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

ApisixConsumerList contains a list of ApisixConsumer.

func (*ApisixConsumerList) DeepCopy added in v1.0.0

func (in *ApisixConsumerList) DeepCopy() *ApisixConsumerList

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

func (*ApisixConsumerList) DeepCopyInto added in v1.0.0

func (in *ApisixConsumerList) DeepCopyInto(out *ApisixConsumerList)

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

func (*ApisixConsumerList) DeepCopyObject added in v1.0.0

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

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

type ApisixConsumerSpec added in v1.0.0

type ApisixConsumerSpec struct {
	AuthParameter ApisixConsumerAuthParameter `json:"authParameter" yaml:"authParameter"`
}

ApisixConsumerSpec defines the desired state of ApisixConsumer.

func (*ApisixConsumerSpec) DeepCopy added in v1.0.0

func (in *ApisixConsumerSpec) DeepCopy() *ApisixConsumerSpec

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

func (*ApisixConsumerSpec) DeepCopyInto added in v1.0.0

func (in *ApisixConsumerSpec) DeepCopyInto(out *ApisixConsumerSpec)

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

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 added in v1.0.0

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 added in v1.0.0

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

func (*ApisixRouteAuthentication) DeepCopyInto added in v1.0.0

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

type ApisixRouteAuthenticationKeyAuth added in v1.0.0

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

ApisixRouteAuthenticationKeyAuth is the keyAuth-related configuration in ApisixRouteAuthentication.

func (*ApisixRouteAuthenticationKeyAuth) DeepCopy added in v1.0.0

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

func (*ApisixRouteAuthenticationKeyAuth) DeepCopyInto added in v1.0.0

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"`
	// Deprecated: Backend will be removed in the future, use Backends instead.
	Backend *ApisixRouteHTTPBackend `json:"backend,omitempty" yaml:"backend,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"`
	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 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 added in v1.0.0

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 added in v1.0.0

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

func (*ApisixRouteHTTPMatchExpr) DeepCopyInto added in v1.0.0

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 added in v1.0.0

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 added in v1.0.0

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

func (*ApisixRouteHTTPMatchExprSubject) DeepCopyInto added in v1.0.0

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.
	// TODO we may use protobuf to define it.
	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"`
	TCP  []*ApisixRouteTCP  `json:"tcp,omitempty" yaml:"tcp,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 ApisixRouteTCP added in v1.0.0

type ApisixRouteTCP struct {
	// The rule name, cannot be empty.
	Name    string                `json:"name" yaml:"name"`
	Match   ApisixRouteTCPMatch   `json:"match" yaml:"match"`
	Backend ApisixRouteTCPBackend `json:"backend" yaml:"backend"`
}

ApisixRouteTCP is the configuration for tcp route.

func (*ApisixRouteTCP) DeepCopy added in v1.0.0

func (in *ApisixRouteTCP) DeepCopy() *ApisixRouteTCP

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

func (*ApisixRouteTCP) DeepCopyInto added in v1.0.0

func (in *ApisixRouteTCP) DeepCopyInto(out *ApisixRouteTCP)

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

type ApisixRouteTCPBackend added in v1.0.0

type ApisixRouteTCPBackend 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" yaml:"resolveGranularity"`
	// Subset specifies a subset for the target Service. The subset should be pre-defined
	// in ApisixUpstream about this service.
	Subset string `json:"subset" yaml:"subset"`
}

ApisixRouteTCPBackend represents a TCP backend (a Kubernetes Service).

func (*ApisixRouteTCPBackend) DeepCopy added in v1.0.0

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

func (*ApisixRouteTCPBackend) DeepCopyInto added in v1.0.0

func (in *ApisixRouteTCPBackend) DeepCopyInto(out *ApisixRouteTCPBackend)

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

type ApisixRouteTCPMatch added in v1.0.0

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

ApisixRouteTCPMatch represents the match conditions of tcp route.

func (*ApisixRouteTCPMatch) DeepCopy added in v1.0.0

func (in *ApisixRouteTCPMatch) DeepCopy() *ApisixRouteTCPMatch

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

func (*ApisixRouteTCPMatch) DeepCopyInto added in v1.0.0

func (in *ApisixRouteTCPMatch) DeepCopyInto(out *ApisixRouteTCPMatch)

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

type ApisixStatus added in v1.0.0

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

ApisixStatus is the status report for Apisix ingress Resources

func (*ApisixStatus) DeepCopy added in v1.0.0

func (in *ApisixStatus) DeepCopy() *ApisixStatus

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

func (*ApisixStatus) DeepCopyInto added in v1.0.0

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 added in v1.3.0

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 added in v1.3.0

func (in *UpstreamTimeout) DeepCopy() *UpstreamTimeout

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

func (*UpstreamTimeout) DeepCopyInto added in v1.3.0

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