diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index 3ed27fdc..ecac5a46 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -30,7 +30,7 @@ chmod +x ${CODEGEN_PKG}/generate-groups.sh ${CODEGEN_PKG}/generate-groups.sh all \ github.com/fluxcd/flagger/pkg/client github.com/fluxcd/flagger/pkg/apis \ - "flagger:v1beta1 appmesh:v1beta2 appmesh:v1beta1 istio:v1alpha3 smi:v1alpha1 smi:v1alpha2 smi:v1alpha3 gloo/gloo:v1 gloo/gateway:v1 projectcontour:v1 traefik:v1alpha1" \ + "flagger:v1beta1 appmesh:v1beta2 appmesh:v1beta1 istio:v1alpha3 smi:v1alpha1 smi:v1alpha2 smi:v1alpha3 gloo/gloo:v1 gloo/gateway:v1 projectcontour:v1 traefik:v1alpha1 kuma:v1alpha1" \ --output-base "${TEMP_DIR}" \ --go-header-file ${SCRIPT_ROOT}/hack/boilerplate.go.txt diff --git a/pkg/apis/kuma/register.go b/pkg/apis/kuma/register.go new file mode 100644 index 00000000..fd3cb1ac --- /dev/null +++ b/pkg/apis/kuma/register.go @@ -0,0 +1,5 @@ +package kuma + +const ( + GroupName = "kuma.io" +) diff --git a/pkg/apis/kuma/v1alpha1/doc.go b/pkg/apis/kuma/v1alpha1/doc.go new file mode 100644 index 00000000..0cb846ef --- /dev/null +++ b/pkg/apis/kuma/v1alpha1/doc.go @@ -0,0 +1,5 @@ +// +k8s:deepcopy-gen=package + +// Package v1 is the v1 version of the API. +// +groupName=kuma.io +package v1alpha1 diff --git a/pkg/apis/kuma/v1alpha1/register.go b/pkg/apis/kuma/v1alpha1/register.go new file mode 100644 index 00000000..81974cc5 --- /dev/null +++ b/pkg/apis/kuma/v1alpha1/register.go @@ -0,0 +1,36 @@ +package v1alpha1 + +import ( + "github.com/fluxcd/flagger/pkg/apis/kuma" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// SchemeGroupVersion is the GroupVersion for the Contour API +var SchemeGroupVersion = schema.GroupVersion{Group: kuma.GroupName, Version: "v1alpha1"} + +// Kind takes an unqualified kind and returns back a Group qualified GroupKind +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource gets an Contour GroupResource for a specified resource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to Scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &TrafficRoute{}, + &TrafficRouteList{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/pkg/apis/kuma/v1alpha1/trafficroute.go b/pkg/apis/kuma/v1alpha1/trafficroute.go new file mode 100644 index 00000000..f114ddac --- /dev/null +++ b/pkg/apis/kuma/v1alpha1/trafficroute.go @@ -0,0 +1,41 @@ +/* +Copyright 2019 Kuma authors. +Licensed 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 v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" +) + +// TrafficRoute is the Schema for the Traffic Routes API. +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true +type TrafficRoute struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Mesh string `json:"mesh,omitempty"` + + Spec unstructured.Unstructured `json:"spec,omitempty"` +} + +// TrafficRouteList contains a list of TrafficRoutes. +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true +type TrafficRouteList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []TrafficRoute `json:"items"` +} diff --git a/pkg/apis/kuma/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/kuma/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 00000000..1c50c980 --- /dev/null +++ b/pkg/apis/kuma/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,86 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright 2020 The Flux authors + +Licensed 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 v1alpha1 + +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 *TrafficRoute) DeepCopyInto(out *TrafficRoute) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrafficRoute. +func (in *TrafficRoute) DeepCopy() *TrafficRoute { + if in == nil { + return nil + } + out := new(TrafficRoute) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TrafficRoute) 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 *TrafficRouteList) DeepCopyInto(out *TrafficRouteList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TrafficRoute, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrafficRouteList. +func (in *TrafficRouteList) DeepCopy() *TrafficRouteList { + if in == nil { + return nil + } + out := new(TrafficRouteList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TrafficRouteList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} diff --git a/pkg/client/clientset/versioned/clientset.go b/pkg/client/clientset/versioned/clientset.go index d923ab7b..ecc007f5 100644 --- a/pkg/client/clientset/versioned/clientset.go +++ b/pkg/client/clientset/versioned/clientset.go @@ -28,6 +28,7 @@ import ( gatewayv1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/gateway/v1" gloov1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/gloo/v1" networkingv1alpha3 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/istio/v1alpha3" + kumav1alpha1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/kuma/v1alpha1" projectcontourv1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/projectcontour/v1" splitv1alpha1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/smi/v1alpha1" splitv1alpha2 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/smi/v1alpha2" @@ -46,6 +47,7 @@ type Interface interface { GatewayV1() gatewayv1.GatewayV1Interface GlooV1() gloov1.GlooV1Interface NetworkingV1alpha3() networkingv1alpha3.NetworkingV1alpha3Interface + KumaV1alpha1() kumav1alpha1.KumaV1alpha1Interface ProjectcontourV1() projectcontourv1.ProjectcontourV1Interface SplitV1alpha1() splitv1alpha1.SplitV1alpha1Interface SplitV1alpha2() splitv1alpha2.SplitV1alpha2Interface @@ -63,6 +65,7 @@ type Clientset struct { gatewayV1 *gatewayv1.GatewayV1Client glooV1 *gloov1.GlooV1Client networkingV1alpha3 *networkingv1alpha3.NetworkingV1alpha3Client + kumaV1alpha1 *kumav1alpha1.KumaV1alpha1Client projectcontourV1 *projectcontourv1.ProjectcontourV1Client splitV1alpha1 *splitv1alpha1.SplitV1alpha1Client splitV1alpha2 *splitv1alpha2.SplitV1alpha2Client @@ -100,6 +103,11 @@ func (c *Clientset) NetworkingV1alpha3() networkingv1alpha3.NetworkingV1alpha3In return c.networkingV1alpha3 } +// KumaV1alpha1 retrieves the KumaV1alpha1Client +func (c *Clientset) KumaV1alpha1() kumav1alpha1.KumaV1alpha1Interface { + return c.kumaV1alpha1 +} + // ProjectcontourV1 retrieves the ProjectcontourV1Client func (c *Clientset) ProjectcontourV1() projectcontourv1.ProjectcontourV1Interface { return c.projectcontourV1 @@ -189,6 +197,10 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } + cs.kumaV1alpha1, err = kumav1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } cs.projectcontourV1, err = projectcontourv1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err @@ -236,6 +248,7 @@ func New(c rest.Interface) *Clientset { cs.gatewayV1 = gatewayv1.New(c) cs.glooV1 = gloov1.New(c) cs.networkingV1alpha3 = networkingv1alpha3.New(c) + cs.kumaV1alpha1 = kumav1alpha1.New(c) cs.projectcontourV1 = projectcontourv1.New(c) cs.splitV1alpha1 = splitv1alpha1.New(c) cs.splitV1alpha2 = splitv1alpha2.New(c) diff --git a/pkg/client/clientset/versioned/fake/clientset_generated.go b/pkg/client/clientset/versioned/fake/clientset_generated.go index 63e5a360..0c8b64c8 100644 --- a/pkg/client/clientset/versioned/fake/clientset_generated.go +++ b/pkg/client/clientset/versioned/fake/clientset_generated.go @@ -32,6 +32,8 @@ import ( fakegloov1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/gloo/v1/fake" networkingv1alpha3 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/istio/v1alpha3" fakenetworkingv1alpha3 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/istio/v1alpha3/fake" + kumav1alpha1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/kuma/v1alpha1" + fakekumav1alpha1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/kuma/v1alpha1/fake" projectcontourv1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/projectcontour/v1" fakeprojectcontourv1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/projectcontour/v1/fake" splitv1alpha1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/smi/v1alpha1" @@ -129,6 +131,11 @@ func (c *Clientset) NetworkingV1alpha3() networkingv1alpha3.NetworkingV1alpha3In return &fakenetworkingv1alpha3.FakeNetworkingV1alpha3{Fake: &c.Fake} } +// KumaV1alpha1 retrieves the KumaV1alpha1Client +func (c *Clientset) KumaV1alpha1() kumav1alpha1.KumaV1alpha1Interface { + return &fakekumav1alpha1.FakeKumaV1alpha1{Fake: &c.Fake} +} + // ProjectcontourV1 retrieves the ProjectcontourV1Client func (c *Clientset) ProjectcontourV1() projectcontourv1.ProjectcontourV1Interface { return &fakeprojectcontourv1.FakeProjectcontourV1{Fake: &c.Fake} diff --git a/pkg/client/clientset/versioned/fake/register.go b/pkg/client/clientset/versioned/fake/register.go index 18145710..f4f594b0 100644 --- a/pkg/client/clientset/versioned/fake/register.go +++ b/pkg/client/clientset/versioned/fake/register.go @@ -25,6 +25,7 @@ import ( gatewayv1 "github.com/fluxcd/flagger/pkg/apis/gloo/gateway/v1" gloov1 "github.com/fluxcd/flagger/pkg/apis/gloo/gloo/v1" networkingv1alpha3 "github.com/fluxcd/flagger/pkg/apis/istio/v1alpha3" + kumav1alpha1 "github.com/fluxcd/flagger/pkg/apis/kuma/v1alpha1" projectcontourv1 "github.com/fluxcd/flagger/pkg/apis/projectcontour/v1" splitv1alpha1 "github.com/fluxcd/flagger/pkg/apis/smi/v1alpha1" splitv1alpha2 "github.com/fluxcd/flagger/pkg/apis/smi/v1alpha2" @@ -47,6 +48,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ gatewayv1.AddToScheme, gloov1.AddToScheme, networkingv1alpha3.AddToScheme, + kumav1alpha1.AddToScheme, projectcontourv1.AddToScheme, splitv1alpha1.AddToScheme, splitv1alpha2.AddToScheme, diff --git a/pkg/client/clientset/versioned/scheme/register.go b/pkg/client/clientset/versioned/scheme/register.go index 0c95149c..a5082453 100644 --- a/pkg/client/clientset/versioned/scheme/register.go +++ b/pkg/client/clientset/versioned/scheme/register.go @@ -25,6 +25,7 @@ import ( gatewayv1 "github.com/fluxcd/flagger/pkg/apis/gloo/gateway/v1" gloov1 "github.com/fluxcd/flagger/pkg/apis/gloo/gloo/v1" networkingv1alpha3 "github.com/fluxcd/flagger/pkg/apis/istio/v1alpha3" + kumav1alpha1 "github.com/fluxcd/flagger/pkg/apis/kuma/v1alpha1" projectcontourv1 "github.com/fluxcd/flagger/pkg/apis/projectcontour/v1" splitv1alpha1 "github.com/fluxcd/flagger/pkg/apis/smi/v1alpha1" splitv1alpha2 "github.com/fluxcd/flagger/pkg/apis/smi/v1alpha2" @@ -47,6 +48,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ gatewayv1.AddToScheme, gloov1.AddToScheme, networkingv1alpha3.AddToScheme, + kumav1alpha1.AddToScheme, projectcontourv1.AddToScheme, splitv1alpha1.AddToScheme, splitv1alpha2.AddToScheme, diff --git a/pkg/client/clientset/versioned/typed/kuma/v1alpha1/doc.go b/pkg/client/clientset/versioned/typed/kuma/v1alpha1/doc.go new file mode 100644 index 00000000..9c7b8cc3 --- /dev/null +++ b/pkg/client/clientset/versioned/typed/kuma/v1alpha1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2020 The Flux authors + +Licensed 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 v1alpha1 diff --git a/pkg/client/clientset/versioned/typed/kuma/v1alpha1/fake/doc.go b/pkg/client/clientset/versioned/typed/kuma/v1alpha1/fake/doc.go new file mode 100644 index 00000000..1ccd9119 --- /dev/null +++ b/pkg/client/clientset/versioned/typed/kuma/v1alpha1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2020 The Flux authors + +Licensed 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/client/clientset/versioned/typed/kuma/v1alpha1/fake/fake_kuma_client.go b/pkg/client/clientset/versioned/typed/kuma/v1alpha1/fake/fake_kuma_client.go new file mode 100644 index 00000000..a4601509 --- /dev/null +++ b/pkg/client/clientset/versioned/typed/kuma/v1alpha1/fake/fake_kuma_client.go @@ -0,0 +1,35 @@ +/* +Copyright 2020 The Flux authors + +Licensed 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 ( + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeKumaV1alpha1 struct { + *testing.Fake +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeKumaV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/pkg/client/clientset/versioned/typed/kuma/v1alpha1/generated_expansion.go b/pkg/client/clientset/versioned/typed/kuma/v1alpha1/generated_expansion.go new file mode 100644 index 00000000..8e2fcbe1 --- /dev/null +++ b/pkg/client/clientset/versioned/typed/kuma/v1alpha1/generated_expansion.go @@ -0,0 +1,19 @@ +/* +Copyright 2020 The Flux authors + +Licensed 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 v1alpha1 diff --git a/pkg/client/clientset/versioned/typed/kuma/v1alpha1/kuma_client.go b/pkg/client/clientset/versioned/typed/kuma/v1alpha1/kuma_client.go new file mode 100644 index 00000000..1da7cce6 --- /dev/null +++ b/pkg/client/clientset/versioned/typed/kuma/v1alpha1/kuma_client.go @@ -0,0 +1,102 @@ +/* +Copyright 2020 The Flux authors + +Licensed 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 v1alpha1 + +import ( + "net/http" + + v1alpha1 "github.com/fluxcd/flagger/pkg/apis/kuma/v1alpha1" + "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme" + rest "k8s.io/client-go/rest" +) + +type KumaV1alpha1Interface interface { + RESTClient() rest.Interface +} + +// KumaV1alpha1Client is used to interact with features provided by the kuma.io group. +type KumaV1alpha1Client struct { + restClient rest.Interface +} + +// NewForConfig creates a new KumaV1alpha1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*KumaV1alpha1Client, 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 KumaV1alpha1Client 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) (*KumaV1alpha1Client, 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 &KumaV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new KumaV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *KumaV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new KumaV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *KumaV1alpha1Client { + return &KumaV1alpha1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1alpha1.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 *KumaV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +}