This is an automated email from the ASF dual-hosted git repository.
zhangjintao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-ingress-controller.git
The following commit(s) were added to refs/heads/master by this push:
new b128bff8 chore: remove v2beta2 API Version (#1431)
b128bff8 is described below
commit b128bff8e39deb8e25734995f3e01f0623fbe0b4
Author: Jintao Zhang <[email protected]>
AuthorDate: Thu Nov 3 11:42:27 2022 +0800
chore: remove v2beta2 API Version (#1431)
---
pkg/api/validation/apisix_consumer.go | 3 -
pkg/api/validation/apisix_route.go | 15 -
pkg/api/validation/apisix_route_test.go | 6 -
pkg/api/validation/apisix_tls.go | 3 -
pkg/api/validation/apisix_upstream.go | 3 -
pkg/config/config.go | 2 -
pkg/kube/apisix/apis/config/v2beta2/doc.go | 18 --
pkg/kube/apisix/apis/config/v2beta2/types.go | 197 ------------
.../apis/config/v2beta2/zz_generated.deepcopy.go | 355 ---------------------
.../apis/config/v2beta2/zz_generated.register.go | 69 ----
.../apisix/client/clientset/versioned/clientset.go | 13 -
.../versioned/fake/clientset_generated.go | 7 -
.../client/clientset/versioned/fake/register.go | 2 -
.../client/clientset/versioned/scheme/register.go | 2 -
.../versioned/typed/config/v2beta2/apisixroute.go | 194 -----------
.../typed/config/v2beta2/config_client.go | 106 ------
.../versioned/typed/config/v2beta2/doc.go | 19 --
.../versioned/typed/config/v2beta2/fake/doc.go | 19 --
.../typed/config/v2beta2/fake/fake_apisixroute.go | 141 --------
.../config/v2beta2/fake/fake_config_client.go | 39 ---
.../typed/config/v2beta2/generated_expansion.go | 20 --
.../informers/externalversions/config/interface.go | 8 -
.../externalversions/config/v2beta2/apisixroute.go | 89 ------
.../externalversions/config/v2beta2/interface.go | 44 ---
.../client/informers/externalversions/generic.go | 5 -
.../client/listers/config/v2beta2/apisixroute.go | 98 ------
.../listers/config/v2beta2/expansion_generated.go | 26 --
pkg/kube/apisix_route.go | 43 +--
pkg/providers/apisix/apisix_route.go | 41 ---
pkg/providers/apisix/provider.go | 1 -
pkg/providers/apisix/translation/apisix_route.go | 257 ---------------
pkg/providers/apisix/translation/translator.go | 7 -
samples/deploy/crd/v1/ApisixRoute.yaml | 260 ---------------
test/e2e/suite-chore/chaos.go | 4 +-
test/e2e/suite-features/scheme.go | 2 +-
utils/update-codegen.sh | 4 +-
utils/verify-codegen.sh | 4 +-
37 files changed, 8 insertions(+), 2118 deletions(-)
diff --git a/pkg/api/validation/apisix_consumer.go
b/pkg/api/validation/apisix_consumer.go
index c79ae705..9224da4f 100644
--- a/pkg/api/validation/apisix_consumer.go
+++ b/pkg/api/validation/apisix_consumer.go
@@ -27,7 +27,6 @@ import (
"github.com/apache/apisix-ingress-controller/pkg/apisix"
v2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2"
-
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta2"
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta3"
"github.com/apache/apisix-ingress-controller/pkg/log"
)
@@ -44,8 +43,6 @@ var ApisixConsumerValidator = kwhvalidating.ValidatorFunc(
var spec interface{}
switch ac := object.(type) {
- case *v2beta2.ApisixRoute:
- spec = ac.Spec
case *v2beta3.ApisixRoute:
spec = ac.Spec
case *v2.ApisixRoute:
diff --git a/pkg/api/validation/apisix_route.go
b/pkg/api/validation/apisix_route.go
index 14df4656..9e8ff72c 100644
--- a/pkg/api/validation/apisix_route.go
+++ b/pkg/api/validation/apisix_route.go
@@ -29,7 +29,6 @@ import (
"github.com/apache/apisix-ingress-controller/pkg/apisix"
v2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2"
-
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta2"
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta3"
"github.com/apache/apisix-ingress-controller/pkg/log"
)
@@ -53,20 +52,6 @@ var ApisixRouteValidator = kwhvalidating.ValidatorFunc(
var spec interface{}
switch ar := object.(type) {
- case *v2beta2.ApisixRoute:
- spec = ar.Spec
-
- // validate plugins
- for _, h := range ar.Spec.HTTP {
- for _, p := range h.Plugins {
- // only check plugins that are enabled.
- if p.Enable {
- plugins = append(plugins,
apisixRoutePlugin{
- p.Name, p.Config,
- })
- }
- }
- }
case *v2beta3.ApisixRoute:
spec = ar.Spec
diff --git a/pkg/api/validation/apisix_route_test.go
b/pkg/api/validation/apisix_route_test.go
index f51ba0a7..c26bda59 100644
--- a/pkg/api/validation/apisix_route_test.go
+++ b/pkg/api/validation/apisix_route_test.go
@@ -22,7 +22,6 @@ import (
"github.com/apache/apisix-ingress-controller/pkg/apisix"
v2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2"
-
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta2"
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta3"
api "github.com/apache/apisix-ingress-controller/pkg/types/apisix/v1"
)
@@ -133,11 +132,6 @@ func Test_validatePlugin(t *testing.T) {
if gotValid != tt.wantValid {
t.Errorf("validatePlugin() gotValid = %v, want
%v", gotValid, tt.wantValid)
}
-
- gotValid, _ = validatePlugin(fakeClient, tt.pluginName,
v2beta2.ApisixRouteHTTPPluginConfig(tt.pluginConfig))
- if gotValid != tt.wantValid {
- t.Errorf("validatePlugin() gotValid = %v, want
%v", gotValid, tt.wantValid)
- }
})
}
}
diff --git a/pkg/api/validation/apisix_tls.go b/pkg/api/validation/apisix_tls.go
index 7ac75d3e..dcea6280 100644
--- a/pkg/api/validation/apisix_tls.go
+++ b/pkg/api/validation/apisix_tls.go
@@ -27,7 +27,6 @@ import (
"github.com/apache/apisix-ingress-controller/pkg/apisix"
v2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2"
-
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta2"
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta3"
"github.com/apache/apisix-ingress-controller/pkg/log"
)
@@ -44,8 +43,6 @@ var ApisixTlsValidator = kwhvalidating.ValidatorFunc(
var spec interface{}
switch at := object.(type) {
- case *v2beta2.ApisixRoute:
- spec = at.Spec
case *v2beta3.ApisixRoute:
spec = at.Spec
case *v2.ApisixRoute:
diff --git a/pkg/api/validation/apisix_upstream.go
b/pkg/api/validation/apisix_upstream.go
index a89b4cdd..b29d73bb 100644
--- a/pkg/api/validation/apisix_upstream.go
+++ b/pkg/api/validation/apisix_upstream.go
@@ -27,7 +27,6 @@ import (
"github.com/apache/apisix-ingress-controller/pkg/apisix"
v2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2"
-
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta2"
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta3"
"github.com/apache/apisix-ingress-controller/pkg/log"
)
@@ -44,8 +43,6 @@ var ApisixUpstreamValidator = kwhvalidating.ValidatorFunc(
var spec interface{}
switch au := object.(type) {
- case *v2beta2.ApisixRoute:
- spec = au.Spec
case *v2beta3.ApisixRoute:
spec = au.Spec
case *v2.ApisixRoute:
diff --git a/pkg/config/config.go b/pkg/config/config.go
index 8e0bc8dd..5daa6ae6 100644
--- a/pkg/config/config.go
+++ b/pkg/config/config.go
@@ -51,8 +51,6 @@ const (
// WARNING: ingress.extensions/v1beta1 is deprecated in v1.14+, and
will be unavilable
// in v1.22.
IngressExtensionsV1beta1 = "extensions/v1beta1"
- // ApisixV2beta2 represents apisix.apache.org/v2beta2
- ApisixV2beta2 = "apisix.apache.org/v2beta2"
// ApisixV2beta3 represents apisix.apache.org/v2beta3
ApisixV2beta3 = "apisix.apache.org/v2beta3"
// ApisixV2 represents apisix.apache.org/v2
diff --git a/pkg/kube/apisix/apis/config/v2beta2/doc.go
b/pkg/kube/apisix/apis/config/v2beta2/doc.go
deleted file mode 100644
index e2040c39..00000000
--- a/pkg/kube/apisix/apis/config/v2beta2/doc.go
+++ /dev/null
@@ -1,18 +0,0 @@
-// 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.
-
-// +k8s:deepcopy-gen=package
-// +groupName=apisix.apache.org
-package v2beta2
diff --git a/pkg/kube/apisix/apis/config/v2beta2/types.go
b/pkg/kube/apisix/apis/config/v2beta2/types.go
deleted file mode 100644
index 5b6337e3..00000000
--- a/pkg/kube/apisix/apis/config/v2beta2/types.go
+++ /dev/null
@@ -1,197 +0,0 @@
-// 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.
-package v2beta2
-
-import (
- "encoding/json"
-
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/util/intstr"
-
- v2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2"
-)
-
-// +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.
-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"`
-}
-
-// ApisixStatus is the status report for Apisix ingress Resources
-type ApisixStatus struct {
- Conditions []metav1.Condition `json:"conditions,omitempty"
yaml:"conditions,omitempty"`
-}
-
-// ApisixRouteSpec is the spec definition for ApisixRouteSpec.
-type ApisixRouteSpec struct {
- HTTP []ApisixRouteHTTP `json:"http,omitempty" yaml:"http,omitempty"`
- Stream []ApisixRouteStream `json:"stream,omitempty"
yaml:"stream,omitempty"`
-}
-
-// UpstreamTimeout is settings for the read, send and connect to the upstream.
-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"`
-}
-
-// ApisixRouteHTTP represents a single route in for HTTP traffic.
-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 []v2.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"`
-}
-
-// ApisixRouteHTTPMatch represents the match condition for hitting this route.
-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 []v2.ApisixRouteHTTPMatchExpr `json:"exprs,omitempty"
yaml:"exprs,omitempty"`
-}
-
-// ApisixRouteHTTPMatchExprSubject describes the route match expression
subject.
-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"`
-}
-
-// ApisixRouteHTTPPlugin represents an APISIX plugin.
-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"`
-}
-
-// ApisixRouteHTTPPluginConfig is the configuration for
-// any plugins.
-type ApisixRouteHTTPPluginConfig map[string]interface{}
-
-// ApisixRouteAuthentication is the authentication-related
-// configuration in ApisixRoute.
-type ApisixRouteAuthentication struct {
- Enable bool `json:"enable" yaml:"enable"`
- Type string `json:"type" yaml:"type"`
- KeyAuth ApisixRouteAuthenticationKeyAuth `json:"keyAuth,omitempty"
yaml:"keyAuth,omitempty"`
-}
-
-// ApisixRouteAuthenticationKeyAuth is the keyAuth-related
-// configuration in ApisixRouteAuthentication.
-type ApisixRouteAuthenticationKeyAuth struct {
- Header string `json:"header,omitempty" yaml:"header,omitempty"`
-}
-
-func (p ApisixRouteHTTPPluginConfig) DeepCopyInto(out
*ApisixRouteHTTPPluginConfig) {
- b, _ := json.Marshal(&p)
- _ = json.Unmarshal(b, out)
-}
-
-func (p *ApisixRouteHTTPPluginConfig) DeepCopy() *ApisixRouteHTTPPluginConfig {
- if p == nil {
- return nil
- }
- out := new(ApisixRouteHTTPPluginConfig)
- p.DeepCopyInto(out)
- return out
-}
-
-// ApisixRouteStream is the configuration for level 4 route
-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"`
-}
-
-// ApisixRouteStreamMatch represents the match conditions of stream route.
-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"`
-}
-
-// ApisixRouteStreamBackend represents a TCP backend (a Kubernetes Service).
-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"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-
-// ApisixRouteList contains a list of ApisixRoute.
-type ApisixRouteList struct {
- metav1.TypeMeta `json:",inline" yaml:",inline"`
- metav1.ListMeta `json:"metadata" yaml:"metadata"`
- Items []ApisixRoute `json:"items,omitempty"
yaml:"items,omitempty"`
-}
diff --git a/pkg/kube/apisix/apis/config/v2beta2/zz_generated.deepcopy.go
b/pkg/kube/apisix/apis/config/v2beta2/zz_generated.deepcopy.go
deleted file mode 100644
index bdd0445c..00000000
--- a/pkg/kube/apisix/apis/config/v2beta2/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,355 +0,0 @@
-//go:build !ignore_autogenerated
-// +build !ignore_autogenerated
-
-// 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.
-
-// Code generated by deepcopy-gen. DO NOT EDIT.
-
-package v2beta2
-
-import (
- v2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
-)
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver,
writing into out. in must be non-nil.
-func (in *ApisixRoute) DeepCopyInto(out *ApisixRoute) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver,
creating a new ApisixRoute.
-func (in *ApisixRoute) DeepCopy() *ApisixRoute {
- if in == nil {
- return nil
- }
- out := new(ApisixRoute)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver,
creating a new runtime.Object.
-func (in *ApisixRoute) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver,
writing into out. in must be non-nil.
-func (in *ApisixRouteAuthentication) DeepCopyInto(out
*ApisixRouteAuthentication) {
- *out = *in
- out.KeyAuth = in.KeyAuth
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver,
creating a new ApisixRouteAuthentication.
-func (in *ApisixRouteAuthentication) DeepCopy() *ApisixRouteAuthentication {
- if in == nil {
- return nil
- }
- out := new(ApisixRouteAuthentication)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver,
writing into out. in must be non-nil.
-func (in *ApisixRouteAuthenticationKeyAuth) DeepCopyInto(out
*ApisixRouteAuthenticationKeyAuth) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver,
creating a new ApisixRouteAuthenticationKeyAuth.
-func (in *ApisixRouteAuthenticationKeyAuth) DeepCopy()
*ApisixRouteAuthenticationKeyAuth {
- if in == nil {
- return nil
- }
- out := new(ApisixRouteAuthenticationKeyAuth)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver,
writing into out. in must be non-nil.
-func (in *ApisixRouteHTTP) DeepCopyInto(out *ApisixRouteHTTP) {
- *out = *in
- if in.Timeout != nil {
- in, out := &in.Timeout, &out.Timeout
- *out = new(UpstreamTimeout)
- **out = **in
- }
- in.Match.DeepCopyInto(&out.Match)
- if in.Backends != nil {
- in, out := &in.Backends, &out.Backends
- *out = make([]v2.ApisixRouteHTTPBackend, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.Plugins != nil {
- in, out := &in.Plugins, &out.Plugins
- *out = make([]ApisixRouteHTTPPlugin, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- out.Authentication = in.Authentication
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver,
creating a new ApisixRouteHTTP.
-func (in *ApisixRouteHTTP) DeepCopy() *ApisixRouteHTTP {
- if in == nil {
- return nil
- }
- out := new(ApisixRouteHTTP)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver,
writing into out. in must be non-nil.
-func (in *ApisixRouteHTTPMatch) DeepCopyInto(out *ApisixRouteHTTPMatch) {
- *out = *in
- if in.Paths != nil {
- in, out := &in.Paths, &out.Paths
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.Methods != nil {
- in, out := &in.Methods, &out.Methods
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.Hosts != nil {
- in, out := &in.Hosts, &out.Hosts
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.RemoteAddrs != nil {
- in, out := &in.RemoteAddrs, &out.RemoteAddrs
- *out = make([]string, len(*in))
- copy(*out, *in)
- }
- if in.NginxVars != nil {
- in, out := &in.NginxVars, &out.NginxVars
- *out = make([]v2.ApisixRouteHTTPMatchExpr, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver,
creating a new ApisixRouteHTTPMatch.
-func (in *ApisixRouteHTTPMatch) DeepCopy() *ApisixRouteHTTPMatch {
- if in == nil {
- return nil
- }
- out := new(ApisixRouteHTTPMatch)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver,
writing into out. in must be non-nil.
-func (in *ApisixRouteHTTPMatchExprSubject) DeepCopyInto(out
*ApisixRouteHTTPMatchExprSubject) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver,
creating a new ApisixRouteHTTPMatchExprSubject.
-func (in *ApisixRouteHTTPMatchExprSubject) DeepCopy()
*ApisixRouteHTTPMatchExprSubject {
- if in == nil {
- return nil
- }
- out := new(ApisixRouteHTTPMatchExprSubject)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver,
writing into out. in must be non-nil.
-func (in *ApisixRouteHTTPPlugin) DeepCopyInto(out *ApisixRouteHTTPPlugin) {
- *out = *in
- in.Config.DeepCopyInto(&out.Config)
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver,
creating a new ApisixRouteHTTPPlugin.
-func (in *ApisixRouteHTTPPlugin) DeepCopy() *ApisixRouteHTTPPlugin {
- if in == nil {
- return nil
- }
- out := new(ApisixRouteHTTPPlugin)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver,
writing into out. in must be non-nil.
-func (in *ApisixRouteList) DeepCopyInto(out *ApisixRouteList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ListMeta.DeepCopyInto(&out.ListMeta)
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]ApisixRoute, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver,
creating a new ApisixRouteList.
-func (in *ApisixRouteList) DeepCopy() *ApisixRouteList {
- if in == nil {
- return nil
- }
- out := new(ApisixRouteList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver,
creating a new runtime.Object.
-func (in *ApisixRouteList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver,
writing into out. in must be non-nil.
-func (in *ApisixRouteSpec) DeepCopyInto(out *ApisixRouteSpec) {
- *out = *in
- if in.HTTP != nil {
- in, out := &in.HTTP, &out.HTTP
- *out = make([]ApisixRouteHTTP, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.Stream != nil {
- in, out := &in.Stream, &out.Stream
- *out = make([]ApisixRouteStream, len(*in))
- copy(*out, *in)
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver,
creating a new ApisixRouteSpec.
-func (in *ApisixRouteSpec) DeepCopy() *ApisixRouteSpec {
- if in == nil {
- return nil
- }
- out := new(ApisixRouteSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver,
writing into out. in must be non-nil.
-func (in *ApisixRouteStream) DeepCopyInto(out *ApisixRouteStream) {
- *out = *in
- out.Match = in.Match
- out.Backend = in.Backend
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver,
creating a new ApisixRouteStream.
-func (in *ApisixRouteStream) DeepCopy() *ApisixRouteStream {
- if in == nil {
- return nil
- }
- out := new(ApisixRouteStream)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver,
writing into out. in must be non-nil.
-func (in *ApisixRouteStreamBackend) DeepCopyInto(out
*ApisixRouteStreamBackend) {
- *out = *in
- out.ServicePort = in.ServicePort
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver,
creating a new ApisixRouteStreamBackend.
-func (in *ApisixRouteStreamBackend) DeepCopy() *ApisixRouteStreamBackend {
- if in == nil {
- return nil
- }
- out := new(ApisixRouteStreamBackend)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver,
writing into out. in must be non-nil.
-func (in *ApisixRouteStreamMatch) DeepCopyInto(out *ApisixRouteStreamMatch) {
- *out = *in
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver,
creating a new ApisixRouteStreamMatch.
-func (in *ApisixRouteStreamMatch) DeepCopy() *ApisixRouteStreamMatch {
- if in == nil {
- return nil
- }
- out := new(ApisixRouteStreamMatch)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver,
writing into out. in must be non-nil.
-func (in *ApisixStatus) DeepCopyInto(out *ApisixStatus) {
- *out = *in
- if in.Conditions != nil {
- in, out := &in.Conditions, &out.Conditions
- *out = make([]v1.Condition, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver,
creating a new ApisixStatus.
-func (in *ApisixStatus) DeepCopy() *ApisixStatus {
- if in == nil {
- return nil
- }
- out := new(ApisixStatus)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver,
writing into out. in must be non-nil.
-func (in *UpstreamTimeout) DeepCopyInto(out *UpstreamTimeout) {
- *out = *in
- out.Connect = in.Connect
- out.Send = in.Send
- out.Read = in.Read
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver,
creating a new UpstreamTimeout.
-func (in *UpstreamTimeout) DeepCopy() *UpstreamTimeout {
- if in == nil {
- return nil
- }
- out := new(UpstreamTimeout)
- in.DeepCopyInto(out)
- return out
-}
diff --git a/pkg/kube/apisix/apis/config/v2beta2/zz_generated.register.go
b/pkg/kube/apisix/apis/config/v2beta2/zz_generated.register.go
deleted file mode 100644
index c22be612..00000000
--- a/pkg/kube/apisix/apis/config/v2beta2/zz_generated.register.go
+++ /dev/null
@@ -1,69 +0,0 @@
-//go:build !ignore_autogenerated
-// +build !ignore_autogenerated
-
-// 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.
-
-// Code generated by register-gen. DO NOT EDIT.
-
-package v2beta2
-
-import (
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/apimachinery/pkg/runtime"
- "k8s.io/apimachinery/pkg/runtime/schema"
-)
-
-// GroupName specifies the group name used to register the objects.
-const GroupName = "apisix.apache.org"
-
-// GroupVersion specifies the group and the version used to register the
objects.
-var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v2beta2"}
-
-// SchemeGroupVersion is group version used to register these objects
-// Deprecated: use GroupVersion instead.
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version:
"v2beta2"}
-
-// Resource takes an unqualified resource and returns a Group qualified
GroupResource
-func Resource(resource string) schema.GroupResource {
- return SchemeGroupVersion.WithResource(resource).GroupResource()
-}
-
-var (
- // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
- SchemeBuilder runtime.SchemeBuilder
- localSchemeBuilder = &SchemeBuilder
- // Depreciated: use Install instead
- AddToScheme = localSchemeBuilder.AddToScheme
- Install = localSchemeBuilder.AddToScheme
-)
-
-func init() {
- // We only register manually written functions here. The registration
of the
- // generated functions takes place in the generated files. The
separation
- // makes the code compile even when the generated files are missing.
- localSchemeBuilder.Register(addKnownTypes)
-}
-
-// Adds the list of known types to Scheme.
-func addKnownTypes(scheme *runtime.Scheme) error {
- scheme.AddKnownTypes(SchemeGroupVersion,
- &ApisixRoute{},
- &ApisixRouteList{},
- )
- // AddToGroupVersion allows the serialization of client types like
ListOptions.
- v1.AddToGroupVersion(scheme, SchemeGroupVersion)
- return nil
-}
diff --git a/pkg/kube/apisix/client/clientset/versioned/clientset.go
b/pkg/kube/apisix/client/clientset/versioned/clientset.go
index 85459d31..0d33520c 100644
--- a/pkg/kube/apisix/client/clientset/versioned/clientset.go
+++ b/pkg/kube/apisix/client/clientset/versioned/clientset.go
@@ -22,7 +22,6 @@ import (
"net/http"
apisixv2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/clientset/versioned/typed/config/v2"
- apisixv2beta2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/clientset/versioned/typed/config/v2beta2"
apisixv2beta3
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/clientset/versioned/typed/config/v2beta3"
discovery "k8s.io/client-go/discovery"
rest "k8s.io/client-go/rest"
@@ -33,7 +32,6 @@ type Interface interface {
Discovery() discovery.DiscoveryInterface
ApisixV2() apisixv2.ApisixV2Interface
ApisixV2beta3() apisixv2beta3.ApisixV2beta3Interface
- ApisixV2beta2() apisixv2beta2.ApisixV2beta2Interface
}
// Clientset contains the clients for groups. Each group has exactly one
@@ -42,7 +40,6 @@ type Clientset struct {
*discovery.DiscoveryClient
apisixV2 *apisixv2.ApisixV2Client
apisixV2beta3 *apisixv2beta3.ApisixV2beta3Client
- apisixV2beta2 *apisixv2beta2.ApisixV2beta2Client
}
// ApisixV2 retrieves the ApisixV2Client
@@ -55,11 +52,6 @@ func (c *Clientset) ApisixV2beta3()
apisixv2beta3.ApisixV2beta3Interface {
return c.apisixV2beta3
}
-// ApisixV2beta2 retrieves the ApisixV2beta2Client
-func (c *Clientset) ApisixV2beta2() apisixv2beta2.ApisixV2beta2Interface {
- return c.apisixV2beta2
-}
-
// Discovery retrieves the DiscoveryClient
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
if c == nil {
@@ -112,10 +104,6 @@ func NewForConfigAndClient(c *rest.Config, httpClient
*http.Client) (*Clientset,
if err != nil {
return nil, err
}
- cs.apisixV2beta2, err =
apisixv2beta2.NewForConfigAndClient(&configShallowCopy, httpClient)
- if err != nil {
- return nil, err
- }
cs.DiscoveryClient, err =
discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient)
if err != nil {
@@ -139,7 +127,6 @@ func New(c rest.Interface) *Clientset {
var cs Clientset
cs.apisixV2 = apisixv2.New(c)
cs.apisixV2beta3 = apisixv2beta3.New(c)
- cs.apisixV2beta2 = apisixv2beta2.New(c)
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
return &cs
diff --git
a/pkg/kube/apisix/client/clientset/versioned/fake/clientset_generated.go
b/pkg/kube/apisix/client/clientset/versioned/fake/clientset_generated.go
index 5d9d1fc0..de229417 100644
--- a/pkg/kube/apisix/client/clientset/versioned/fake/clientset_generated.go
+++ b/pkg/kube/apisix/client/clientset/versioned/fake/clientset_generated.go
@@ -21,8 +21,6 @@ import (
clientset
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/clientset/versioned"
apisixv2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/clientset/versioned/typed/config/v2"
fakeapisixv2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/clientset/versioned/typed/config/v2/fake"
- apisixv2beta2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/clientset/versioned/typed/config/v2beta2"
- fakeapisixv2beta2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/clientset/versioned/typed/config/v2beta2/fake"
apisixv2beta3
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/clientset/versioned/typed/config/v2beta3"
fakeapisixv2beta3
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/clientset/versioned/typed/config/v2beta3/fake"
"k8s.io/apimachinery/pkg/runtime"
@@ -91,8 +89,3 @@ func (c *Clientset) ApisixV2() apisixv2.ApisixV2Interface {
func (c *Clientset) ApisixV2beta3() apisixv2beta3.ApisixV2beta3Interface {
return &fakeapisixv2beta3.FakeApisixV2beta3{Fake: &c.Fake}
}
-
-// ApisixV2beta2 retrieves the ApisixV2beta2Client
-func (c *Clientset) ApisixV2beta2() apisixv2beta2.ApisixV2beta2Interface {
- return &fakeapisixv2beta2.FakeApisixV2beta2{Fake: &c.Fake}
-}
diff --git a/pkg/kube/apisix/client/clientset/versioned/fake/register.go
b/pkg/kube/apisix/client/clientset/versioned/fake/register.go
index 3f63c0d0..4da100e4 100644
--- a/pkg/kube/apisix/client/clientset/versioned/fake/register.go
+++ b/pkg/kube/apisix/client/clientset/versioned/fake/register.go
@@ -19,7 +19,6 @@ package fake
import (
apisixv2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2"
- apisixv2beta2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta2"
apisixv2beta3
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta3"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -34,7 +33,6 @@ var codecs = serializer.NewCodecFactory(scheme)
var localSchemeBuilder = runtime.SchemeBuilder{
apisixv2.AddToScheme,
apisixv2beta3.AddToScheme,
- apisixv2beta2.AddToScheme,
}
// AddToScheme adds all types of this clientset into the given scheme. This
allows composition
diff --git a/pkg/kube/apisix/client/clientset/versioned/scheme/register.go
b/pkg/kube/apisix/client/clientset/versioned/scheme/register.go
index 08cf794b..d5fb33ad 100644
--- a/pkg/kube/apisix/client/clientset/versioned/scheme/register.go
+++ b/pkg/kube/apisix/client/clientset/versioned/scheme/register.go
@@ -19,7 +19,6 @@ package scheme
import (
apisixv2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2"
- apisixv2beta2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta2"
apisixv2beta3
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta3"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -34,7 +33,6 @@ var ParameterCodec = runtime.NewParameterCodec(Scheme)
var localSchemeBuilder = runtime.SchemeBuilder{
apisixv2.AddToScheme,
apisixv2beta3.AddToScheme,
- apisixv2beta2.AddToScheme,
}
// AddToScheme adds all types of this clientset into the given scheme. This
allows composition
diff --git
a/pkg/kube/apisix/client/clientset/versioned/typed/config/v2beta2/apisixroute.go
b/pkg/kube/apisix/client/clientset/versioned/typed/config/v2beta2/apisixroute.go
deleted file mode 100644
index 3a8dadb1..00000000
---
a/pkg/kube/apisix/client/clientset/versioned/typed/config/v2beta2/apisixroute.go
+++ /dev/null
@@ -1,194 +0,0 @@
-// 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.
-
-// Code generated by client-gen. DO NOT EDIT.
-
-package v2beta2
-
-import (
- "context"
- "time"
-
- v2beta2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta2"
- scheme
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/clientset/versioned/scheme"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- rest "k8s.io/client-go/rest"
-)
-
-// ApisixRoutesGetter has a method to return a ApisixRouteInterface.
-// A group's client should implement this interface.
-type ApisixRoutesGetter interface {
- ApisixRoutes(namespace string) ApisixRouteInterface
-}
-
-// ApisixRouteInterface has methods to work with ApisixRoute resources.
-type ApisixRouteInterface interface {
- Create(ctx context.Context, apisixRoute *v2beta2.ApisixRoute, opts
v1.CreateOptions) (*v2beta2.ApisixRoute, error)
- Update(ctx context.Context, apisixRoute *v2beta2.ApisixRoute, opts
v1.UpdateOptions) (*v2beta2.ApisixRoute, error)
- UpdateStatus(ctx context.Context, apisixRoute *v2beta2.ApisixRoute,
opts v1.UpdateOptions) (*v2beta2.ApisixRoute, error)
- Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
- DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts
v1.ListOptions) error
- Get(ctx context.Context, name string, opts v1.GetOptions)
(*v2beta2.ApisixRoute, error)
- List(ctx context.Context, opts v1.ListOptions)
(*v2beta2.ApisixRouteList, error)
- Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
- Patch(ctx context.Context, name string, pt types.PatchType, data
[]byte, opts v1.PatchOptions, subresources ...string) (result
*v2beta2.ApisixRoute, err error)
- ApisixRouteExpansion
-}
-
-// apisixRoutes implements ApisixRouteInterface
-type apisixRoutes struct {
- client rest.Interface
- ns string
-}
-
-// newApisixRoutes returns a ApisixRoutes
-func newApisixRoutes(c *ApisixV2beta2Client, namespace string) *apisixRoutes {
- return &apisixRoutes{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the apisixRoute, and returns the corresponding
apisixRoute object, and an error if there is any.
-func (c *apisixRoutes) Get(ctx context.Context, name string, options
v1.GetOptions) (result *v2beta2.ApisixRoute, err error) {
- result = &v2beta2.ApisixRoute{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("apisixroutes").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do(ctx).
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of ApisixRoutes
that match those selectors.
-func (c *apisixRoutes) List(ctx context.Context, opts v1.ListOptions) (result
*v2beta2.ApisixRouteList, err error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- result = &v2beta2.ApisixRouteList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("apisixroutes").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Do(ctx).
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested apisixRoutes.
-func (c *apisixRoutes) Watch(ctx context.Context, opts v1.ListOptions)
(watch.Interface, error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("apisixroutes").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Watch(ctx)
-}
-
-// Create takes the representation of a apisixRoute and creates it. Returns
the server's representation of the apisixRoute, and an error, if there is any.
-func (c *apisixRoutes) Create(ctx context.Context, apisixRoute
*v2beta2.ApisixRoute, opts v1.CreateOptions) (result *v2beta2.ApisixRoute, err
error) {
- result = &v2beta2.ApisixRoute{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("apisixroutes").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(apisixRoute).
- Do(ctx).
- Into(result)
- return
-}
-
-// Update takes the representation of a apisixRoute and updates it. Returns
the server's representation of the apisixRoute, and an error, if there is any.
-func (c *apisixRoutes) Update(ctx context.Context, apisixRoute
*v2beta2.ApisixRoute, opts v1.UpdateOptions) (result *v2beta2.ApisixRoute, err
error) {
- result = &v2beta2.ApisixRoute{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("apisixroutes").
- Name(apisixRoute.Name).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(apisixRoute).
- Do(ctx).
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating
UpdateStatus().
-func (c *apisixRoutes) UpdateStatus(ctx context.Context, apisixRoute
*v2beta2.ApisixRoute, opts v1.UpdateOptions) (result *v2beta2.ApisixRoute, err
error) {
- result = &v2beta2.ApisixRoute{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("apisixroutes").
- Name(apisixRoute.Name).
- SubResource("status").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(apisixRoute).
- Do(ctx).
- Into(result)
- return
-}
-
-// Delete takes name of the apisixRoute and deletes it. Returns an error if
one occurs.
-func (c *apisixRoutes) Delete(ctx context.Context, name string, opts
v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("apisixroutes").
- Name(name).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *apisixRoutes) DeleteCollection(ctx context.Context, opts
v1.DeleteOptions, listOpts v1.ListOptions) error {
- var timeout time.Duration
- if listOpts.TimeoutSeconds != nil {
- timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
- }
- return c.client.Delete().
- Namespace(c.ns).
- Resource("apisixroutes").
- VersionedParams(&listOpts, scheme.ParameterCodec).
- Timeout(timeout).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// Patch applies the patch and returns the patched apisixRoute.
-func (c *apisixRoutes) Patch(ctx context.Context, name string, pt
types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string)
(result *v2beta2.ApisixRoute, err error) {
- result = &v2beta2.ApisixRoute{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("apisixroutes").
- Name(name).
- SubResource(subresources...).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
diff --git
a/pkg/kube/apisix/client/clientset/versioned/typed/config/v2beta2/config_client.go
b/pkg/kube/apisix/client/clientset/versioned/typed/config/v2beta2/config_client.go
deleted file mode 100644
index db8d8642..00000000
---
a/pkg/kube/apisix/client/clientset/versioned/typed/config/v2beta2/config_client.go
+++ /dev/null
@@ -1,106 +0,0 @@
-// 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.
-
-// Code generated by client-gen. DO NOT EDIT.
-
-package v2beta2
-
-import (
- "net/http"
-
- v2beta2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta2"
-
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/clientset/versioned/scheme"
- rest "k8s.io/client-go/rest"
-)
-
-type ApisixV2beta2Interface interface {
- RESTClient() rest.Interface
- ApisixRoutesGetter
-}
-
-// ApisixV2beta2Client is used to interact with features provided by the
apisix.apache.org group.
-type ApisixV2beta2Client struct {
- restClient rest.Interface
-}
-
-func (c *ApisixV2beta2Client) ApisixRoutes(namespace string)
ApisixRouteInterface {
- return newApisixRoutes(c, namespace)
-}
-
-// NewForConfig creates a new ApisixV2beta2Client for the given config.
-// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
-// where httpClient was generated with rest.HTTPClientFor(c).
-func NewForConfig(c *rest.Config) (*ApisixV2beta2Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- httpClient, err := rest.HTTPClientFor(&config)
- if err != nil {
- return nil, err
- }
- return NewForConfigAndClient(&config, httpClient)
-}
-
-// NewForConfigAndClient creates a new ApisixV2beta2Client for the given
config and http client.
-// Note the http client provided takes precedence over the configured
transport values.
-func NewForConfigAndClient(c *rest.Config, h *http.Client)
(*ApisixV2beta2Client, error) {
- config := *c
- if err := setConfigDefaults(&config); err != nil {
- return nil, err
- }
- client, err := rest.RESTClientForConfigAndClient(&config, h)
- if err != nil {
- return nil, err
- }
- return &ApisixV2beta2Client{client}, nil
-}
-
-// NewForConfigOrDie creates a new ApisixV2beta2Client for the given config and
-// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *ApisixV2beta2Client {
- client, err := NewForConfig(c)
- if err != nil {
- panic(err)
- }
- return client
-}
-
-// New creates a new ApisixV2beta2Client for the given RESTClient.
-func New(c rest.Interface) *ApisixV2beta2Client {
- return &ApisixV2beta2Client{c}
-}
-
-func setConfigDefaults(config *rest.Config) error {
- gv := v2beta2.SchemeGroupVersion
- config.GroupVersion = &gv
- config.APIPath = "/apis"
- config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
-
- if config.UserAgent == "" {
- config.UserAgent = rest.DefaultKubernetesUserAgent()
- }
-
- return nil
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *ApisixV2beta2Client) RESTClient() rest.Interface {
- if c == nil {
- return nil
- }
- return c.restClient
-}
diff --git
a/pkg/kube/apisix/client/clientset/versioned/typed/config/v2beta2/doc.go
b/pkg/kube/apisix/client/clientset/versioned/typed/config/v2beta2/doc.go
deleted file mode 100644
index ba33cded..00000000
--- a/pkg/kube/apisix/client/clientset/versioned/typed/config/v2beta2/doc.go
+++ /dev/null
@@ -1,19 +0,0 @@
-// 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.
-
-// Code generated by client-gen. DO NOT EDIT.
-
-// This package has the automatically generated typed clients.
-package v2beta2
diff --git
a/pkg/kube/apisix/client/clientset/versioned/typed/config/v2beta2/fake/doc.go
b/pkg/kube/apisix/client/clientset/versioned/typed/config/v2beta2/fake/doc.go
deleted file mode 100644
index cfa19888..00000000
---
a/pkg/kube/apisix/client/clientset/versioned/typed/config/v2beta2/fake/doc.go
+++ /dev/null
@@ -1,19 +0,0 @@
-// 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.
-
-// Code generated by client-gen. DO NOT EDIT.
-
-// Package fake has the automatically generated clients.
-package fake
diff --git
a/pkg/kube/apisix/client/clientset/versioned/typed/config/v2beta2/fake/fake_apisixroute.go
b/pkg/kube/apisix/client/clientset/versioned/typed/config/v2beta2/fake/fake_apisixroute.go
deleted file mode 100644
index 31cacfce..00000000
---
a/pkg/kube/apisix/client/clientset/versioned/typed/config/v2beta2/fake/fake_apisixroute.go
+++ /dev/null
@@ -1,141 +0,0 @@
-// 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.
-
-// Code generated by client-gen. DO NOT EDIT.
-
-package fake
-
-import (
- "context"
-
- v2beta2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta2"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- labels "k8s.io/apimachinery/pkg/labels"
- schema "k8s.io/apimachinery/pkg/runtime/schema"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- testing "k8s.io/client-go/testing"
-)
-
-// FakeApisixRoutes implements ApisixRouteInterface
-type FakeApisixRoutes struct {
- Fake *FakeApisixV2beta2
- ns string
-}
-
-var apisixroutesResource = schema.GroupVersionResource{Group:
"apisix.apache.org", Version: "v2beta2", Resource: "apisixroutes"}
-
-var apisixroutesKind = schema.GroupVersionKind{Group: "apisix.apache.org",
Version: "v2beta2", Kind: "ApisixRoute"}
-
-// Get takes name of the apisixRoute, and returns the corresponding
apisixRoute object, and an error if there is any.
-func (c *FakeApisixRoutes) Get(ctx context.Context, name string, options
v1.GetOptions) (result *v2beta2.ApisixRoute, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewGetAction(apisixroutesResource, c.ns, name),
&v2beta2.ApisixRoute{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v2beta2.ApisixRoute), err
-}
-
-// List takes label and field selectors, and returns the list of ApisixRoutes
that match those selectors.
-func (c *FakeApisixRoutes) List(ctx context.Context, opts v1.ListOptions)
(result *v2beta2.ApisixRouteList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewListAction(apisixroutesResource,
apisixroutesKind, c.ns, opts), &v2beta2.ApisixRouteList{})
-
- if obj == nil {
- return nil, err
- }
-
- label, _, _ := testing.ExtractFromListOptions(opts)
- if label == nil {
- label = labels.Everything()
- }
- list := &v2beta2.ApisixRouteList{ListMeta:
obj.(*v2beta2.ApisixRouteList).ListMeta}
- for _, item := range obj.(*v2beta2.ApisixRouteList).Items {
- if label.Matches(labels.Set(item.Labels)) {
- list.Items = append(list.Items, item)
- }
- }
- return list, err
-}
-
-// Watch returns a watch.Interface that watches the requested apisixRoutes.
-func (c *FakeApisixRoutes) Watch(ctx context.Context, opts v1.ListOptions)
(watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewWatchAction(apisixroutesResource, c.ns,
opts))
-
-}
-
-// Create takes the representation of a apisixRoute and creates it. Returns
the server's representation of the apisixRoute, and an error, if there is any.
-func (c *FakeApisixRoutes) Create(ctx context.Context, apisixRoute
*v2beta2.ApisixRoute, opts v1.CreateOptions) (result *v2beta2.ApisixRoute, err
error) {
- obj, err := c.Fake.
- Invokes(testing.NewCreateAction(apisixroutesResource, c.ns,
apisixRoute), &v2beta2.ApisixRoute{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v2beta2.ApisixRoute), err
-}
-
-// Update takes the representation of a apisixRoute and updates it. Returns
the server's representation of the apisixRoute, and an error, if there is any.
-func (c *FakeApisixRoutes) Update(ctx context.Context, apisixRoute
*v2beta2.ApisixRoute, opts v1.UpdateOptions) (result *v2beta2.ApisixRoute, err
error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(apisixroutesResource, c.ns,
apisixRoute), &v2beta2.ApisixRoute{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v2beta2.ApisixRoute), err
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating
UpdateStatus().
-func (c *FakeApisixRoutes) UpdateStatus(ctx context.Context, apisixRoute
*v2beta2.ApisixRoute, opts v1.UpdateOptions) (*v2beta2.ApisixRoute, error) {
- obj, err := c.Fake.
-
Invokes(testing.NewUpdateSubresourceAction(apisixroutesResource, "status",
c.ns, apisixRoute), &v2beta2.ApisixRoute{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v2beta2.ApisixRoute), err
-}
-
-// Delete takes name of the apisixRoute and deletes it. Returns an error if
one occurs.
-func (c *FakeApisixRoutes) Delete(ctx context.Context, name string, opts
v1.DeleteOptions) error {
- _, err := c.Fake.
-
Invokes(testing.NewDeleteActionWithOptions(apisixroutesResource, c.ns, name,
opts), &v2beta2.ApisixRoute{})
-
- return err
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *FakeApisixRoutes) DeleteCollection(ctx context.Context, opts
v1.DeleteOptions, listOpts v1.ListOptions) error {
- action := testing.NewDeleteCollectionAction(apisixroutesResource, c.ns,
listOpts)
-
- _, err := c.Fake.Invokes(action, &v2beta2.ApisixRouteList{})
- return err
-}
-
-// Patch applies the patch and returns the patched apisixRoute.
-func (c *FakeApisixRoutes) Patch(ctx context.Context, name string, pt
types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string)
(result *v2beta2.ApisixRoute, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(apisixroutesResource,
c.ns, name, pt, data, subresources...), &v2beta2.ApisixRoute{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v2beta2.ApisixRoute), err
-}
diff --git
a/pkg/kube/apisix/client/clientset/versioned/typed/config/v2beta2/fake/fake_config_client.go
b/pkg/kube/apisix/client/clientset/versioned/typed/config/v2beta2/fake/fake_config_client.go
deleted file mode 100644
index 1898d4ac..00000000
---
a/pkg/kube/apisix/client/clientset/versioned/typed/config/v2beta2/fake/fake_config_client.go
+++ /dev/null
@@ -1,39 +0,0 @@
-// 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.
-
-// Code generated by client-gen. DO NOT EDIT.
-
-package fake
-
-import (
- v2beta2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/clientset/versioned/typed/config/v2beta2"
- rest "k8s.io/client-go/rest"
- testing "k8s.io/client-go/testing"
-)
-
-type FakeApisixV2beta2 struct {
- *testing.Fake
-}
-
-func (c *FakeApisixV2beta2) ApisixRoutes(namespace string)
v2beta2.ApisixRouteInterface {
- return &FakeApisixRoutes{c, namespace}
-}
-
-// RESTClient returns a RESTClient that is used to communicate
-// with API server by this client implementation.
-func (c *FakeApisixV2beta2) RESTClient() rest.Interface {
- var ret *rest.RESTClient
- return ret
-}
diff --git
a/pkg/kube/apisix/client/clientset/versioned/typed/config/v2beta2/generated_expansion.go
b/pkg/kube/apisix/client/clientset/versioned/typed/config/v2beta2/generated_expansion.go
deleted file mode 100644
index c837df3c..00000000
---
a/pkg/kube/apisix/client/clientset/versioned/typed/config/v2beta2/generated_expansion.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// 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.
-
-// Code generated by client-gen. DO NOT EDIT.
-
-package v2beta2
-
-type ApisixRouteExpansion interface{}
diff --git
a/pkg/kube/apisix/client/informers/externalversions/config/interface.go
b/pkg/kube/apisix/client/informers/externalversions/config/interface.go
index 01ba0e23..a94ff689 100644
--- a/pkg/kube/apisix/client/informers/externalversions/config/interface.go
+++ b/pkg/kube/apisix/client/informers/externalversions/config/interface.go
@@ -19,7 +19,6 @@ package config
import (
v2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/informers/externalversions/config/v2"
- v2beta2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/informers/externalversions/config/v2beta2"
v2beta3
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/informers/externalversions/config/v2beta3"
internalinterfaces
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/informers/externalversions/internalinterfaces"
)
@@ -30,8 +29,6 @@ type Interface interface {
V2() v2.Interface
// V2beta3 provides access to shared informers for resources in V2beta3.
V2beta3() v2beta3.Interface
- // V2beta2 provides access to shared informers for resources in V2beta2.
- V2beta2() v2beta2.Interface
}
type group struct {
@@ -54,8 +51,3 @@ func (g *group) V2() v2.Interface {
func (g *group) V2beta3() v2beta3.Interface {
return v2beta3.New(g.factory, g.namespace, g.tweakListOptions)
}
-
-// V2beta2 returns a new v2beta2.Interface.
-func (g *group) V2beta2() v2beta2.Interface {
- return v2beta2.New(g.factory, g.namespace, g.tweakListOptions)
-}
diff --git
a/pkg/kube/apisix/client/informers/externalversions/config/v2beta2/apisixroute.go
b/pkg/kube/apisix/client/informers/externalversions/config/v2beta2/apisixroute.go
deleted file mode 100644
index c3da713f..00000000
---
a/pkg/kube/apisix/client/informers/externalversions/config/v2beta2/apisixroute.go
+++ /dev/null
@@ -1,89 +0,0 @@
-// 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.
-
-// Code generated by informer-gen. DO NOT EDIT.
-
-package v2beta2
-
-import (
- "context"
- time "time"
-
- configv2beta2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta2"
- versioned
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/clientset/versioned"
- internalinterfaces
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/informers/externalversions/internalinterfaces"
- v2beta2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/listers/config/v2beta2"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- cache "k8s.io/client-go/tools/cache"
-)
-
-// ApisixRouteInformer provides access to a shared informer and lister for
-// ApisixRoutes.
-type ApisixRouteInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() v2beta2.ApisixRouteLister
-}
-
-type apisixRouteInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewApisixRouteInformer constructs a new informer for ApisixRoute type.
-// Always prefer using an informer factory to get a shared informer instead of
getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewApisixRouteInformer(client versioned.Interface, namespace string,
resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredApisixRouteInformer(client, namespace, resyncPeriod,
indexers, nil)
-}
-
-// NewFilteredApisixRouteInformer constructs a new informer for ApisixRoute
type.
-// Always prefer using an informer factory to get a shared informer instead of
getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredApisixRouteInformer(client versioned.Interface, namespace
string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions
internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object,
error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return
client.ApisixV2beta2().ApisixRoutes(namespace).List(context.TODO(), options)
- },
- WatchFunc: func(options v1.ListOptions)
(watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return
client.ApisixV2beta2().ApisixRoutes(namespace).Watch(context.TODO(), options)
- },
- },
- &configv2beta2.ApisixRoute{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *apisixRouteInformer) defaultInformer(client versioned.Interface,
resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredApisixRouteInformer(client, f.namespace,
resyncPeriod, cache.Indexers{cache.NamespaceIndex:
cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *apisixRouteInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&configv2beta2.ApisixRoute{},
f.defaultInformer)
-}
-
-func (f *apisixRouteInformer) Lister() v2beta2.ApisixRouteLister {
- return v2beta2.NewApisixRouteLister(f.Informer().GetIndexer())
-}
diff --git
a/pkg/kube/apisix/client/informers/externalversions/config/v2beta2/interface.go
b/pkg/kube/apisix/client/informers/externalversions/config/v2beta2/interface.go
deleted file mode 100644
index 778022f5..00000000
---
a/pkg/kube/apisix/client/informers/externalversions/config/v2beta2/interface.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// 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.
-
-// Code generated by informer-gen. DO NOT EDIT.
-
-package v2beta2
-
-import (
- internalinterfaces
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/informers/externalversions/internalinterfaces"
-)
-
-// Interface provides access to all the informers in this group version.
-type Interface interface {
- // ApisixRoutes returns a ApisixRouteInformer.
- ApisixRoutes() ApisixRouteInformer
-}
-
-type version struct {
- factory internalinterfaces.SharedInformerFactory
- namespace string
- tweakListOptions internalinterfaces.TweakListOptionsFunc
-}
-
-// New returns a new Interface.
-func New(f internalinterfaces.SharedInformerFactory, namespace string,
tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
- return &version{factory: f, namespace: namespace, tweakListOptions:
tweakListOptions}
-}
-
-// ApisixRoutes returns a ApisixRouteInformer.
-func (v *version) ApisixRoutes() ApisixRouteInformer {
- return &apisixRouteInformer{factory: v.factory, namespace: v.namespace,
tweakListOptions: v.tweakListOptions}
-}
diff --git a/pkg/kube/apisix/client/informers/externalversions/generic.go
b/pkg/kube/apisix/client/informers/externalversions/generic.go
index a86ba23a..2a29a506 100644
--- a/pkg/kube/apisix/client/informers/externalversions/generic.go
+++ b/pkg/kube/apisix/client/informers/externalversions/generic.go
@@ -21,7 +21,6 @@ import (
"fmt"
v2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2"
- v2beta2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta2"
v2beta3
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta3"
schema "k8s.io/apimachinery/pkg/runtime/schema"
cache "k8s.io/client-go/tools/cache"
@@ -67,10 +66,6 @@ func (f *sharedInformerFactory) ForResource(resource
schema.GroupVersionResource
case v2.SchemeGroupVersion.WithResource("apisixupstreams"):
return &genericInformer{resource: resource.GroupResource(),
informer: f.Apisix().V2().ApisixUpstreams().Informer()}, nil
- // Group=apisix.apache.org, Version=v2beta2
- case v2beta2.SchemeGroupVersion.WithResource("apisixroutes"):
- return &genericInformer{resource: resource.GroupResource(),
informer: f.Apisix().V2beta2().ApisixRoutes().Informer()}, nil
-
// Group=apisix.apache.org, Version=v2beta3
case v2beta3.SchemeGroupVersion.WithResource("apisixclusterconfigs"):
return &genericInformer{resource: resource.GroupResource(),
informer: f.Apisix().V2beta3().ApisixClusterConfigs().Informer()}, nil
diff --git a/pkg/kube/apisix/client/listers/config/v2beta2/apisixroute.go
b/pkg/kube/apisix/client/listers/config/v2beta2/apisixroute.go
deleted file mode 100644
index 8fb2e47d..00000000
--- a/pkg/kube/apisix/client/listers/config/v2beta2/apisixroute.go
+++ /dev/null
@@ -1,98 +0,0 @@
-// 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.
-
-// Code generated by lister-gen. DO NOT EDIT.
-
-package v2beta2
-
-import (
- v2beta2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta2"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// ApisixRouteLister helps list ApisixRoutes.
-// All objects returned here must be treated as read-only.
-type ApisixRouteLister interface {
- // List lists all ApisixRoutes in the indexer.
- // Objects returned here must be treated as read-only.
- List(selector labels.Selector) (ret []*v2beta2.ApisixRoute, err error)
- // ApisixRoutes returns an object that can list and get ApisixRoutes.
- ApisixRoutes(namespace string) ApisixRouteNamespaceLister
- ApisixRouteListerExpansion
-}
-
-// apisixRouteLister implements the ApisixRouteLister interface.
-type apisixRouteLister struct {
- indexer cache.Indexer
-}
-
-// NewApisixRouteLister returns a new ApisixRouteLister.
-func NewApisixRouteLister(indexer cache.Indexer) ApisixRouteLister {
- return &apisixRouteLister{indexer: indexer}
-}
-
-// List lists all ApisixRoutes in the indexer.
-func (s *apisixRouteLister) List(selector labels.Selector) (ret
[]*v2beta2.ApisixRoute, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v2beta2.ApisixRoute))
- })
- return ret, err
-}
-
-// ApisixRoutes returns an object that can list and get ApisixRoutes.
-func (s *apisixRouteLister) ApisixRoutes(namespace string)
ApisixRouteNamespaceLister {
- return apisixRouteNamespaceLister{indexer: s.indexer, namespace:
namespace}
-}
-
-// ApisixRouteNamespaceLister helps list and get ApisixRoutes.
-// All objects returned here must be treated as read-only.
-type ApisixRouteNamespaceLister interface {
- // List lists all ApisixRoutes in the indexer for a given namespace.
- // Objects returned here must be treated as read-only.
- List(selector labels.Selector) (ret []*v2beta2.ApisixRoute, err error)
- // Get retrieves the ApisixRoute from the indexer for a given namespace
and name.
- // Objects returned here must be treated as read-only.
- Get(name string) (*v2beta2.ApisixRoute, error)
- ApisixRouteNamespaceListerExpansion
-}
-
-// apisixRouteNamespaceLister implements the ApisixRouteNamespaceLister
-// interface.
-type apisixRouteNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all ApisixRoutes in the indexer for a given namespace.
-func (s apisixRouteNamespaceLister) List(selector labels.Selector) (ret
[]*v2beta2.ApisixRoute, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m
interface{}) {
- ret = append(ret, m.(*v2beta2.ApisixRoute))
- })
- return ret, err
-}
-
-// Get retrieves the ApisixRoute from the indexer for a given namespace and
name.
-func (s apisixRouteNamespaceLister) Get(name string) (*v2beta2.ApisixRoute,
error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v2beta2.Resource("apisixroute"),
name)
- }
- return obj.(*v2beta2.ApisixRoute), nil
-}
diff --git
a/pkg/kube/apisix/client/listers/config/v2beta2/expansion_generated.go
b/pkg/kube/apisix/client/listers/config/v2beta2/expansion_generated.go
deleted file mode 100644
index 6922ad2f..00000000
--- a/pkg/kube/apisix/client/listers/config/v2beta2/expansion_generated.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// 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.
-
-// Code generated by lister-gen. DO NOT EDIT.
-
-package v2beta2
-
-// ApisixRouteListerExpansion allows custom methods to be added to
-// ApisixRouteLister.
-type ApisixRouteListerExpansion interface{}
-
-// ApisixRouteNamespaceListerExpansion allows custom methods to be added to
-// ApisixRouteNamespaceLister.
-type ApisixRouteNamespaceListerExpansion interface{}
diff --git a/pkg/kube/apisix_route.go b/pkg/kube/apisix_route.go
index 1ce741ce..bf011b9e 100644
--- a/pkg/kube/apisix_route.go
+++ b/pkg/kube/apisix_route.go
@@ -19,18 +19,14 @@ import (
"github.com/apache/apisix-ingress-controller/pkg/config"
configv2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2"
- configv2beta2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta2"
configv2beta3
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta3"
listersv2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/listers/config/v2"
- listersv2beta2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/listers/config/v2beta2"
listersv2beta3
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/listers/config/v2beta3"
)
// ApisixRouteLister is an encapsulation for the lister of ApisixRoute,
// it aims at to be compatible with different ApisixRoute versions.
type ApisixRouteLister interface {
- // V2beta2 gets the ApisixRoute in apisix.apache.org/v2beta2.
- V2beta2(string, string) (ApisixRoute, error)
// V2beta3 gets the ApisixRoute in apisix.apache.org/v2beta3.
V2beta3(string, string) (ApisixRoute, error)
// V2 gets the ApisixRoute in apisix.apache.org/v2.
@@ -53,9 +49,6 @@ type ApisixRoute interface {
// GroupVersion returns the api group version of the
// real ApisixRoute.
GroupVersion() string
- // V2beta2 returns the ApisixRoute in apisix.apache.org/v2beta2, the
real
- // ApisixRoute must be in this group version, otherwise will panic.
- V2beta2() *configv2beta2.ApisixRoute
// V2beta3 returns the ApisixRoute in apisix.apache.org/v2beta3, the
real
// ApisixRoute must be in this group version, otherwise will panic.
V2beta3() *configv2beta3.ApisixRoute
@@ -77,7 +70,6 @@ type ApisixRouteEvent struct {
type apisixRoute struct {
groupVersion string
- v2beta2 *configv2beta2.ApisixRoute
v2beta3 *configv2beta3.ApisixRoute
v2 *configv2.ApisixRoute
}
@@ -90,13 +82,6 @@ func (l *apisixRouteLister) V2Lister()
listersv2.ApisixRouteLister {
return l.v2Lister
}
-func (ar *apisixRoute) V2beta2() *configv2beta2.ApisixRoute {
- if ar.groupVersion != config.ApisixV2beta2 {
- panic("not a apisix.apache.org/v2beta3 route")
- }
- return ar.v2beta2
-}
-
func (ar *apisixRoute) V2beta3() *configv2beta3.ApisixRoute {
if ar.groupVersion != config.ApisixV2beta3 {
panic("not a apisix.apache.org/v2beta3 route")
@@ -115,9 +100,6 @@ func (ar *apisixRoute) GroupVersion() string {
}
func (ar *apisixRoute) ResourceVersion() string {
- if ar.groupVersion == config.ApisixV2beta2 {
- return ar.V2beta2().ResourceVersion
- }
if ar.groupVersion == config.ApisixV2beta3 {
return ar.V2beta3().ResourceVersion
}
@@ -125,22 +107,10 @@ func (ar *apisixRoute) ResourceVersion() string {
}
type apisixRouteLister struct {
- v2beta2Lister listersv2beta2.ApisixRouteLister
v2beta3Lister listersv2beta3.ApisixRouteLister
v2Lister listersv2.ApisixRouteLister
}
-func (l *apisixRouteLister) V2beta2(namespace, name string) (ApisixRoute,
error) {
- ar, err := l.v2beta2Lister.ApisixRoutes(namespace).Get(name)
- if err != nil {
- return nil, err
- }
- return &apisixRoute{
- groupVersion: config.ApisixV2beta2,
- v2beta2: ar,
- }, nil
-}
-
func (l *apisixRouteLister) V2beta3(namespace, name string) (ApisixRoute,
error) {
ar, err := l.v2beta3Lister.ApisixRoutes(namespace).Get(name)
if err != nil {
@@ -166,11 +136,6 @@ func (l *apisixRouteLister) V2(namespace, name string)
(ApisixRoute, error) {
// type of obj.
func MustNewApisixRoute(obj interface{}) ApisixRoute {
switch ar := obj.(type) {
- case *configv2beta2.ApisixRoute:
- return &apisixRoute{
- groupVersion: config.ApisixV2beta2,
- v2beta2: ar,
- }
case *configv2beta3.ApisixRoute:
return &apisixRoute{
groupVersion: config.ApisixV2beta3,
@@ -191,11 +156,6 @@ func MustNewApisixRoute(obj interface{}) ApisixRoute {
// type assertion fails.
func NewApisixRoute(obj interface{}) (ApisixRoute, error) {
switch ar := obj.(type) {
- case *configv2beta2.ApisixRoute:
- return &apisixRoute{
- groupVersion: config.ApisixV2beta2,
- v2beta2: ar,
- }, nil
case *configv2beta3.ApisixRoute:
return &apisixRoute{
groupVersion: config.ApisixV2beta3,
@@ -211,9 +171,8 @@ func NewApisixRoute(obj interface{}) (ApisixRoute, error) {
}
}
-func NewApisixRouteLister(v2beta2 listersv2beta2.ApisixRouteLister, v2beta3
listersv2beta3.ApisixRouteLister, v2 listersv2.ApisixRouteLister)
ApisixRouteLister {
+func NewApisixRouteLister(v2beta3 listersv2beta3.ApisixRouteLister, v2
listersv2.ApisixRouteLister) ApisixRouteLister {
return &apisixRouteLister{
- v2beta2Lister: v2beta2,
v2beta3Lister: v2beta3,
v2Lister: v2,
}
diff --git a/pkg/providers/apisix/apisix_route.go
b/pkg/providers/apisix/apisix_route.go
index b11539ad..d5d95ac2 100644
--- a/pkg/providers/apisix/apisix_route.go
+++ b/pkg/providers/apisix/apisix_route.go
@@ -33,7 +33,6 @@ import (
"github.com/apache/apisix-ingress-controller/pkg/config"
"github.com/apache/apisix-ingress-controller/pkg/kube"
v2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2"
- configv2beta2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta2"
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta3"
"github.com/apache/apisix-ingress-controller/pkg/log"
"github.com/apache/apisix-ingress-controller/pkg/providers/translation"
@@ -306,8 +305,6 @@ func (c *apisixRouteController) sync(ctx context.Context,
ev *types.Event) error
tctx *translation.TranslateContext
)
switch obj.GroupVersion {
- case config.ApisixV2beta2:
- ar, err = c.apisixRouteLister.V2beta2(namespace, name)
case config.ApisixV2beta3:
ar, err = c.apisixRouteLister.V2beta3(namespace, name)
case config.ApisixV2:
@@ -355,19 +352,6 @@ func (c *apisixRouteController) sync(ctx context.Context,
ev *types.Event) error
}
switch obj.GroupVersion {
- case config.ApisixV2beta2:
- if ev.Type != types.EventDelete {
- tctx, err =
c.translator.TranslateRouteV2beta2(ar.V2beta2())
- } else {
- tctx, err =
c.translator.TranslateRouteV2beta2NotStrictly(ar.V2beta2())
- }
- if err != nil {
- log.Errorw("failed to translate ApisixRoute v2beta2",
- zap.Error(err),
- zap.Any("object", ar),
- )
- return err
- }
case config.ApisixV2beta3:
if ev.Type != types.EventDelete {
if err = c.checkPluginNameIfNotEmptyV2beta3(ctx,
ar.V2beta3()); err == nil {
@@ -509,8 +493,6 @@ func (c *apisixRouteController) handleSyncErr(obj
interface{}, errOrigin error)
}
var ar kube.ApisixRoute
switch event.GroupVersion {
- case config.ApisixV2beta2:
- ar, errLocal = c.apisixRouteLister.V2beta2(namespace, name)
case config.ApisixV2beta3:
ar, errLocal = c.apisixRouteLister.V2beta3(namespace, name)
case config.ApisixV2:
@@ -525,9 +507,6 @@ func (c *apisixRouteController) handleSyncErr(obj
interface{}, errOrigin error)
if ev.Type != types.EventDelete {
if errLocal == nil {
switch ar.GroupVersion() {
- case config.ApisixV2beta2:
- c.RecordEvent(ar.V2beta2(),
v1.EventTypeNormal, utils.ResourceSynced, nil)
- c.recordStatus(ar.V2beta2(),
utils.ResourceSynced, nil, metav1.ConditionTrue, ar.V2beta2().GetGeneration())
case config.ApisixV2beta3:
c.RecordEvent(ar.V2beta3(),
v1.EventTypeNormal, utils.ResourceSynced, nil)
c.recordStatus(ar.V2beta3(),
utils.ResourceSynced, nil, metav1.ConditionTrue, ar.V2beta3().GetGeneration())
@@ -553,9 +532,6 @@ func (c *apisixRouteController) handleSyncErr(obj
interface{}, errOrigin error)
)
if errLocal == nil {
switch ar.GroupVersion() {
- case config.ApisixV2beta2:
- c.RecordEvent(ar.V2beta2(), v1.EventTypeWarning,
utils.ResourceSyncAborted, errOrigin)
- c.recordStatus(ar.V2beta2(), utils.ResourceSyncAborted,
errOrigin, metav1.ConditionFalse, ar.V2beta2().GetGeneration())
case config.ApisixV2beta3:
c.RecordEvent(ar.V2beta3(), v1.EventTypeWarning,
utils.ResourceSyncAborted, errOrigin)
c.recordStatus(ar.V2beta3(), utils.ResourceSyncAborted,
errOrigin, metav1.ConditionFalse, ar.V2beta3().GetGeneration())
@@ -904,23 +880,6 @@ func (c *apisixRouteController) recordStatus(at
interface{}, reason string, err
}
switch v := at.(type) {
- case *configv2beta2.ApisixRoute:
- // set to status
- if v.Status.Conditions == nil {
- conditions := make([]metav1.Condition, 0)
- v.Status.Conditions = conditions
- }
- if utils.VerifyGeneration(&v.Status.Conditions, condition) {
- meta.SetStatusCondition(&v.Status.Conditions, condition)
- if _, errRecord :=
apisixClient.ApisixV2beta2().ApisixRoutes(v.Namespace).
- UpdateStatus(context.TODO(), v,
metav1.UpdateOptions{}); errRecord != nil {
- log.Errorw("failed to record status change for
ApisixRoute",
- zap.Error(errRecord),
- zap.String("name", v.Name),
- zap.String("namespace", v.Namespace),
- )
- }
- }
case *v2beta3.ApisixRoute:
// set to status
if v.Status.Conditions == nil {
diff --git a/pkg/providers/apisix/provider.go b/pkg/providers/apisix/provider.go
index 627adcfe..a184cb39 100644
--- a/pkg/providers/apisix/provider.go
+++ b/pkg/providers/apisix/provider.go
@@ -120,7 +120,6 @@ func NewProvider(common *providertypes.Common,
namespaceProvider namespace.Watch
}
apisixRouteLister := kube.NewApisixRouteLister(
- apisixFactory.Apisix().V2beta2().ApisixRoutes().Lister(),
apisixFactory.Apisix().V2beta3().ApisixRoutes().Lister(),
apisixFactory.Apisix().V2().ApisixRoutes().Lister(),
)
diff --git a/pkg/providers/apisix/translation/apisix_route.go
b/pkg/providers/apisix/translation/apisix_route.go
index aa22a829..5a954a75 100644
--- a/pkg/providers/apisix/translation/apisix_route.go
+++ b/pkg/providers/apisix/translation/apisix_route.go
@@ -28,7 +28,6 @@ import (
"github.com/apache/apisix-ingress-controller/pkg/id"
"github.com/apache/apisix-ingress-controller/pkg/kube"
configv2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2"
- configv2beta2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta2"
configv2beta3
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta3"
_const
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/const"
"github.com/apache/apisix-ingress-controller/pkg/log"
@@ -36,30 +35,6 @@ import (
apisixv1
"github.com/apache/apisix-ingress-controller/pkg/types/apisix/v1"
)
-func (t *translator) TranslateRouteV2beta2(ar *configv2beta2.ApisixRoute)
(*translation.TranslateContext, error) {
- ctx := translation.DefaultEmptyTranslateContext()
-
- if err := t.translateHTTPRouteV2beta2(ctx, ar); err != nil {
- return nil, err
- }
- if err := t.translateStreamRouteV2beta2(ctx, ar); err != nil {
- return nil, err
- }
- return ctx, nil
-}
-
-func (t *translator) TranslateRouteV2beta2NotStrictly(ar
*configv2beta2.ApisixRoute) (*translation.TranslateContext, error) {
- ctx := translation.DefaultEmptyTranslateContext()
-
- if err := t.translateHTTPRouteV2beta2NotStrictly(ctx, ar); err != nil {
- return nil, err
- }
- if err := t.translateStreamRouteNotStrictlyV2beta2(ctx, ar); err != nil
{
- return nil, err
- }
- return ctx, nil
-}
-
func (t *translator) TranslateRouteV2beta3(ar *configv2beta3.ApisixRoute)
(*translation.TranslateContext, error) {
ctx := translation.DefaultEmptyTranslateContext()
@@ -108,117 +83,6 @@ func (t *translator) TranslateRouteV2NotStrictly(ar
*configv2.ApisixRoute) (*tra
return ctx, nil
}
-func (t *translator) translateHTTPRouteV2beta2(ctx
*translation.TranslateContext, ar *configv2beta2.ApisixRoute) error {
- ruleNameMap := make(map[string]struct{})
- for _, part := range ar.Spec.HTTP {
- if _, ok := ruleNameMap[part.Name]; ok {
- return errors.New("duplicated route rule name")
- }
- ruleNameMap[part.Name] = struct{}{}
- backends := part.Backends
- // Use the first backend as the default backend in Route,
- // others will be configured in traffic-split plugin.
- backend := backends[0]
- backends = backends[1:]
-
- svcClusterIP, svcPort, err :=
t.GetServiceClusterIPAndPort(&backend, ar.Namespace)
- if err != nil {
- log.Errorw("failed to get service port in backend",
- zap.Any("backend", backend),
- zap.Any("apisix_route", ar),
- zap.Error(err),
- )
- return err
- }
-
- pluginMap := make(apisixv1.Plugins)
- // add route plugins
- for _, plugin := range part.Plugins {
- if !plugin.Enable {
- continue
- }
- if plugin.Config != nil {
- pluginMap[plugin.Name] = plugin.Config
- } else {
- pluginMap[plugin.Name] =
make(map[string]interface{})
- }
- }
-
- // add KeyAuth and basicAuth plugin
- if part.Authentication.Enable {
- switch part.Authentication.Type {
- case "keyAuth":
- pluginMap["key-auth"] =
part.Authentication.KeyAuth
- case "basicAuth":
- pluginMap["basic-auth"] =
make(map[string]interface{})
- default:
- pluginMap["basic-auth"] =
make(map[string]interface{})
- }
- }
-
- var exprs [][]apisixv1.StringOrSlice
- if part.Match.NginxVars != nil {
- exprs, err =
t.TranslateRouteMatchExprs(part.Match.NginxVars)
- if err != nil {
- log.Errorw("ApisixRoute with bad nginxVars",
- zap.Error(err),
- zap.Any("ApisixRoute", ar),
- )
- return err
- }
- }
- if err :=
translation.ValidateRemoteAddrs(part.Match.RemoteAddrs); err != nil {
- log.Errorw("ApisixRoute with invalid remote addrs",
- zap.Error(err),
- zap.Strings("remote_addrs",
part.Match.RemoteAddrs),
- zap.Any("ApisixRoute", ar),
- )
- return err
- }
-
- upstreamName := apisixv1.ComposeUpstreamName(ar.Namespace,
backend.ServiceName, backend.Subset, svcPort, backend.ResolveGranularity)
- route := apisixv1.NewDefaultRoute()
- route.Name = apisixv1.ComposeRouteName(ar.Namespace, ar.Name,
part.Name)
- route.ID = id.GenID(route.Name)
- route.Priority = part.Priority
- route.RemoteAddrs = part.Match.RemoteAddrs
- route.Vars = exprs
- route.Hosts = part.Match.Hosts
- route.Uris = part.Match.Paths
- route.Methods = part.Match.Methods
- route.UpstreamId = id.GenID(upstreamName)
- route.EnableWebsocket = part.Websocket
- route.Plugins = pluginMap
-
- if len(backends) > 0 {
- weight := translation.DefaultWeight
- if backend.Weight != nil {
- weight = *backend.Weight
- }
- backendPoints :=
make([]configv2.ApisixRouteHTTPBackend, 0)
- backendPoints = append(backendPoints, backends...)
- plugin, err := t.translateTrafficSplitPlugin(ctx,
ar.Namespace, weight, backendPoints)
- if err != nil {
- log.Errorw("failed to translate traffic-split
plugin",
- zap.Error(err),
- zap.Any("ApisixRoute", ar),
- )
- return err
- }
- route.Plugins["traffic-split"] = plugin
- }
- ctx.AddRoute(route)
- if !ctx.CheckUpstreamExist(upstreamName) {
- ups, err := t.translateService(ar.Namespace,
backend.ServiceName, backend.Subset, backend.ResolveGranularity, svcClusterIP,
svcPort)
- if err != nil {
- return err
- }
- ctx.AddUpstream(ups)
- }
- }
- return nil
-}
-
func (t *translator) translateHTTPRouteV2beta3(ctx
*translation.TranslateContext, ar *configv2beta3.ApisixRoute) error {
ruleNameMap := make(map[string]struct{})
for _, part := range ar.Spec.HTTP {
@@ -700,29 +564,6 @@ func (t *translator) TranslateRouteMatchExprs(nginxVars
[]configv2.ApisixRouteHT
return vars, nil
}
-// translateHTTPRouteV2beta2NotStrictly translates http route with a loose
way, only generate ID and Name for delete Event.
-func (t *translator) translateHTTPRouteV2beta2NotStrictly(ctx
*translation.TranslateContext, ar *configv2beta2.ApisixRoute) error {
- for _, part := range ar.Spec.HTTP {
- backends := part.Backends
- // Use the first backend as the default backend in Route,
- // others will be configured in traffic-split plugin.
- backend := backends[0]
- upstreamName := apisixv1.ComposeUpstreamName(ar.Namespace,
backend.ServiceName, backend.Subset, backend.ServicePort.IntVal,
backend.ResolveGranularity)
- route := apisixv1.NewDefaultRoute()
- route.Name = apisixv1.ComposeRouteName(ar.Namespace, ar.Name,
part.Name)
- route.ID = id.GenID(route.Name)
- ctx.AddRoute(route)
- if !ctx.CheckUpstreamExist(upstreamName) {
- ups, err :=
t.translateUpstreamNotStrictly(ar.Namespace, backend.ServiceName,
backend.Subset, backend.ServicePort.IntVal, backend.ResolveGranularity)
- if err != nil {
- return err
- }
- ctx.AddUpstream(ups)
- }
- }
- return nil
-}
-
// translateHTTPRouteV2beta3NotStrictly translates http route with a loose
way, only generate ID and Name for delete Event.
func (t *translator) translateHTTPRouteV2beta3NotStrictly(ctx
*translation.TranslateContext, ar *configv2beta3.ApisixRoute) error {
for _, part := range ar.Spec.HTTP {
@@ -856,41 +697,6 @@ func (t *translator) translateHTTPRouteV2NotStrictly(ctx
*translation.TranslateC
return nil
}
-func (t *translator) translateStreamRouteV2beta2(ctx
*translation.TranslateContext, ar *configv2beta2.ApisixRoute) error {
- ruleNameMap := make(map[string]struct{})
- for _, part := range ar.Spec.Stream {
- if _, ok := ruleNameMap[part.Name]; ok {
- return errors.New("duplicated route rule name")
- }
- ruleNameMap[part.Name] = struct{}{}
- backend := part.Backend
- svcClusterIP, svcPort, err :=
t.getStreamServiceClusterIPAndPortV2beta2(backend, ar.Namespace)
- if err != nil {
- log.Errorw("failed to get service port in backend",
- zap.Any("backend", backend),
- zap.Any("apisix_route", ar),
- zap.Error(err),
- )
- return err
- }
- sr := apisixv1.NewDefaultStreamRoute()
- name := apisixv1.ComposeStreamRouteName(ar.Namespace, ar.Name,
part.Name)
- sr.ID = id.GenID(name)
- sr.ServerPort = part.Match.IngressPort
- ups, err := t.translateService(ar.Namespace,
backend.ServiceName, backend.Subset, backend.ResolveGranularity, svcClusterIP,
svcPort)
- if err != nil {
- return err
- }
- sr.UpstreamId = ups.ID
- ctx.AddStreamRoute(sr)
- if !ctx.CheckUpstreamExist(ups.Name) {
- ctx.AddUpstream(ups)
- }
-
- }
- return nil
-}
-
func (t *translator) translateStreamRouteV2beta3(ctx
*translation.TranslateContext, ar *configv2beta3.ApisixRoute) error {
ruleNameMap := make(map[string]struct{})
for _, part := range ar.Spec.Stream {
@@ -976,27 +782,6 @@ func (t *translator) translateStreamRouteV2(ctx
*translation.TranslateContext, a
return nil
}
-// translateStreamRouteNotStrictlyV2beta2 translates tcp route with a loose
way, only generate ID and Name for delete Event.
-func (t *translator) translateStreamRouteNotStrictlyV2beta2(ctx
*translation.TranslateContext, ar *configv2beta2.ApisixRoute) error {
- for _, part := range ar.Spec.Stream {
- backend := &part.Backend
- sr := apisixv1.NewDefaultStreamRoute()
- name := apisixv1.ComposeStreamRouteName(ar.Namespace, ar.Name,
part.Name)
- sr.ID = id.GenID(name)
- sr.ServerPort = part.Match.IngressPort
- ups, err := t.translateUpstreamNotStrictly(ar.Namespace,
backend.ServiceName, backend.Subset, backend.ServicePort.IntVal,
backend.ResolveGranularity)
- if err != nil {
- return err
- }
- sr.UpstreamId = ups.ID
- ctx.AddStreamRoute(sr)
- if !ctx.CheckUpstreamExist(ups.Name) {
- ctx.AddUpstream(ups)
- }
- }
- return nil
-}
-
// translateStreamRouteNotStrictlyV2beta3 translates tcp route with a loose
way, only generate ID and Name for delete Event.
func (t *translator) translateStreamRouteNotStrictlyV2beta3(ctx
*translation.TranslateContext, ar *configv2beta3.ApisixRoute) error {
for _, part := range ar.Spec.Stream {
@@ -1078,46 +863,6 @@ loop:
return svc.Spec.ClusterIP, svcPort, nil
}
-// getStreamServiceClusterIPAndPortV2beta2 is for v2beta2 streamRoute
-func (t *translator) getStreamServiceClusterIPAndPortV2beta2(backend
configv2beta2.ApisixRouteStreamBackend, ns string) (string, int32, error) {
- svc, err := t.ServiceLister.Services(ns).Get(backend.ServiceName)
- if err != nil {
- return "", 0, err
- }
- svcPort := int32(-1)
- if backend.ResolveGranularity == "service" && svc.Spec.ClusterIP == "" {
- log.Errorw("ApisixRoute refers to a headless service but want
to use the service level resolve granularity",
- zap.String("ApisixRoute namespace", ns),
- zap.Any("service", svc),
- )
- return "", 0, errors.New("conflict headless service and backend
resolve granularity")
- }
-loop:
- for _, port := range svc.Spec.Ports {
- switch backend.ServicePort.Type {
- case intstr.Int:
- if backend.ServicePort.IntVal == port.Port {
- svcPort = port.Port
- break loop
- }
- case intstr.String:
- if backend.ServicePort.StrVal == port.Name {
- svcPort = port.Port
- break loop
- }
- }
- }
- if svcPort == -1 {
- log.Errorw("ApisixRoute refers to non-existent Service port",
- zap.String("ApisixRoute namespace", ns),
- zap.String("port", backend.ServicePort.String()),
- )
- return "", 0, err
- }
-
- return svc.Spec.ClusterIP, svcPort, nil
-}
-
// getStreamServiceClusterIPAndPortV2beta3 is for v2beta3 streamRoute
func (t *translator) getStreamServiceClusterIPAndPortV2beta3(backend
configv2beta3.ApisixRouteStreamBackend, ns string) (string, int32, error) {
svc, err := t.ServiceLister.Services(ns).Get(backend.ServiceName)
@@ -1204,8 +949,6 @@ func (t *translator) TranslateOldRoute(ar
kube.ApisixRoute) (*translation.Transl
return t.translateOldRouteV2(ar.V2())
case config.ApisixV2beta3:
return t.translateOldRouteV2beta3(ar.V2beta3())
- case config.ApisixV2beta2:
- return translation.DefaultEmptyTranslateContext(), nil
default:
return nil, fmt.Errorf("translator: source group version not
supported: %s", ar.GroupVersion())
}
diff --git a/pkg/providers/apisix/translation/translator.go
b/pkg/providers/apisix/translation/translator.go
index a15ff337..aa3899aa 100644
--- a/pkg/providers/apisix/translation/translator.go
+++ b/pkg/providers/apisix/translation/translator.go
@@ -22,7 +22,6 @@ import (
"github.com/apache/apisix-ingress-controller/pkg/apisix"
"github.com/apache/apisix-ingress-controller/pkg/kube"
configv2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2"
- configv2beta2
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta2"
configv2beta3
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta3"
"github.com/apache/apisix-ingress-controller/pkg/providers/translation"
apisixv1
"github.com/apache/apisix-ingress-controller/pkg/types/apisix/v1"
@@ -45,12 +44,6 @@ type translator struct {
type ApisixTranslator interface {
translation.Translator
- // TranslateRouteV2beta2 translates the configv2beta2.ApisixRoute
object into several Route,
- // and Upstream resources.
- TranslateRouteV2beta2(*configv2beta2.ApisixRoute)
(*translation.TranslateContext, error)
- // TranslateRouteV2beta2NotStrictly translates the
configv2beta2.ApisixRoute object into several Route,
- // and Upstream resources not strictly, only used for delete event.
- TranslateRouteV2beta2NotStrictly(*configv2beta2.ApisixRoute)
(*translation.TranslateContext, error)
// TranslateRouteV2beta3 translates the configv2beta3.ApisixRoute
object into several Route,
// Upstream and PluginConfig resources.
TranslateRouteV2beta3(*configv2beta3.ApisixRoute)
(*translation.TranslateContext, error)
diff --git a/samples/deploy/crd/v1/ApisixRoute.yaml
b/samples/deploy/crd/v1/ApisixRoute.yaml
index 13654b36..a5bc2380 100644
--- a/samples/deploy/crd/v1/ApisixRoute.yaml
+++ b/samples/deploy/crd/v1/ApisixRoute.yaml
@@ -29,266 +29,6 @@ spec:
shortNames:
- ar
versions:
- - name: v2beta2
- served: true
- storage: false
- subresources:
- status: {}
- additionalPrinterColumns:
- - jsonPath: .spec.http[].match.hosts
- name: Hosts
- type: string
- priority: 0
- - jsonPath: .spec.http[].match.paths
- name: URIs
- type: string
- priority: 0
- - jsonPath: .spec.http[].backends[].serviceName
- name: Target Service(HTTP)
- type: string
- priority: 1
- - jsonPath: .spec.tcp[].match.ingressPort
- name: Ingress Server Port(TCP)
- type: integer
- priority: 1
- - jsonPath: .spec.tcp[].match.backend.serviceName
- name: Target Service(TCP)
- type: string
- priority: 1
- - jsonPath: .metadata.creationTimestamp
- name: Age
- type: date
- priority: 0
- schema:
- openAPIV3Schema:
- type: object
- properties:
- spec:
- type: object
- anyOf:
- - required: ["http"]
- - required: ["stream"]
- properties:
- http:
- type: array
- minItems: 1
- items:
- type: object
- required: ["name", "match", "backends"]
- properties:
- name:
- type: string
- minLength: 1
- priority:
- type: integer
- timeout:
- type: object
- properties:
- connect:
- type: string
- send:
- type: string
- read:
- type: string
- match:
- type: object
- required:
- - paths
- properties:
- paths:
- type: array
- minItems: 1
- items:
- type: string
- pattern:
"^/[a-zA-Z0-9\\-._~%!$&'()+,;=:@/]*\\*?$"
- hosts:
- type: array
- minItems: 1
- items:
- type: string
- pattern: "^\\*?[0-9a-zA-Z-._]+$"
- methods:
- type: array
- minItems: 1
- items:
- type: string
- enum:
- - "CONNECT"
- - "DELETE"
- - "GET"
- - "HEAD"
- - "OPTIONS"
- - "PATCH"
- - "POST"
- - "PUT"
- - "TRACE"
- remoteAddrs:
- type: array
- minItems: 1
- items:
- type: string
- exprs:
- type: array
- minItems: 1
- items:
- type: object
- properties:
- subject:
- type: object
- properties:
- scope:
- type: string
- enum:
- - "Cookie"
- - "Header"
- - "Path"
- - "Query"
- name:
- type: string
- minLength: 1
- required:
- - scope
- op:
- type: string
- enum:
- - Equal
- - NotEqual
- - GreaterThan
- - LessThan
- - In
- - NotIn
- - RegexMatch
- - RegexNotMatch
- - RegexMatchCaseInsensitive
- - RegexNotMatchCaseInsensitive
- value:
- type: string
- set:
- type: array
- items:
- type: string
- oneOf:
- - required: ["subject", "op", "value"]
- - required: ["subject", "op", "set"]
- websocket:
- type: boolean
- backends:
- type: array
- minItems: 1
- items:
- type: object
- properties:
- serviceName:
- type: string
- minLength: 1
- servicePort:
- anyOf:
- - type: integer
- - type: string
- x-kubernetes-int-or-string: true
- resolveGranularity:
- type: string
- enum: ["endpoint", "service"]
- weight:
- type: integer
- minimum: 0
- subset:
- type: string
- required:
- - serviceName
- - servicePort
- plugins:
- type: array
- items:
- type: object
- properties:
- name:
- type: string
- minLength: 1
- enable:
- type: boolean
- config:
- type: object
- x-kubernetes-preserve-unknown-fields: true # we
have to enable it since plugin config
- required:
- - name
- - enable
- authentication:
- type: object
- properties:
- enable:
- type: boolean
- type:
- type: string
- enum:
- - "basicAuth"
- - "keyAuth"
- keyAuth:
- type: object
- properties:
- header:
- type: string
- required:
- - enable
- stream:
- type: array
- minItems: 1
- items:
- type: object
- required: ["name", "match", "backend", "protocol"]
- properties:
- "protocol":
- type: string
- enum: ["TCP", "UDP"]
- name:
- type: string
- minLength: 1
- match:
- type: object
- properties:
- ingressPort:
- type: integer
- minimum: 1
- maximum: 65535
- required:
- - ingressPort
- backend:
- type: object
- properties:
- serviceName:
- type: string
- minLength: 1
- servicePort:
- anyOf:
- - type: integer
- - type: string
- x-kubernetes-int-or-string: true
- resolveGranularity:
- type: string
- enum: ["endpoint", "service"]
- subset:
- type: string
- required:
- - serviceName
- - servicePort
- status:
- type: object
- properties:
- conditions:
- type: array
- items:
- type: object
- properties:
- "type":
- type: string
- reason:
- type: string
- status:
- type: string
- message:
- type: string
- observedGeneration:
- type: integer
- name: v2beta3
served: true
storage: false
diff --git a/test/e2e/suite-chore/chaos.go b/test/e2e/suite-chore/chaos.go
index 019fbfae..d0a6f408 100644
--- a/test/e2e/suite-chore/chaos.go
+++ b/test/e2e/suite-chore/chaos.go
@@ -31,7 +31,7 @@ var _ = ginkgo.Describe("suite-chore: Chaos Testing", func() {
assert.Nil(ginkgo.GinkgoT(),
s.EnsureNumApisixRoutesCreated(0), "checking number of upstreams")
backendSvc, backendSvcPort := s.DefaultHTTPBackend()
route1 := fmt.Sprintf(`
-apiVersion: apisix.apache.org/v2beta2
+apiVersion: apisix.apache.org/v2
kind: ApisixRoute
metadata:
name: httpbin-route1
@@ -51,7 +51,7 @@ spec:
assert.Nil(ginkgo.GinkgoT(),
s.EnsureNumApisixRoutesCreated(1), "checking number of routes")
s.RestartAPISIXDeploy()
route2 := fmt.Sprintf(`
-apiVersion: apisix.apache.org/v2beta2
+apiVersion: apisix.apache.org/v2
kind: ApisixRoute
metadata:
name: httpbin-route2
diff --git a/test/e2e/suite-features/scheme.go
b/test/e2e/suite-features/scheme.go
index 9dc11488..512575f7 100644
--- a/test/e2e/suite-features/scheme.go
+++ b/test/e2e/suite-features/scheme.go
@@ -139,7 +139,7 @@ spec:
`))
assert.NoError(ginkgo.GinkgoT(),
s.CreateVersionedApisixResource(`
-apiVersion: apisix.apache.org/v2beta2
+apiVersion: apisix.apache.org/v2beta3
kind: ApisixRoute
metadata:
name: grpcs-route
diff --git a/utils/update-codegen.sh b/utils/update-codegen.sh
index 4ec4816b..4f14e0f8 100755
--- a/utils/update-codegen.sh
+++ b/utils/update-codegen.sh
@@ -31,7 +31,7 @@ rm -rf "$GENERATED_ROOT"
bash "${SCRIPT_ROOT}"/generate-groups.sh "deepcopy,client,informer,lister" \
${PKG_NAME}/pkg/kube/apisix/client ${PKG_NAME}/pkg/kube/apisix/apis \
- config:v2,v2beta3,v2beta2 ${PKG_NAME} \
+ config:v2,v2beta3 ${PKG_NAME} \
--output-base "$GENERATED_ROOT" \
--go-header-file "${SCRIPT_ROOT}"/boilerplate.go.txt \
"$@"
@@ -45,7 +45,7 @@ bash "${SCRIPT_ROOT}"/generate-groups.sh "deepcopy" \
#bash "${SCRIPT_ROOT}"/generate-groups.sh "register" \
#${PKG_NAME}/pkg/kube/apisix/apis ${PKG_NAME}/pkg/kube/apisix/apis \
- #config:v2,v2beta3,v2beta2,v1 ${PKG_NAME} \
+ #config:v2,v2beta3,v1 ${PKG_NAME} \
#--output-base "$GENERATED_ROOT" \
#--go-header-file "${SCRIPT_ROOT}"/boilerplate.go.txt \
#"$@"
diff --git a/utils/verify-codegen.sh b/utils/verify-codegen.sh
index 51491a1e..5c5362e9 100755
--- a/utils/verify-codegen.sh
+++ b/utils/verify-codegen.sh
@@ -50,7 +50,7 @@ ret=0
bash "${SCRIPT_ROOT}"/generate-groups.sh "deepcopy,client,informer,lister" \
${PKG_NAME}/pkg/kube/apisix/client ${PKG_NAME}/pkg/kube/apisix/apis \
- config:v2,v2beta3,v2beta2 ${PKG_NAME} \
+ config:v2,v2beta3 ${PKG_NAME} \
--output-base "$GENERATED_ROOT" \
--go-header-file "${SCRIPT_ROOT}"/boilerplate.go.txt \
--verify-only || ret=$?
@@ -68,7 +68,7 @@ fi
#if [[ $ret -eq 0 ]]; then
#bash "${SCRIPT_ROOT}"/generate-groups.sh "register" \
#${PKG_NAME}/pkg/kube/apisix/apis ${PKG_NAME}/pkg/kube/apisix/apis \
- #config:v2,v2beta3,v2beta2,v1 ${PKG_NAME} \
+ #config:v2,v2beta3,v1 ${PKG_NAME} \
#--output-base "$GENERATED_ROOT" \
#--go-header-file "${SCRIPT_ROOT}"/boilerplate.go.txt \
#--verify-only|| ret=$?