This is an automated email from the ASF dual-hosted git repository.

gallardot 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 b7329b04 chore: clean up apisix v1 (#1916)
b7329b04 is described below

commit b7329b04719a74948cfa6e35aafa509822c7a1b5
Author: Jintao Zhang <[email protected]>
AuthorDate: Fri Aug 4 15:26:51 2023 +0800

    chore: clean up apisix v1 (#1916)
    
    Signed-off-by: Jintao Zhang <[email protected]>
---
 pkg/kube/apisix/apis/config/v1/doc.go              |  18 -
 pkg/kube/apisix/apis/config/v1/types.go            | 333 ----------
 .../apisix/apis/config/v1/zz_generated.deepcopy.go | 718 ---------------------
 .../apisix/apis/config/v1/zz_generated.register.go |  73 ---
 4 files changed, 1142 deletions(-)

diff --git a/pkg/kube/apisix/apis/config/v1/doc.go 
b/pkg/kube/apisix/apis/config/v1/doc.go
deleted file mode 100644
index 3e5e5ff8..00000000
--- a/pkg/kube/apisix/apis/config/v1/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 v1
diff --git a/pkg/kube/apisix/apis/config/v1/types.go 
b/pkg/kube/apisix/apis/config/v1/types.go
deleted file mode 100644
index 4cfcf4e1..00000000
--- a/pkg/kube/apisix/apis/config/v1/types.go
+++ /dev/null
@@ -1,333 +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 v1
-
-import (
-       "encoding/json"
-       "time"
-
-       metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-
-       v2 
"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2"
-)
-
-// +genclient
-// +genclient:noStatus
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-// ApisixRoute is used to define the route rules and upstreams for Apache 
APISIX.
-// The definition closes the Kubernetes Ingress resource.
-// +kubebuilder:resource:shortName=ar
-// +kubebuilder:pruning:PreserveUnknownFields
-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"`
-}
-
-// ApisixRouteSpec is the spec definition for ApisixRouteSpec.
-type ApisixRouteSpec struct {
-       Rules []Rule `json:"rules,omitempty" yaml:"rules,omitempty"`
-}
-
-// Rule represents a single route rule in ApisixRoute.
-type Rule struct {
-       Host string `json:"host,omitempty" yaml:"host,omitempty"`
-       Http Http   `json:"http,omitempty" yaml:"http,omitempty"`
-}
-
-// Http represents all route rules in HTTP scope.
-type Http struct {
-       Paths []Path `json:"paths,omitempty" yaml:"paths,omitempty"`
-}
-
-// Path defines an URI based route rule.
-type Path struct {
-       Path    string           `json:"path,omitempty" yaml:"path,omitempty"`
-       Backend Backend          `json:"backend,omitempty" 
yaml:"backend,omitempty"`
-       Timeout *UpstreamTimeout `json:"timeout,omitempty" 
yaml:"timeout,omitempty"`
-       Plugins []Plugin         `json:"plugins,omitempty" 
yaml:"plugins,omitempty"`
-}
-
-// Backend defines an upstream, it should be an existing Kubernetes Service.
-// Note the Service should be in the same namespace with ApisixRoute resource,
-// i.e. cross namespacing is not allowed.
-type Backend struct {
-       ServiceName string `json:"serviceName,omitempty" 
yaml:"serviceName,omitempty"`
-       ServicePort int    `json:"servicePort,omitempty" 
yaml:"servicePort,omitempty"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-type ApisixRouteList struct {
-       metav1.TypeMeta `json:",inline" yaml:",inline"`
-       metav1.ListMeta `json:"metadata" yaml:"metadata"`
-       Items           []ApisixRoute `json:"items,omitempty" 
yaml:"items,omitempty"`
-}
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-// +kubebuilder:subresource:status
-// ApisixUpstream is a decorator for Kubernetes Service, it arms the Service
-// with rich features like health check, retry policies, load balancer and 
others.
-// It's designed to have same name with the Kubernetes Service and can be 
customized
-// for individual port.
-type ApisixUpstream struct {
-       metav1.TypeMeta   `json:",inline" yaml:",inline"`
-       metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`
-
-       Spec   *ApisixUpstreamSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
-       Status v2.ApisixStatus     `json:"status,omitempty" 
yaml:"status,omitempty"`
-}
-
-// ApisixUpstreamSpec describes the specification of ApisixUpstream.
-type ApisixUpstreamSpec struct {
-       ApisixUpstreamConfig `json:",inline" yaml:",inline"`
-
-       PortLevelSettings []PortLevelSettings 
`json:"portLevelSettings,omitempty" yaml:"portLevelSettings,omitempty"`
-}
-
-// ApisixUpstreamConfig contains rich features on APISIX Upstream, for instance
-// load balancer, health check and etc.
-type ApisixUpstreamConfig struct {
-       // LoadBalancer represents the load balancer configuration for 
Kubernetes Service.
-       // The default strategy is round robin.
-       // +optional
-       LoadBalancer *LoadBalancer `json:"loadbalancer,omitempty" 
yaml:"loadbalancer,omitempty"`
-       // The scheme used to talk with the upstream.
-       // Now value can be http, grpc.
-       // +optional
-       Scheme string `json:"scheme,omitempty" yaml:"scheme,omitempty"`
-
-       // How many times that the proxy (Apache APISIX) should do when
-       // errors occur (error, timeout or bad http status codes like 500, 502).
-       // +optional
-       Retries *int `json:"retries,omitempty" yaml:"retries,omitempty"`
-
-       // Timeout settings for the read, send and connect to the upstream.
-       // +optional
-       Timeout *UpstreamTimeout `json:"timeout,omitempty" 
yaml:"timeout,omitempty"`
-
-       // The health check configurations for the upstream.
-       // +optional
-       HealthCheck *HealthCheck `json:"healthCheck,omitempty" 
yaml:"healthCheck,omitempty"`
-
-       // Set the client certificate when connecting to TLS upstream.
-       // +optional
-       TLSSecret *ApisixSecret `json:"tlsSecret,omitempty" 
yaml:"tlsSecret,omitempty"`
-
-       // Subsets groups the service endpoints by their labels. Usually used 
to differentiate
-       // service versions.
-       // +optional
-       Subsets []ApisixUpstreamSubset `json:"subsets,omitempty" 
yaml:"subsets,omitempty"`
-}
-
-// ApisixUpstreamSubset defines a single endpoints group of one Service.
-type ApisixUpstreamSubset struct {
-       // Name is the name of subset.
-       Name string `json:"name" yaml:"name"`
-       // Labels is the label set of this subset.
-       Labels map[string]string `json:"labels" yaml:"labels"`
-}
-
-// 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"`
-}
-
-// PortLevelSettings configures the ApisixUpstreamConfig for each individual 
port. It inherits
-// configurations from the outer level (the whole Kubernetes Service) and 
overrides some of
-// them if they are set on the port level.
-type PortLevelSettings struct {
-       ApisixUpstreamConfig `json:",inline" yaml:",inline"`
-
-       // Port is a Kubernetes Service port, it should be already defined.
-       Port int32 `json:"port" yaml:"port"`
-}
-
-// LoadBalancer describes the load balancing parameters.
-type LoadBalancer struct {
-       Type string `json:"type" yaml:"type"`
-       // The HashOn and Key fields are required when Type is "chash".
-       // HashOn represents the key fetching scope.
-       HashOn string `json:"hashOn,omitempty" yaml:"hashOn,omitempty"`
-       // Key represents the hash key.
-       Key string `json:"key,omitempty" yaml:"key,omitempty"`
-}
-
-// HealthCheck describes the upstream health check parameters.
-type HealthCheck struct {
-       Active  *ActiveHealthCheck  `json:"active" yaml:"active"`
-       Passive *PassiveHealthCheck `json:"passive,omitempty" 
yaml:"passive,omitempty"`
-}
-
-// ActiveHealthCheck defines the active kind of upstream health check.
-type ActiveHealthCheck struct {
-       Type           string                      `json:"type,omitempty" 
yaml:"type,omitempty"`
-       Timeout        time.Duration               `json:"timeout,omitempty" 
yaml:"timeout,omitempty"`
-       Concurrency    int                         
`json:"concurrency,omitempty" yaml:"concurrency,omitempty"`
-       Host           string                      `json:"host,omitempty" 
yaml:"host,omitempty"`
-       Port           int32                       `json:"port,omitempty" 
yaml:"port,omitempty"`
-       HTTPPath       string                      `json:"httpPath,omitempty" 
yaml:"httpPath,omitempty"`
-       StrictTLS      *bool                       `json:"strictTLS,omitempty" 
yaml:"strictTLS,omitempty"`
-       RequestHeaders []string                    
`json:"requestHeaders,omitempty" yaml:"requestHeaders,omitempty"`
-       Healthy        *ActiveHealthCheckHealthy   `json:"healthy,omitempty" 
yaml:"healthy,omitempty"`
-       Unhealthy      *ActiveHealthCheckUnhealthy `json:"unhealthy,omitempty" 
yaml:"unhealthy,omitempty"`
-}
-
-// PassiveHealthCheck defines the conditions to judge whether
-// an upstream node is healthy with the passive manager.
-type PassiveHealthCheck struct {
-       Type      string                       `json:"type,omitempty" 
yaml:"type,omitempty"`
-       Healthy   *PassiveHealthCheckHealthy   `json:"healthy,omitempty" 
yaml:"healthy,omitempty"`
-       Unhealthy *PassiveHealthCheckUnhealthy `json:"unhealthy,omitempty" 
yaml:"unhealthy,omitempty"`
-}
-
-// ActiveHealthCheckHealthy defines the conditions to judge whether
-// an upstream node is healthy with the active manner.
-type ActiveHealthCheckHealthy struct {
-       PassiveHealthCheckHealthy `json:",inline" yaml:",inline"`
-
-       Interval metav1.Duration `json:"interval,omitempty" 
yaml:"interval,omitempty"`
-}
-
-// ActiveHealthCheckUnhealthy defines the conditions to judge whether
-// an upstream node is unhealthy with the active manager.
-type ActiveHealthCheckUnhealthy struct {
-       PassiveHealthCheckUnhealthy `json:",inline" yaml:",inline"`
-
-       Interval metav1.Duration `json:"interval,omitempty" 
yaml:"interval,omitempty"`
-}
-
-// PassiveHealthCheckHealthy defines the conditions to judge whether
-// an upstream node is healthy with the passive manner.
-type PassiveHealthCheckHealthy struct {
-       HTTPCodes []int `json:"httpCodes,omitempty" yaml:"httpCodes,omitempty"`
-       Successes int   `json:"successes,omitempty" yaml:"successes,omitempty"`
-}
-
-// PassiveHealthCheckUnhealthy defines the conditions to judge whether
-// an upstream node is unhealthy with the passive manager.
-type PassiveHealthCheckUnhealthy struct {
-       HTTPCodes    []int `json:"httpCodes,omitempty" 
yaml:"httpCodes,omitempty"`
-       HTTPFailures int   `json:"httpFailures,omitempty" 
yaml:"http_failures,omitempty"`
-       TCPFailures  int   `json:"tcpFailures,omitempty" 
yaml:"tcpFailures,omitempty"`
-       Timeouts     int   `json:"timeout,omitempty" yaml:"timeout,omitempty"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-type ApisixUpstreamList struct {
-       metav1.TypeMeta `json:",inline" yaml:",inline"`
-       metav1.ListMeta `json:"metadata" yaml:"metadata"`
-       Items           []ApisixUpstream `json:"items,omitempty" 
yaml:"items,omitempty"`
-}
-
-type Plugin struct {
-       Name      string    `json:"name,omitempty" yaml:"name,omitempty"`
-       Enable    bool      `json:"enable,omitempty" yaml:"enable,omitempty"`
-       Config    Config    `json:"config,omitempty" yaml:"config,omitempty"`
-       ConfigSet ConfigSet `json:"config_set,omitempty" 
yaml:"config_set,omitempty"`
-}
-
-type ConfigSet []interface{}
-
-func (p ConfigSet) DeepCopyInto(out *ConfigSet) {
-       b, _ := json.Marshal(&p)
-       _ = json.Unmarshal(b, out)
-}
-
-func (p *ConfigSet) DeepCopy() *ConfigSet {
-       if p == nil {
-               return nil
-       }
-       out := new(ConfigSet)
-       p.DeepCopyInto(out)
-       return out
-}
-
-type Config map[string]interface{}
-
-func (p Config) DeepCopyInto(out *Config) {
-       b, _ := json.Marshal(&p)
-       _ = json.Unmarshal(b, out)
-}
-
-func (p *Config) DeepCopy() *Config {
-       if p == nil {
-               return nil
-       }
-       out := new(Config)
-       p.DeepCopyInto(out)
-       return out
-}
-
-// +genclient
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-// +kubebuilder:resource:shortName=atls
-// +kubebuilder:subresource:status
-// ApisixTls defines SSL resource in APISIX.
-type ApisixTls struct {
-       metav1.TypeMeta   `json:",inline" yaml:",inline"`
-       metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`
-       Spec              *ApisixTlsSpec `json:"spec,omitempty" 
yaml:"spec,omitempty"`
-       // +optional
-       Status v2.ApisixStatus `json:"status,omitempty" yaml:"status,omitempty"`
-}
-
-// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
-// +kubebuilder:printcolumn:name="SNIs",type=string,JSONPath=`.spec.hosts`
-// +kubebuilder:printcolumn:name="Secret 
Name",type=string,JSONPath=`.spec.secret.name`
-// +kubebuilder:printcolumn:name="Secret 
Namespace",type=string,JSONPath=`.spec.secret.namespace`
-// 
+kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
-// +kubebuilder:printcolumn:name="Client CA Secret 
Name",type=string,JSONPath=`.spec.client.ca.name`
-// +kubebuilder:printcolumn:name="Client CA Secret 
Namespace",type=string,JSONPath=`.spec.client.ca.namespace`
-type ApisixTlsList struct {
-       metav1.TypeMeta `json:",inline" yaml:",inline"`
-       metav1.ListMeta `json:"metadata" yaml:"metadata"`
-       Items           []ApisixTls `json:"items,omitempty" 
yaml:"items,omitempty"`
-}
-
-// +kubebuilder:validation:Pattern="^\\*?[0-9a-zA-Z-.]+$"
-type HostType string
-
-// ApisixTlsSpec is the specification of ApisixSSL.
-type ApisixTlsSpec struct {
-       // +required
-       // +kubebuilder:validation:Required
-       // +kubebuilder:validation:MinItems=1
-       Hosts []HostType `json:"hosts" yaml:"hosts,omitempty"`
-       // +required
-       // +kubebuilder:validation:Required
-       Secret ApisixSecret `json:"secret" yaml:"secret"`
-       // +optional
-       Client *ApisixMutualTlsClientConfig `json:"client,omitempty" 
yaml:"client,omitempty"`
-}
-
-// ApisixSecret describes the Kubernetes Secret name and namespace.
-type ApisixSecret struct {
-       // +kubebuilder:validation:MinLength=1
-       // +kubebuilder:validation:Required
-       Name string `json:"name" yaml:"name"`
-       // +kubebuilder:validation:MinLength=1
-       // +kubebuilder:validation:Required
-       Namespace string `json:"namespace" yaml:"namespace"`
-}
-
-// ApisixMutualTlsClientConfig describes the mutual TLS CA and verify depth
-type ApisixMutualTlsClientConfig struct {
-       CASecret ApisixSecret `json:"caSecret,omitempty" 
yaml:"caSecret,omitempty"`
-       Depth    int          `json:"depth,omitempty" yaml:"depth,omitempty"`
-}
diff --git a/pkg/kube/apisix/apis/config/v1/zz_generated.deepcopy.go 
b/pkg/kube/apisix/apis/config/v1/zz_generated.deepcopy.go
deleted file mode 100644
index d6ae7cbd..00000000
--- a/pkg/kube/apisix/apis/config/v1/zz_generated.deepcopy.go
+++ /dev/null
@@ -1,718 +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 v1
-
-import (
-       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 *ActiveHealthCheck) DeepCopyInto(out *ActiveHealthCheck) {
-       *out = *in
-       if in.StrictTLS != nil {
-               in, out := &in.StrictTLS, &out.StrictTLS
-               *out = new(bool)
-               **out = **in
-       }
-       if in.RequestHeaders != nil {
-               in, out := &in.RequestHeaders, &out.RequestHeaders
-               *out = make([]string, len(*in))
-               copy(*out, *in)
-       }
-       if in.Healthy != nil {
-               in, out := &in.Healthy, &out.Healthy
-               *out = new(ActiveHealthCheckHealthy)
-               (*in).DeepCopyInto(*out)
-       }
-       if in.Unhealthy != nil {
-               in, out := &in.Unhealthy, &out.Unhealthy
-               *out = new(ActiveHealthCheckUnhealthy)
-               (*in).DeepCopyInto(*out)
-       }
-       return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new ActiveHealthCheck.
-func (in *ActiveHealthCheck) DeepCopy() *ActiveHealthCheck {
-       if in == nil {
-               return nil
-       }
-       out := new(ActiveHealthCheck)
-       in.DeepCopyInto(out)
-       return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, 
writing into out. in must be non-nil.
-func (in *ActiveHealthCheckHealthy) DeepCopyInto(out 
*ActiveHealthCheckHealthy) {
-       *out = *in
-       
in.PassiveHealthCheckHealthy.DeepCopyInto(&out.PassiveHealthCheckHealthy)
-       out.Interval = in.Interval
-       return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new ActiveHealthCheckHealthy.
-func (in *ActiveHealthCheckHealthy) DeepCopy() *ActiveHealthCheckHealthy {
-       if in == nil {
-               return nil
-       }
-       out := new(ActiveHealthCheckHealthy)
-       in.DeepCopyInto(out)
-       return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, 
writing into out. in must be non-nil.
-func (in *ActiveHealthCheckUnhealthy) DeepCopyInto(out 
*ActiveHealthCheckUnhealthy) {
-       *out = *in
-       
in.PassiveHealthCheckUnhealthy.DeepCopyInto(&out.PassiveHealthCheckUnhealthy)
-       out.Interval = in.Interval
-       return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new ActiveHealthCheckUnhealthy.
-func (in *ActiveHealthCheckUnhealthy) DeepCopy() *ActiveHealthCheckUnhealthy {
-       if in == nil {
-               return nil
-       }
-       out := new(ActiveHealthCheckUnhealthy)
-       in.DeepCopyInto(out)
-       return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, 
writing into out. in must be non-nil.
-func (in *ApisixMutualTlsClientConfig) DeepCopyInto(out 
*ApisixMutualTlsClientConfig) {
-       *out = *in
-       out.CASecret = in.CASecret
-       return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new ApisixMutualTlsClientConfig.
-func (in *ApisixMutualTlsClientConfig) DeepCopy() *ApisixMutualTlsClientConfig 
{
-       if in == nil {
-               return nil
-       }
-       out := new(ApisixMutualTlsClientConfig)
-       in.DeepCopyInto(out)
-       return out
-}
-
-// 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)
-       if in.Spec != nil {
-               in, out := &in.Spec, &out.Spec
-               *out = new(ApisixRouteSpec)
-               (*in).DeepCopyInto(*out)
-       }
-       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 *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.Rules != nil {
-               in, out := &in.Rules, &out.Rules
-               *out = make([]Rule, len(*in))
-               for i := range *in {
-                       (*in)[i].DeepCopyInto(&(*out)[i])
-               }
-       }
-       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 *ApisixSecret) DeepCopyInto(out *ApisixSecret) {
-       *out = *in
-       return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new ApisixSecret.
-func (in *ApisixSecret) DeepCopy() *ApisixSecret {
-       if in == nil {
-               return nil
-       }
-       out := new(ApisixSecret)
-       in.DeepCopyInto(out)
-       return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, 
writing into out. in must be non-nil.
-func (in *ApisixTls) DeepCopyInto(out *ApisixTls) {
-       *out = *in
-       out.TypeMeta = in.TypeMeta
-       in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
-       if in.Spec != nil {
-               in, out := &in.Spec, &out.Spec
-               *out = new(ApisixTlsSpec)
-               (*in).DeepCopyInto(*out)
-       }
-       in.Status.DeepCopyInto(&out.Status)
-       return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new ApisixTls.
-func (in *ApisixTls) DeepCopy() *ApisixTls {
-       if in == nil {
-               return nil
-       }
-       out := new(ApisixTls)
-       in.DeepCopyInto(out)
-       return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, 
creating a new runtime.Object.
-func (in *ApisixTls) 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 *ApisixTlsList) DeepCopyInto(out *ApisixTlsList) {
-       *out = *in
-       out.TypeMeta = in.TypeMeta
-       in.ListMeta.DeepCopyInto(&out.ListMeta)
-       if in.Items != nil {
-               in, out := &in.Items, &out.Items
-               *out = make([]ApisixTls, len(*in))
-               for i := range *in {
-                       (*in)[i].DeepCopyInto(&(*out)[i])
-               }
-       }
-       return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new ApisixTlsList.
-func (in *ApisixTlsList) DeepCopy() *ApisixTlsList {
-       if in == nil {
-               return nil
-       }
-       out := new(ApisixTlsList)
-       in.DeepCopyInto(out)
-       return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, 
creating a new runtime.Object.
-func (in *ApisixTlsList) 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 *ApisixTlsSpec) DeepCopyInto(out *ApisixTlsSpec) {
-       *out = *in
-       if in.Hosts != nil {
-               in, out := &in.Hosts, &out.Hosts
-               *out = make([]HostType, len(*in))
-               copy(*out, *in)
-       }
-       out.Secret = in.Secret
-       if in.Client != nil {
-               in, out := &in.Client, &out.Client
-               *out = new(ApisixMutualTlsClientConfig)
-               **out = **in
-       }
-       return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new ApisixTlsSpec.
-func (in *ApisixTlsSpec) DeepCopy() *ApisixTlsSpec {
-       if in == nil {
-               return nil
-       }
-       out := new(ApisixTlsSpec)
-       in.DeepCopyInto(out)
-       return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, 
writing into out. in must be non-nil.
-func (in *ApisixUpstream) DeepCopyInto(out *ApisixUpstream) {
-       *out = *in
-       out.TypeMeta = in.TypeMeta
-       in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
-       if in.Spec != nil {
-               in, out := &in.Spec, &out.Spec
-               *out = new(ApisixUpstreamSpec)
-               (*in).DeepCopyInto(*out)
-       }
-       in.Status.DeepCopyInto(&out.Status)
-       return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new ApisixUpstream.
-func (in *ApisixUpstream) DeepCopy() *ApisixUpstream {
-       if in == nil {
-               return nil
-       }
-       out := new(ApisixUpstream)
-       in.DeepCopyInto(out)
-       return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, 
creating a new runtime.Object.
-func (in *ApisixUpstream) 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 *ApisixUpstreamConfig) DeepCopyInto(out *ApisixUpstreamConfig) {
-       *out = *in
-       if in.LoadBalancer != nil {
-               in, out := &in.LoadBalancer, &out.LoadBalancer
-               *out = new(LoadBalancer)
-               **out = **in
-       }
-       if in.Retries != nil {
-               in, out := &in.Retries, &out.Retries
-               *out = new(int)
-               **out = **in
-       }
-       if in.Timeout != nil {
-               in, out := &in.Timeout, &out.Timeout
-               *out = new(UpstreamTimeout)
-               **out = **in
-       }
-       if in.HealthCheck != nil {
-               in, out := &in.HealthCheck, &out.HealthCheck
-               *out = new(HealthCheck)
-               (*in).DeepCopyInto(*out)
-       }
-       if in.TLSSecret != nil {
-               in, out := &in.TLSSecret, &out.TLSSecret
-               *out = new(ApisixSecret)
-               **out = **in
-       }
-       if in.Subsets != nil {
-               in, out := &in.Subsets, &out.Subsets
-               *out = make([]ApisixUpstreamSubset, len(*in))
-               for i := range *in {
-                       (*in)[i].DeepCopyInto(&(*out)[i])
-               }
-       }
-       return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new ApisixUpstreamConfig.
-func (in *ApisixUpstreamConfig) DeepCopy() *ApisixUpstreamConfig {
-       if in == nil {
-               return nil
-       }
-       out := new(ApisixUpstreamConfig)
-       in.DeepCopyInto(out)
-       return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, 
writing into out. in must be non-nil.
-func (in *ApisixUpstreamList) DeepCopyInto(out *ApisixUpstreamList) {
-       *out = *in
-       out.TypeMeta = in.TypeMeta
-       in.ListMeta.DeepCopyInto(&out.ListMeta)
-       if in.Items != nil {
-               in, out := &in.Items, &out.Items
-               *out = make([]ApisixUpstream, len(*in))
-               for i := range *in {
-                       (*in)[i].DeepCopyInto(&(*out)[i])
-               }
-       }
-       return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new ApisixUpstreamList.
-func (in *ApisixUpstreamList) DeepCopy() *ApisixUpstreamList {
-       if in == nil {
-               return nil
-       }
-       out := new(ApisixUpstreamList)
-       in.DeepCopyInto(out)
-       return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, 
creating a new runtime.Object.
-func (in *ApisixUpstreamList) 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 *ApisixUpstreamSpec) DeepCopyInto(out *ApisixUpstreamSpec) {
-       *out = *in
-       in.ApisixUpstreamConfig.DeepCopyInto(&out.ApisixUpstreamConfig)
-       if in.PortLevelSettings != nil {
-               in, out := &in.PortLevelSettings, &out.PortLevelSettings
-               *out = make([]PortLevelSettings, len(*in))
-               for i := range *in {
-                       (*in)[i].DeepCopyInto(&(*out)[i])
-               }
-       }
-       return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new ApisixUpstreamSpec.
-func (in *ApisixUpstreamSpec) DeepCopy() *ApisixUpstreamSpec {
-       if in == nil {
-               return nil
-       }
-       out := new(ApisixUpstreamSpec)
-       in.DeepCopyInto(out)
-       return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, 
writing into out. in must be non-nil.
-func (in *ApisixUpstreamSubset) DeepCopyInto(out *ApisixUpstreamSubset) {
-       *out = *in
-       if in.Labels != nil {
-               in, out := &in.Labels, &out.Labels
-               *out = make(map[string]string, len(*in))
-               for key, val := range *in {
-                       (*out)[key] = val
-               }
-       }
-       return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new ApisixUpstreamSubset.
-func (in *ApisixUpstreamSubset) DeepCopy() *ApisixUpstreamSubset {
-       if in == nil {
-               return nil
-       }
-       out := new(ApisixUpstreamSubset)
-       in.DeepCopyInto(out)
-       return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, 
writing into out. in must be non-nil.
-func (in *Backend) DeepCopyInto(out *Backend) {
-       *out = *in
-       return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new Backend.
-func (in *Backend) DeepCopy() *Backend {
-       if in == nil {
-               return nil
-       }
-       out := new(Backend)
-       in.DeepCopyInto(out)
-       return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, 
writing into out. in must be non-nil.
-func (in *HealthCheck) DeepCopyInto(out *HealthCheck) {
-       *out = *in
-       if in.Active != nil {
-               in, out := &in.Active, &out.Active
-               *out = new(ActiveHealthCheck)
-               (*in).DeepCopyInto(*out)
-       }
-       if in.Passive != nil {
-               in, out := &in.Passive, &out.Passive
-               *out = new(PassiveHealthCheck)
-               (*in).DeepCopyInto(*out)
-       }
-       return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new HealthCheck.
-func (in *HealthCheck) DeepCopy() *HealthCheck {
-       if in == nil {
-               return nil
-       }
-       out := new(HealthCheck)
-       in.DeepCopyInto(out)
-       return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, 
writing into out. in must be non-nil.
-func (in *Http) DeepCopyInto(out *Http) {
-       *out = *in
-       if in.Paths != nil {
-               in, out := &in.Paths, &out.Paths
-               *out = make([]Path, len(*in))
-               for i := range *in {
-                       (*in)[i].DeepCopyInto(&(*out)[i])
-               }
-       }
-       return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new Http.
-func (in *Http) DeepCopy() *Http {
-       if in == nil {
-               return nil
-       }
-       out := new(Http)
-       in.DeepCopyInto(out)
-       return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, 
writing into out. in must be non-nil.
-func (in *LoadBalancer) DeepCopyInto(out *LoadBalancer) {
-       *out = *in
-       return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new LoadBalancer.
-func (in *LoadBalancer) DeepCopy() *LoadBalancer {
-       if in == nil {
-               return nil
-       }
-       out := new(LoadBalancer)
-       in.DeepCopyInto(out)
-       return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, 
writing into out. in must be non-nil.
-func (in *PassiveHealthCheck) DeepCopyInto(out *PassiveHealthCheck) {
-       *out = *in
-       if in.Healthy != nil {
-               in, out := &in.Healthy, &out.Healthy
-               *out = new(PassiveHealthCheckHealthy)
-               (*in).DeepCopyInto(*out)
-       }
-       if in.Unhealthy != nil {
-               in, out := &in.Unhealthy, &out.Unhealthy
-               *out = new(PassiveHealthCheckUnhealthy)
-               (*in).DeepCopyInto(*out)
-       }
-       return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new PassiveHealthCheck.
-func (in *PassiveHealthCheck) DeepCopy() *PassiveHealthCheck {
-       if in == nil {
-               return nil
-       }
-       out := new(PassiveHealthCheck)
-       in.DeepCopyInto(out)
-       return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, 
writing into out. in must be non-nil.
-func (in *PassiveHealthCheckHealthy) DeepCopyInto(out 
*PassiveHealthCheckHealthy) {
-       *out = *in
-       if in.HTTPCodes != nil {
-               in, out := &in.HTTPCodes, &out.HTTPCodes
-               *out = make([]int, len(*in))
-               copy(*out, *in)
-       }
-       return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new PassiveHealthCheckHealthy.
-func (in *PassiveHealthCheckHealthy) DeepCopy() *PassiveHealthCheckHealthy {
-       if in == nil {
-               return nil
-       }
-       out := new(PassiveHealthCheckHealthy)
-       in.DeepCopyInto(out)
-       return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, 
writing into out. in must be non-nil.
-func (in *PassiveHealthCheckUnhealthy) DeepCopyInto(out 
*PassiveHealthCheckUnhealthy) {
-       *out = *in
-       if in.HTTPCodes != nil {
-               in, out := &in.HTTPCodes, &out.HTTPCodes
-               *out = make([]int, len(*in))
-               copy(*out, *in)
-       }
-       return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new PassiveHealthCheckUnhealthy.
-func (in *PassiveHealthCheckUnhealthy) DeepCopy() *PassiveHealthCheckUnhealthy 
{
-       if in == nil {
-               return nil
-       }
-       out := new(PassiveHealthCheckUnhealthy)
-       in.DeepCopyInto(out)
-       return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, 
writing into out. in must be non-nil.
-func (in *Path) DeepCopyInto(out *Path) {
-       *out = *in
-       out.Backend = in.Backend
-       if in.Timeout != nil {
-               in, out := &in.Timeout, &out.Timeout
-               *out = new(UpstreamTimeout)
-               **out = **in
-       }
-       if in.Plugins != nil {
-               in, out := &in.Plugins, &out.Plugins
-               *out = make([]Plugin, len(*in))
-               for i := range *in {
-                       (*in)[i].DeepCopyInto(&(*out)[i])
-               }
-       }
-       return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new Path.
-func (in *Path) DeepCopy() *Path {
-       if in == nil {
-               return nil
-       }
-       out := new(Path)
-       in.DeepCopyInto(out)
-       return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, 
writing into out. in must be non-nil.
-func (in *Plugin) DeepCopyInto(out *Plugin) {
-       *out = *in
-       in.Config.DeepCopyInto(&out.Config)
-       in.ConfigSet.DeepCopyInto(&out.ConfigSet)
-       return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new Plugin.
-func (in *Plugin) DeepCopy() *Plugin {
-       if in == nil {
-               return nil
-       }
-       out := new(Plugin)
-       in.DeepCopyInto(out)
-       return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, 
writing into out. in must be non-nil.
-func (in *PortLevelSettings) DeepCopyInto(out *PortLevelSettings) {
-       *out = *in
-       in.ApisixUpstreamConfig.DeepCopyInto(&out.ApisixUpstreamConfig)
-       return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new PortLevelSettings.
-func (in *PortLevelSettings) DeepCopy() *PortLevelSettings {
-       if in == nil {
-               return nil
-       }
-       out := new(PortLevelSettings)
-       in.DeepCopyInto(out)
-       return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, 
writing into out. in must be non-nil.
-func (in *Rule) DeepCopyInto(out *Rule) {
-       *out = *in
-       in.Http.DeepCopyInto(&out.Http)
-       return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new Rule.
-func (in *Rule) DeepCopy() *Rule {
-       if in == nil {
-               return nil
-       }
-       out := new(Rule)
-       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/v1/zz_generated.register.go 
b/pkg/kube/apisix/apis/config/v1/zz_generated.register.go
deleted file mode 100644
index 1f4f2e4e..00000000
--- a/pkg/kube/apisix/apis/config/v1/zz_generated.register.go
+++ /dev/null
@@ -1,73 +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 v1
-
-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: "v1"}
-
-// SchemeGroupVersion is group version used to register these objects
-// Deprecated: use GroupVersion instead.
-var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}
-
-// 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{},
-               &ApisixTls{},
-               &ApisixTlsList{},
-               &ApisixUpstream{},
-               &ApisixUpstreamList{},
-       )
-       // AddToGroupVersion allows the serialization of client types like 
ListOptions.
-       v1.AddToGroupVersion(scheme, SchemeGroupVersion)
-       return nil
-}


Reply via email to