diff --git a/Gopkg.lock b/Gopkg.lock index 8c15eab9390..cd6e0a0be71 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -253,23 +253,23 @@ name = "github.com/knative/serving" packages = [ "pkg/apis/istio", - "pkg/apis/istio/v1alpha2", + "pkg/apis/istio/v1alpha3", "pkg/apis/serving", "pkg/apis/serving/v1alpha1", "pkg/client/clientset/versioned", "pkg/client/clientset/versioned/scheme", - "pkg/client/clientset/versioned/typed/istio/v1alpha2", + "pkg/client/clientset/versioned/typed/istio/v1alpha3", "pkg/client/clientset/versioned/typed/serving/v1alpha1", "pkg/client/informers/externalversions", "pkg/client/informers/externalversions/internalinterfaces", "pkg/client/informers/externalversions/istio", - "pkg/client/informers/externalversions/istio/v1alpha2", + "pkg/client/informers/externalversions/istio/v1alpha3", "pkg/client/informers/externalversions/serving", "pkg/client/informers/externalversions/serving/v1alpha1", - "pkg/client/listers/istio/v1alpha2", + "pkg/client/listers/istio/v1alpha3", "pkg/client/listers/serving/v1alpha1" ] - revision = "5e4bb4f8eb2aa1417fd51c95e4e9594e8ca32ace" + revision = "22e3cb0f057daf224ef3af5cc37feb9b152f880e" [[projects]] name = "github.com/magiconair/properties" @@ -897,6 +897,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "57160e3a149c468ed4f796aff5aa759b14537b54cb0587137f0a935714eae4c5" + inputs-digest = "e317f39c351af27ab91cd73376a0ab864311ac9be87400814c5e17e825c48a30" solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index 7bd61b5f284..a2c7ed49519 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -84,5 +84,5 @@ required = [ [[constraint]] name = "github.com/knative/serving" - # HEAD as of 2018-06-28, chosen for no particular reason - revision = "5e4bb4f8eb2aa1417fd51c95e4e9594e8ca32ace" + # HEAD as of 2018-06-29 + revision = "22e3cb0f057daf224ef3af5cc37feb9b152f880e" diff --git a/cmd/controller/main.go b/cmd/controller/main.go index 24af1785be6..e091a2c083f 100644 --- a/cmd/controller/main.go +++ b/cmd/controller/main.go @@ -97,7 +97,7 @@ func main() { controllers := make([]controller.Interface, 0, len(ctors)) for _, ctor := range ctors { controllers = append(controllers, - ctor(kubeClient, client, kubeInformerFactory, informerFactory, servingInformerFactory)) + ctor(kubeClient, client, servingClient, kubeInformerFactory, informerFactory, servingInformerFactory)) } go kubeInformerFactory.Start(stopCh) diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index f5710039756..18e003263bb 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -27,7 +27,7 @@ CODEGEN_PKG=${CODEGEN_PKG:-$(cd ${SCRIPT_ROOT}; ls -d -1 ./vendor/k8s.io/code-ge # instead of the $GOPATH directly. For normal projects this can be dropped. ${CODEGEN_PKG}/generate-groups.sh "deepcopy,client,informer,lister" \ github.com/knative/eventing/pkg/client github.com/knative/eventing/pkg/apis \ - "channels:v1alpha1 feeds:v1alpha1, istio:v1alpha3" \ + "channels:v1alpha1 feeds:v1alpha1" \ --go-header-file ${SCRIPT_ROOT}/hack/boilerplate/boilerplate.go.txt # Make sure our dependencies are up-to-date diff --git a/pkg/apis/istio/register.go b/pkg/apis/istio/register.go deleted file mode 100644 index 647eb38a0e1..00000000000 --- a/pkg/apis/istio/register.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright 2018 The Knative 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 istio - -const ( - GroupName = "networking.istio.io" -) diff --git a/pkg/client/clientset/versioned/clientset.go b/pkg/client/clientset/versioned/clientset.go index 996d0135583..ae51f0e4c98 100644 --- a/pkg/client/clientset/versioned/clientset.go +++ b/pkg/client/clientset/versioned/clientset.go @@ -22,7 +22,6 @@ import ( glog "github.com/golang/glog" channelsv1alpha1 "github.com/knative/eventing/pkg/client/clientset/versioned/typed/channels/v1alpha1" feedsv1alpha1 "github.com/knative/eventing/pkg/client/clientset/versioned/typed/feeds/v1alpha1" - networkingv1alpha3 "github.com/knative/eventing/pkg/client/clientset/versioned/typed/istio/v1alpha3" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" @@ -36,18 +35,14 @@ type Interface interface { FeedsV1alpha1() feedsv1alpha1.FeedsV1alpha1Interface // Deprecated: please explicitly pick a version if possible. Feeds() feedsv1alpha1.FeedsV1alpha1Interface - NetworkingV1alpha3() networkingv1alpha3.NetworkingV1alpha3Interface - // Deprecated: please explicitly pick a version if possible. - Networking() networkingv1alpha3.NetworkingV1alpha3Interface } // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { *discovery.DiscoveryClient - channelsV1alpha1 *channelsv1alpha1.ChannelsV1alpha1Client - feedsV1alpha1 *feedsv1alpha1.FeedsV1alpha1Client - networkingV1alpha3 *networkingv1alpha3.NetworkingV1alpha3Client + channelsV1alpha1 *channelsv1alpha1.ChannelsV1alpha1Client + feedsV1alpha1 *feedsv1alpha1.FeedsV1alpha1Client } // ChannelsV1alpha1 retrieves the ChannelsV1alpha1Client @@ -72,17 +67,6 @@ func (c *Clientset) Feeds() feedsv1alpha1.FeedsV1alpha1Interface { return c.feedsV1alpha1 } -// NetworkingV1alpha3 retrieves the NetworkingV1alpha3Client -func (c *Clientset) NetworkingV1alpha3() networkingv1alpha3.NetworkingV1alpha3Interface { - return c.networkingV1alpha3 -} - -// Deprecated: Networking retrieves the default version of NetworkingClient. -// Please explicitly pick a version. -func (c *Clientset) Networking() networkingv1alpha3.NetworkingV1alpha3Interface { - return c.networkingV1alpha3 -} - // Discovery retrieves the DiscoveryClient func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { @@ -107,10 +91,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { if err != nil { return nil, err } - cs.networkingV1alpha3, err = networkingv1alpha3.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) if err != nil { @@ -126,7 +106,6 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { var cs Clientset cs.channelsV1alpha1 = channelsv1alpha1.NewForConfigOrDie(c) cs.feedsV1alpha1 = feedsv1alpha1.NewForConfigOrDie(c) - cs.networkingV1alpha3 = networkingv1alpha3.NewForConfigOrDie(c) cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) return &cs @@ -137,7 +116,6 @@ func New(c rest.Interface) *Clientset { var cs Clientset cs.channelsV1alpha1 = channelsv1alpha1.New(c) cs.feedsV1alpha1 = feedsv1alpha1.New(c) - cs.networkingV1alpha3 = networkingv1alpha3.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) return &cs diff --git a/pkg/client/clientset/versioned/fake/clientset_generated.go b/pkg/client/clientset/versioned/fake/clientset_generated.go index 2727cc99a87..b83d8d15052 100644 --- a/pkg/client/clientset/versioned/fake/clientset_generated.go +++ b/pkg/client/clientset/versioned/fake/clientset_generated.go @@ -24,8 +24,6 @@ import ( fakechannelsv1alpha1 "github.com/knative/eventing/pkg/client/clientset/versioned/typed/channels/v1alpha1/fake" feedsv1alpha1 "github.com/knative/eventing/pkg/client/clientset/versioned/typed/feeds/v1alpha1" fakefeedsv1alpha1 "github.com/knative/eventing/pkg/client/clientset/versioned/typed/feeds/v1alpha1/fake" - networkingv1alpha3 "github.com/knative/eventing/pkg/client/clientset/versioned/typed/istio/v1alpha3" - fakenetworkingv1alpha3 "github.com/knative/eventing/pkg/client/clientset/versioned/typed/istio/v1alpha3/fake" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" @@ -93,13 +91,3 @@ func (c *Clientset) FeedsV1alpha1() feedsv1alpha1.FeedsV1alpha1Interface { func (c *Clientset) Feeds() feedsv1alpha1.FeedsV1alpha1Interface { return &fakefeedsv1alpha1.FakeFeedsV1alpha1{Fake: &c.Fake} } - -// NetworkingV1alpha3 retrieves the NetworkingV1alpha3Client -func (c *Clientset) NetworkingV1alpha3() networkingv1alpha3.NetworkingV1alpha3Interface { - return &fakenetworkingv1alpha3.FakeNetworkingV1alpha3{Fake: &c.Fake} -} - -// Networking retrieves the NetworkingV1alpha3Client -func (c *Clientset) Networking() networkingv1alpha3.NetworkingV1alpha3Interface { - return &fakenetworkingv1alpha3.FakeNetworkingV1alpha3{Fake: &c.Fake} -} diff --git a/pkg/client/clientset/versioned/fake/register.go b/pkg/client/clientset/versioned/fake/register.go index 1a8ea553bd6..3c2e7771fd1 100644 --- a/pkg/client/clientset/versioned/fake/register.go +++ b/pkg/client/clientset/versioned/fake/register.go @@ -21,7 +21,6 @@ package fake import ( channelsv1alpha1 "github.com/knative/eventing/pkg/apis/channels/v1alpha1" feedsv1alpha1 "github.com/knative/eventing/pkg/apis/feeds/v1alpha1" - networkingv1alpha3 "github.com/knative/eventing/pkg/apis/istio/v1alpha3" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -54,5 +53,4 @@ func init() { func AddToScheme(scheme *runtime.Scheme) { channelsv1alpha1.AddToScheme(scheme) feedsv1alpha1.AddToScheme(scheme) - networkingv1alpha3.AddToScheme(scheme) } diff --git a/pkg/client/clientset/versioned/scheme/register.go b/pkg/client/clientset/versioned/scheme/register.go index 556b1bc16fb..172f530f63c 100644 --- a/pkg/client/clientset/versioned/scheme/register.go +++ b/pkg/client/clientset/versioned/scheme/register.go @@ -21,7 +21,6 @@ package scheme import ( channelsv1alpha1 "github.com/knative/eventing/pkg/apis/channels/v1alpha1" feedsv1alpha1 "github.com/knative/eventing/pkg/apis/feeds/v1alpha1" - networkingv1alpha3 "github.com/knative/eventing/pkg/apis/istio/v1alpha3" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -54,5 +53,4 @@ func init() { func AddToScheme(scheme *runtime.Scheme) { channelsv1alpha1.AddToScheme(scheme) feedsv1alpha1.AddToScheme(scheme) - networkingv1alpha3.AddToScheme(scheme) } diff --git a/pkg/client/clientset/versioned/typed/istio/v1alpha3/doc.go b/pkg/client/clientset/versioned/typed/istio/v1alpha3/doc.go deleted file mode 100644 index acea591f3a3..00000000000 --- a/pkg/client/clientset/versioned/typed/istio/v1alpha3/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2018 The Knative 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 v1alpha3 diff --git a/pkg/client/clientset/versioned/typed/istio/v1alpha3/fake/doc.go b/pkg/client/clientset/versioned/typed/istio/v1alpha3/fake/doc.go deleted file mode 100644 index 128aa183a91..00000000000 --- a/pkg/client/clientset/versioned/typed/istio/v1alpha3/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2018 The Knative 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/istio/v1alpha3/fake/fake_gateway.go b/pkg/client/clientset/versioned/typed/istio/v1alpha3/fake/fake_gateway.go deleted file mode 100644 index 99bfe846457..00000000000 --- a/pkg/client/clientset/versioned/typed/istio/v1alpha3/fake/fake_gateway.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 2018 The Knative 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 ( - v1alpha3 "github.com/knative/eventing/pkg/apis/istio/v1alpha3" - 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" -) - -// FakeGateways implements GatewayInterface -type FakeGateways struct { - Fake *FakeNetworkingV1alpha3 - ns string -} - -var gatewaysResource = schema.GroupVersionResource{Group: "networking.istio.io", Version: "v1alpha3", Resource: "gateways"} - -var gatewaysKind = schema.GroupVersionKind{Group: "networking.istio.io", Version: "v1alpha3", Kind: "Gateway"} - -// Get takes name of the gateway, and returns the corresponding gateway object, and an error if there is any. -func (c *FakeGateways) Get(name string, options v1.GetOptions) (result *v1alpha3.Gateway, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(gatewaysResource, c.ns, name), &v1alpha3.Gateway{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha3.Gateway), err -} - -// List takes label and field selectors, and returns the list of Gateways that match those selectors. -func (c *FakeGateways) List(opts v1.ListOptions) (result *v1alpha3.GatewayList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(gatewaysResource, gatewaysKind, c.ns, opts), &v1alpha3.GatewayList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha3.GatewayList{} - for _, item := range obj.(*v1alpha3.GatewayList).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 gateways. -func (c *FakeGateways) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(gatewaysResource, c.ns, opts)) - -} - -// Create takes the representation of a gateway and creates it. Returns the server's representation of the gateway, and an error, if there is any. -func (c *FakeGateways) Create(gateway *v1alpha3.Gateway) (result *v1alpha3.Gateway, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(gatewaysResource, c.ns, gateway), &v1alpha3.Gateway{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha3.Gateway), err -} - -// Update takes the representation of a gateway and updates it. Returns the server's representation of the gateway, and an error, if there is any. -func (c *FakeGateways) Update(gateway *v1alpha3.Gateway) (result *v1alpha3.Gateway, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(gatewaysResource, c.ns, gateway), &v1alpha3.Gateway{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha3.Gateway), err -} - -// Delete takes name of the gateway and deletes it. Returns an error if one occurs. -func (c *FakeGateways) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(gatewaysResource, c.ns, name), &v1alpha3.Gateway{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeGateways) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(gatewaysResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &v1alpha3.GatewayList{}) - return err -} - -// Patch applies the patch and returns the patched gateway. -func (c *FakeGateways) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.Gateway, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(gatewaysResource, c.ns, name, data, subresources...), &v1alpha3.Gateway{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha3.Gateway), err -} diff --git a/pkg/client/clientset/versioned/typed/istio/v1alpha3/fake/fake_istio_client.go b/pkg/client/clientset/versioned/typed/istio/v1alpha3/fake/fake_istio_client.go deleted file mode 100644 index 658acaad6ca..00000000000 --- a/pkg/client/clientset/versioned/typed/istio/v1alpha3/fake/fake_istio_client.go +++ /dev/null @@ -1,44 +0,0 @@ -/* -Copyright 2018 The Knative 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 ( - v1alpha3 "github.com/knative/eventing/pkg/client/clientset/versioned/typed/istio/v1alpha3" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeNetworkingV1alpha3 struct { - *testing.Fake -} - -func (c *FakeNetworkingV1alpha3) Gateways(namespace string) v1alpha3.GatewayInterface { - return &FakeGateways{c, namespace} -} - -func (c *FakeNetworkingV1alpha3) VirtualServices(namespace string) v1alpha3.VirtualServiceInterface { - return &FakeVirtualServices{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeNetworkingV1alpha3) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/pkg/client/clientset/versioned/typed/istio/v1alpha3/fake/fake_virtualservice.go b/pkg/client/clientset/versioned/typed/istio/v1alpha3/fake/fake_virtualservice.go deleted file mode 100644 index dfc6473e11b..00000000000 --- a/pkg/client/clientset/versioned/typed/istio/v1alpha3/fake/fake_virtualservice.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 2018 The Knative 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 ( - v1alpha3 "github.com/knative/eventing/pkg/apis/istio/v1alpha3" - 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" -) - -// FakeVirtualServices implements VirtualServiceInterface -type FakeVirtualServices struct { - Fake *FakeNetworkingV1alpha3 - ns string -} - -var virtualservicesResource = schema.GroupVersionResource{Group: "networking.istio.io", Version: "v1alpha3", Resource: "virtualservices"} - -var virtualservicesKind = schema.GroupVersionKind{Group: "networking.istio.io", Version: "v1alpha3", Kind: "VirtualService"} - -// Get takes name of the virtualService, and returns the corresponding virtualService object, and an error if there is any. -func (c *FakeVirtualServices) Get(name string, options v1.GetOptions) (result *v1alpha3.VirtualService, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(virtualservicesResource, c.ns, name), &v1alpha3.VirtualService{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha3.VirtualService), err -} - -// List takes label and field selectors, and returns the list of VirtualServices that match those selectors. -func (c *FakeVirtualServices) List(opts v1.ListOptions) (result *v1alpha3.VirtualServiceList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(virtualservicesResource, virtualservicesKind, c.ns, opts), &v1alpha3.VirtualServiceList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha3.VirtualServiceList{} - for _, item := range obj.(*v1alpha3.VirtualServiceList).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 virtualServices. -func (c *FakeVirtualServices) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(virtualservicesResource, c.ns, opts)) - -} - -// Create takes the representation of a virtualService and creates it. Returns the server's representation of the virtualService, and an error, if there is any. -func (c *FakeVirtualServices) Create(virtualService *v1alpha3.VirtualService) (result *v1alpha3.VirtualService, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(virtualservicesResource, c.ns, virtualService), &v1alpha3.VirtualService{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha3.VirtualService), err -} - -// Update takes the representation of a virtualService and updates it. Returns the server's representation of the virtualService, and an error, if there is any. -func (c *FakeVirtualServices) Update(virtualService *v1alpha3.VirtualService) (result *v1alpha3.VirtualService, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(virtualservicesResource, c.ns, virtualService), &v1alpha3.VirtualService{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha3.VirtualService), err -} - -// Delete takes name of the virtualService and deletes it. Returns an error if one occurs. -func (c *FakeVirtualServices) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(virtualservicesResource, c.ns, name), &v1alpha3.VirtualService{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeVirtualServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(virtualservicesResource, c.ns, listOptions) - - _, err := c.Fake.Invokes(action, &v1alpha3.VirtualServiceList{}) - return err -} - -// Patch applies the patch and returns the patched virtualService. -func (c *FakeVirtualServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha3.VirtualService, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(virtualservicesResource, c.ns, name, data, subresources...), &v1alpha3.VirtualService{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha3.VirtualService), err -} diff --git a/pkg/client/informers/externalversions/factory.go b/pkg/client/informers/externalversions/factory.go index 5e8700458b3..8e8d5bf4685 100644 --- a/pkg/client/informers/externalversions/factory.go +++ b/pkg/client/informers/externalversions/factory.go @@ -27,7 +27,6 @@ import ( channels "github.com/knative/eventing/pkg/client/informers/externalversions/channels" feeds "github.com/knative/eventing/pkg/client/informers/externalversions/feeds" internalinterfaces "github.com/knative/eventing/pkg/client/informers/externalversions/internalinterfaces" - istio "github.com/knative/eventing/pkg/client/informers/externalversions/istio" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -127,7 +126,6 @@ type SharedInformerFactory interface { Channels() channels.Interface Feeds() feeds.Interface - Networking() istio.Interface } func (f *sharedInformerFactory) Channels() channels.Interface { @@ -137,7 +135,3 @@ func (f *sharedInformerFactory) Channels() channels.Interface { func (f *sharedInformerFactory) Feeds() feeds.Interface { return feeds.New(f, f.namespace, f.tweakListOptions) } - -func (f *sharedInformerFactory) Networking() istio.Interface { - return istio.New(f, f.namespace, f.tweakListOptions) -} diff --git a/pkg/client/informers/externalversions/generic.go b/pkg/client/informers/externalversions/generic.go index 5c93b4c19cb..aaaff129ddd 100644 --- a/pkg/client/informers/externalversions/generic.go +++ b/pkg/client/informers/externalversions/generic.go @@ -23,7 +23,6 @@ import ( v1alpha1 "github.com/knative/eventing/pkg/apis/channels/v1alpha1" feeds_v1alpha1 "github.com/knative/eventing/pkg/apis/feeds/v1alpha1" - v1alpha3 "github.com/knative/eventing/pkg/apis/istio/v1alpha3" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) @@ -72,12 +71,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case feeds_v1alpha1.SchemeGroupVersion.WithResource("eventtypes"): return &genericInformer{resource: resource.GroupResource(), informer: f.Feeds().V1alpha1().EventTypes().Informer()}, nil - // Group=networking.istio.io, Version=v1alpha3 - case v1alpha3.SchemeGroupVersion.WithResource("gateways"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1alpha3().Gateways().Informer()}, nil - case v1alpha3.SchemeGroupVersion.WithResource("virtualservices"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1alpha3().VirtualServices().Informer()}, nil - } return nil, fmt.Errorf("no informer found for %v", resource) diff --git a/pkg/client/informers/externalversions/istio/interface.go b/pkg/client/informers/externalversions/istio/interface.go deleted file mode 100644 index a2724e8bc19..00000000000 --- a/pkg/client/informers/externalversions/istio/interface.go +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright 2018 The Knative 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 informer-gen. DO NOT EDIT. - -package networking - -import ( - internalinterfaces "github.com/knative/eventing/pkg/client/informers/externalversions/internalinterfaces" - v1alpha3 "github.com/knative/eventing/pkg/client/informers/externalversions/istio/v1alpha3" -) - -// Interface provides access to each of this group's versions. -type Interface interface { - // V1alpha3 provides access to shared informers for resources in V1alpha3. - V1alpha3() v1alpha3.Interface -} - -type group 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 &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// V1alpha3 returns a new v1alpha3.Interface. -func (g *group) V1alpha3() v1alpha3.Interface { - return v1alpha3.New(g.factory, g.namespace, g.tweakListOptions) -} diff --git a/pkg/controller/bind/controller.go b/pkg/controller/bind/controller.go index 5a5f6d8c0f0..32c62000c18 100644 --- a/pkg/controller/bind/controller.go +++ b/pkg/controller/bind/controller.go @@ -40,6 +40,7 @@ import ( "k8s.io/client-go/tools/record" "k8s.io/client-go/util/workqueue" + servingclientset "github.com/knative/serving/pkg/client/clientset/versioned" servinginformers "github.com/knative/serving/pkg/client/informers/externalversions" servinglisters "github.com/knative/serving/pkg/client/listers/serving/v1alpha1" @@ -109,6 +110,7 @@ type Controller struct { func NewController( kubeclientset kubernetes.Interface, feedsclientset clientset.Interface, + servingclientset servingclientset.Interface, kubeInformerFactory kubeinformers.SharedInformerFactory, feedsInformerFactory informers.SharedInformerFactory, routeInformerFactory servinginformers.SharedInformerFactory) controller.Interface { diff --git a/pkg/controller/bus/controller.go b/pkg/controller/bus/controller.go index 5060f6e0212..d4a4dd63be0 100644 --- a/pkg/controller/bus/controller.go +++ b/pkg/controller/bus/controller.go @@ -48,6 +48,7 @@ import ( informers "github.com/knative/eventing/pkg/client/informers/externalversions" listers "github.com/knative/eventing/pkg/client/listers/channels/v1alpha1" + servingclientset "github.com/knative/serving/pkg/client/clientset/versioned" servinginformers "github.com/knative/serving/pkg/client/informers/externalversions" channelsv1alpha1 "github.com/knative/eventing/pkg/apis/channels/v1alpha1" @@ -103,6 +104,7 @@ type Controller struct { func NewController( kubeclientset kubernetes.Interface, busclientset clientset.Interface, + servingclientset servingclientset.Interface, kubeInformerFactory kubeinformers.SharedInformerFactory, busInformerFactory informers.SharedInformerFactory, routeInformerFactory servinginformers.SharedInformerFactory) controller.Interface { diff --git a/pkg/controller/channel/controller.go b/pkg/controller/channel/controller.go index 4158a2b2ae2..77668ce982a 100644 --- a/pkg/controller/channel/controller.go +++ b/pkg/controller/channel/controller.go @@ -21,8 +21,8 @@ import ( "time" "github.com/golang/glog" - istiolisters "github.com/knative/eventing/pkg/client/listers/istio/v1alpha3" "github.com/knative/eventing/pkg/controller" + istiolisters "github.com/knative/serving/pkg/client/listers/istio/v1alpha3" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -43,10 +43,11 @@ import ( channelscheme "github.com/knative/eventing/pkg/client/clientset/versioned/scheme" informers "github.com/knative/eventing/pkg/client/informers/externalversions" listers "github.com/knative/eventing/pkg/client/listers/channels/v1alpha1" + servingclientset "github.com/knative/serving/pkg/client/clientset/versioned" servinginformers "github.com/knative/serving/pkg/client/informers/externalversions" channelsv1alpha1 "github.com/knative/eventing/pkg/apis/channels/v1alpha1" - istiov1alpha3 "github.com/knative/eventing/pkg/apis/istio/v1alpha3" + istiov1alpha3 "github.com/knative/serving/pkg/apis/istio/v1alpha3" ) const controllerAgentName = "channel-controller" @@ -77,6 +78,8 @@ type Controller struct { kubeclientset kubernetes.Interface // channelclientset is a clientset for our own API group channelclientset clientset.Interface + // servingclientset is a clientset for serving API groups + servingclientset servingclientset.Interface virtualservicesLister istiolisters.VirtualServiceLister virtualservicesSynced cache.InformerSynced @@ -100,12 +103,13 @@ type Controller struct { func NewController( kubeclientset kubernetes.Interface, channelclientset clientset.Interface, + servingclientset servingclientset.Interface, kubeInformerFactory kubeinformers.SharedInformerFactory, channelInformerFactory informers.SharedInformerFactory, - routeInformerFactory servinginformers.SharedInformerFactory) controller.Interface { + servingInformerFactory servinginformers.SharedInformerFactory) controller.Interface { // obtain references to shared index informers for the Service and Channel types. - virtualserviceInformer := channelInformerFactory.Networking().V1alpha3().VirtualServices() + virtualserviceInformer := servingInformerFactory.Networking().V1alpha3().VirtualServices() serviceInformer := kubeInformerFactory.Core().V1().Services() channelInformer := channelInformerFactory.Channels().V1alpha1().Channels() @@ -122,6 +126,7 @@ func NewController( controller := &Controller{ kubeclientset: kubeclientset, channelclientset: channelclientset, + servingclientset: servingclientset, virtualservicesLister: virtualserviceInformer.Lister(), virtualservicesSynced: virtualserviceInformer.Informer().HasSynced, servicesLister: serviceInformer.Lister(), @@ -336,7 +341,7 @@ func (c *Controller) syncChannelVirtualService(channel *channelsv1alpha1.Channel // If the resource doesn't exist, we'll create it if errors.IsNotFound(err) { - virtualservice, err = c.channelclientset.NetworkingV1alpha3().VirtualServices(channel.Namespace).Create(newVirtualService(channel)) + virtualservice, err = c.servingclientset.NetworkingV1alpha3().VirtualServices(channel.Namespace).Create(newVirtualService(channel)) } // If an error occurs during Get/Create, we'll requeue the item so we can diff --git a/pkg/controller/clusterbus/controller.go b/pkg/controller/clusterbus/controller.go index 643ab659ec5..0784b7bbdf4 100644 --- a/pkg/controller/clusterbus/controller.go +++ b/pkg/controller/clusterbus/controller.go @@ -47,6 +47,7 @@ import ( informers "github.com/knative/eventing/pkg/client/informers/externalversions" listers "github.com/knative/eventing/pkg/client/listers/channels/v1alpha1" + servingclientset "github.com/knative/serving/pkg/client/clientset/versioned" servinginformers "github.com/knative/serving/pkg/client/informers/externalversions" channelsv1alpha1 "github.com/knative/eventing/pkg/apis/channels/v1alpha1" @@ -101,6 +102,7 @@ type Controller struct { func NewController( kubeclientset kubernetes.Interface, clusterbusclientset clientset.Interface, + servingclientset servingclientset.Interface, kubeInformerFactory kubeinformers.SharedInformerFactory, clusterBusInformerFactory informers.SharedInformerFactory, routeInformerFactory servinginformers.SharedInformerFactory) controller.Interface { diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go index c45ff65f182..17e59a9ae14 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -20,6 +20,7 @@ import ( kubeinformers "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes" + servingclientset "github.com/knative/serving/pkg/client/clientset/versioned" servinginformers "github.com/knative/serving/pkg/client/informers/externalversions" clientset "github.com/knative/eventing/pkg/client/clientset/versioned" @@ -30,4 +31,11 @@ type Interface interface { Run(threadiness int, stopCh <-chan struct{}) error } -type Constructor func(kubernetes.Interface, clientset.Interface, kubeinformers.SharedInformerFactory, informers.SharedInformerFactory, servinginformers.SharedInformerFactory) Interface +type Constructor func( + kubernetes.Interface, + clientset.Interface, + servingclientset.Interface, + kubeinformers.SharedInformerFactory, + informers.SharedInformerFactory, + servinginformers.SharedInformerFactory, +) Interface diff --git a/vendor/github.com/knative/serving/pkg/apis/istio/register.go b/vendor/github.com/knative/serving/pkg/apis/istio/register.go index 00166ec3874..647eb38a0e1 100644 --- a/vendor/github.com/knative/serving/pkg/apis/istio/register.go +++ b/vendor/github.com/knative/serving/pkg/apis/istio/register.go @@ -17,5 +17,5 @@ limitations under the License. package istio const ( - GroupName = "config.istio.io" + GroupName = "networking.istio.io" ) diff --git a/vendor/github.com/knative/serving/pkg/apis/istio/v1alpha2/doc.go b/vendor/github.com/knative/serving/pkg/apis/istio/v1alpha2/doc.go deleted file mode 100644 index 6c6961d47c2..00000000000 --- a/vendor/github.com/knative/serving/pkg/apis/istio/v1alpha2/doc.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2018 The Knative 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. -*/ - -// Api versions allow the api contract for a resource to be changed while keeping -// backward compatibility by support multiple concurrent versions -// of the same resource - -// +k8s:deepcopy-gen=package -// +groupName=config.istio.io -package v1alpha2 diff --git a/vendor/github.com/knative/serving/pkg/apis/istio/v1alpha2/register.go b/vendor/github.com/knative/serving/pkg/apis/istio/v1alpha2/register.go deleted file mode 100644 index eaf5dff0bf9..00000000000 --- a/vendor/github.com/knative/serving/pkg/apis/istio/v1alpha2/register.go +++ /dev/null @@ -1,53 +0,0 @@ -/* -Copyright 2018 The Knative 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 v1alpha2 - -import ( - "github.com/knative/serving/pkg/apis/istio" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: istio.GroupName, Version: "v1alpha2"} - -// Kind takes an unqualified kind and returns back a Group qualified GroupKind -func Kind(kind string) schema.GroupKind { - return SchemeGroupVersion.WithKind(kind).GroupKind() -} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource -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, - &RouteRule{}, - &RouteRuleList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/vendor/github.com/knative/serving/pkg/apis/istio/v1alpha2/routerule_types.go b/vendor/github.com/knative/serving/pkg/apis/istio/v1alpha2/routerule_types.go deleted file mode 100644 index 3323af9068b..00000000000 --- a/vendor/github.com/knative/serving/pkg/apis/istio/v1alpha2/routerule_types.go +++ /dev/null @@ -1,101 +0,0 @@ -/* -Copyright 2018 The Knative 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 v1alpha2 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// RouteRule -type RouteRule struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec RouteRuleSpec `json:"spec,omitempty"` -} - -// Istio route looks like so, but couldn't find a k8s/go definition for it -// so we'll just create one. This is terrible, but it just might work for -// now, but if things change on their end, this will most certainly break :( -// spec: -// destination: -// # this matches what's in the ingress rule as a placeholder k8s service -// name: k8s-placeholder-service -// route: -// - destination: -// name: revision-service-1 -// match: -// request: -// headers: -// authority: -// regex: foo.example.com -// weight: 90 -// - destination: -// name: revision-service-2 -// namespace: revision-2-namespace -// weight: 10 -// # https://github.com/istio/istio/blob/master/tests/helm/templates/rule-default-route-append-headers.yaml -// appendHeaders: -// istio-custom-header: user-defined-value -type DestinationWeight struct { - Destination IstioService `json:"destination"` - Weight int `json:"weight"` -} - -type IstioService struct { - Name string `json:"name"` - Namespace string `json:"namespace"` - Domain string `json:"domain"` -} - -type Match struct { - Request MatchRequest `json:"request"` -} - -type MatchRequest struct { - Headers Headers `json:"headers"` -} - -type Headers struct { - Authority MatchString `json:"authority"` -} - -type MatchString struct { - Exact string `json:"exact,omitempty"` - Regex string `json:"regex,omitempty"` - Prefix string `json:"prefix,omitempty"` -} - -type RouteRuleSpec struct { - Destination IstioService `json:"destination"` - Match Match `json:"match,omitempty"` - Route []DestinationWeight `json:"route"` - AppendHeaders map[string]string `json:"appendHeaders,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// RouteRuleList is a list of RouteRule resources -type RouteRuleList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - - Items []RouteRule `json:"items"` -} diff --git a/vendor/github.com/knative/serving/pkg/apis/istio/v1alpha2/zz_generated.deepcopy.go b/vendor/github.com/knative/serving/pkg/apis/istio/v1alpha2/zz_generated.deepcopy.go deleted file mode 100644 index e95021dfe80..00000000000 --- a/vendor/github.com/knative/serving/pkg/apis/istio/v1alpha2/zz_generated.deepcopy.go +++ /dev/null @@ -1,217 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2018 The Knative 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. -*/ - -// This file was autogenerated by deepcopy-gen. Do not edit it manually! - -package v1alpha2 - -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 *DestinationWeight) DeepCopyInto(out *DestinationWeight) { - *out = *in - out.Destination = in.Destination - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DestinationWeight. -func (in *DestinationWeight) DeepCopy() *DestinationWeight { - if in == nil { - return nil - } - out := new(DestinationWeight) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Headers) DeepCopyInto(out *Headers) { - *out = *in - out.Authority = in.Authority - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Headers. -func (in *Headers) DeepCopy() *Headers { - if in == nil { - return nil - } - out := new(Headers) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IstioService) DeepCopyInto(out *IstioService) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IstioService. -func (in *IstioService) DeepCopy() *IstioService { - if in == nil { - return nil - } - out := new(IstioService) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Match) DeepCopyInto(out *Match) { - *out = *in - out.Request = in.Request - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Match. -func (in *Match) DeepCopy() *Match { - if in == nil { - return nil - } - out := new(Match) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MatchRequest) DeepCopyInto(out *MatchRequest) { - *out = *in - out.Headers = in.Headers - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MatchRequest. -func (in *MatchRequest) DeepCopy() *MatchRequest { - if in == nil { - return nil - } - out := new(MatchRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MatchString) DeepCopyInto(out *MatchString) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MatchString. -func (in *MatchString) DeepCopy() *MatchString { - if in == nil { - return nil - } - out := new(MatchString) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RouteRule) DeepCopyInto(out *RouteRule) { - *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 RouteRule. -func (in *RouteRule) DeepCopy() *RouteRule { - if in == nil { - return nil - } - out := new(RouteRule) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RouteRule) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } else { - return nil - } -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RouteRuleList) DeepCopyInto(out *RouteRuleList) { - *out = *in - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]RouteRule, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteRuleList. -func (in *RouteRuleList) DeepCopy() *RouteRuleList { - if in == nil { - return nil - } - out := new(RouteRuleList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RouteRuleList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } else { - return nil - } -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RouteRuleSpec) DeepCopyInto(out *RouteRuleSpec) { - *out = *in - out.Destination = in.Destination - out.Match = in.Match - if in.Route != nil { - in, out := &in.Route, &out.Route - *out = make([]DestinationWeight, len(*in)) - copy(*out, *in) - } - if in.AppendHeaders != nil { - in, out := &in.AppendHeaders, &out.AppendHeaders - *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 RouteRuleSpec. -func (in *RouteRuleSpec) DeepCopy() *RouteRuleSpec { - if in == nil { - return nil - } - out := new(RouteRuleSpec) - in.DeepCopyInto(out) - return out -} diff --git a/pkg/apis/istio/v1alpha3/doc.go b/vendor/github.com/knative/serving/pkg/apis/istio/v1alpha3/doc.go similarity index 100% rename from pkg/apis/istio/v1alpha3/doc.go rename to vendor/github.com/knative/serving/pkg/apis/istio/v1alpha3/doc.go diff --git a/pkg/apis/istio/v1alpha3/gateway_types.go b/vendor/github.com/knative/serving/pkg/apis/istio/v1alpha3/gateway_types.go similarity index 100% rename from pkg/apis/istio/v1alpha3/gateway_types.go rename to vendor/github.com/knative/serving/pkg/apis/istio/v1alpha3/gateway_types.go diff --git a/pkg/apis/istio/v1alpha3/register.go b/vendor/github.com/knative/serving/pkg/apis/istio/v1alpha3/register.go similarity index 94% rename from pkg/apis/istio/v1alpha3/register.go rename to vendor/github.com/knative/serving/pkg/apis/istio/v1alpha3/register.go index b1bf036642e..2a70cb2340d 100644 --- a/pkg/apis/istio/v1alpha3/register.go +++ b/vendor/github.com/knative/serving/pkg/apis/istio/v1alpha3/register.go @@ -17,7 +17,7 @@ limitations under the License. package v1alpha3 import ( - istio "github.com/knative/eventing/pkg/apis/istio" + "github.com/knative/serving/pkg/apis/istio" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" @@ -46,6 +46,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &VirtualService{}, &Gateway{}, + &VirtualServiceList{}, + &GatewayList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/pkg/apis/istio/v1alpha3/virtualservice_types.go b/vendor/github.com/knative/serving/pkg/apis/istio/v1alpha3/virtualservice_types.go similarity index 100% rename from pkg/apis/istio/v1alpha3/virtualservice_types.go rename to vendor/github.com/knative/serving/pkg/apis/istio/v1alpha3/virtualservice_types.go diff --git a/pkg/apis/istio/v1alpha3/zz_generated.deepcopy.go b/vendor/github.com/knative/serving/pkg/apis/istio/v1alpha3/zz_generated.deepcopy.go similarity index 99% rename from pkg/apis/istio/v1alpha3/zz_generated.deepcopy.go rename to vendor/github.com/knative/serving/pkg/apis/istio/v1alpha3/zz_generated.deepcopy.go index 3cdd870a18e..5857c8585ae 100644 --- a/pkg/apis/istio/v1alpha3/zz_generated.deepcopy.go +++ b/vendor/github.com/knative/serving/pkg/apis/istio/v1alpha3/zz_generated.deepcopy.go @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by deepcopy-gen. DO NOT EDIT. +// This file was autogenerated by deepcopy-gen. Do not edit it manually! package v1alpha3 @@ -117,8 +117,9 @@ func (in *Gateway) DeepCopy() *Gateway { func (in *Gateway) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c + } else { + return nil } - return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -150,8 +151,9 @@ func (in *GatewayList) DeepCopy() *GatewayList { func (in *GatewayList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c + } else { + return nil } - return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -619,8 +621,9 @@ func (in *VirtualService) DeepCopy() *VirtualService { func (in *VirtualService) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c + } else { + return nil } - return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -652,8 +655,9 @@ func (in *VirtualServiceList) DeepCopy() *VirtualServiceList { func (in *VirtualServiceList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c + } else { + return nil } - return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/vendor/github.com/knative/serving/pkg/apis/serving/v1alpha1/revision_types.go b/vendor/github.com/knative/serving/pkg/apis/serving/v1alpha1/revision_types.go index 51ec79a693e..2857204332c 100644 --- a/vendor/github.com/knative/serving/pkg/apis/serving/v1alpha1/revision_types.go +++ b/vendor/github.com/knative/serving/pkg/apis/serving/v1alpha1/revision_types.go @@ -229,6 +229,18 @@ func (rs *RevisionStatus) IsReady() bool { return false } +func (rs *RevisionStatus) IsActivationRequired() bool { + if c := rs.GetCondition(RevisionConditionReady); c != nil { + return (c.Reason == "Inactive" && c.Status == corev1.ConditionFalse) || + (c.Reason == "Updating" && c.Status == corev1.ConditionUnknown) + } + return false +} + +func (rs *RevisionStatus) IsRoutable() bool { + return rs.IsReady() || rs.IsActivationRequired() +} + func (rs *RevisionStatus) GetCondition(t RevisionConditionType) *RevisionCondition { for _, cond := range rs.Conditions { if cond.Type == t { diff --git a/vendor/github.com/knative/serving/pkg/apis/serving/v1alpha1/route_types.go b/vendor/github.com/knative/serving/pkg/apis/serving/v1alpha1/route_types.go index f15b4a524d3..eafcf64b071 100644 --- a/vendor/github.com/knative/serving/pkg/apis/serving/v1alpha1/route_types.go +++ b/vendor/github.com/knative/serving/pkg/apis/serving/v1alpha1/route_types.go @@ -113,9 +113,7 @@ const ( // RouteConditionReady is set when the service is configured // and has available backends ready to receive traffic. RouteConditionReady RouteConditionType = "Ready" - // RouteConditionIngressReady is set when the route's underlying ingress - // resource has been set up. - RouteConditionIngressReady RouteConditionType = "IngressReady" + // RouteConditionAllTrafficAssigned is set to False when the // service is not configured properly or has no available // backends ready to receive traffic. @@ -223,7 +221,6 @@ func (rs *RouteStatus) RemoveCondition(t RouteConditionType) { func (rs *RouteStatus) InitializeConditions() { for _, cond := range []RouteConditionType{ RouteConditionAllTrafficAssigned, - RouteConditionIngressReady, RouteConditionReady, } { if rc := rs.GetCondition(cond); rc == nil { @@ -257,18 +254,9 @@ func (rs *RouteStatus) MarkTrafficNotAssigned(kind, name string) { } } -func (rs *RouteStatus) MarkIngressReady() { - rs.setCondition(&RouteCondition{ - Type: RouteConditionIngressReady, - Status: corev1.ConditionTrue, - }) - rs.checkAndMarkReady() -} - func (rs *RouteStatus) checkAndMarkReady() { for _, cond := range []RouteConditionType{ RouteConditionAllTrafficAssigned, - RouteConditionIngressReady, } { ata := rs.GetCondition(cond) if ata == nil || ata.Status != corev1.ConditionTrue { diff --git a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/clientset.go b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/clientset.go index 61fb78bd74f..2041ea8b12e 100644 --- a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/clientset.go +++ b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/clientset.go @@ -17,7 +17,7 @@ package versioned import ( glog "github.com/golang/glog" - configv1alpha2 "github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha2" + networkingv1alpha3 "github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha3" servingv1alpha1 "github.com/knative/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" @@ -26,9 +26,9 @@ import ( type Interface interface { Discovery() discovery.DiscoveryInterface - ConfigV1alpha2() configv1alpha2.ConfigV1alpha2Interface + NetworkingV1alpha3() networkingv1alpha3.NetworkingV1alpha3Interface // Deprecated: please explicitly pick a version if possible. - Config() configv1alpha2.ConfigV1alpha2Interface + Networking() networkingv1alpha3.NetworkingV1alpha3Interface ServingV1alpha1() servingv1alpha1.ServingV1alpha1Interface // Deprecated: please explicitly pick a version if possible. Serving() servingv1alpha1.ServingV1alpha1Interface @@ -38,19 +38,19 @@ type Interface interface { // version included in a Clientset. type Clientset struct { *discovery.DiscoveryClient - configV1alpha2 *configv1alpha2.ConfigV1alpha2Client - servingV1alpha1 *servingv1alpha1.ServingV1alpha1Client + networkingV1alpha3 *networkingv1alpha3.NetworkingV1alpha3Client + servingV1alpha1 *servingv1alpha1.ServingV1alpha1Client } -// ConfigV1alpha2 retrieves the ConfigV1alpha2Client -func (c *Clientset) ConfigV1alpha2() configv1alpha2.ConfigV1alpha2Interface { - return c.configV1alpha2 +// NetworkingV1alpha3 retrieves the NetworkingV1alpha3Client +func (c *Clientset) NetworkingV1alpha3() networkingv1alpha3.NetworkingV1alpha3Interface { + return c.networkingV1alpha3 } -// Deprecated: Config retrieves the default version of ConfigClient. +// Deprecated: Networking retrieves the default version of NetworkingClient. // Please explicitly pick a version. -func (c *Clientset) Config() configv1alpha2.ConfigV1alpha2Interface { - return c.configV1alpha2 +func (c *Clientset) Networking() networkingv1alpha3.NetworkingV1alpha3Interface { + return c.networkingV1alpha3 } // ServingV1alpha1 retrieves the ServingV1alpha1Client @@ -80,7 +80,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { } var cs Clientset var err error - cs.configV1alpha2, err = configv1alpha2.NewForConfig(&configShallowCopy) + cs.networkingV1alpha3, err = networkingv1alpha3.NewForConfig(&configShallowCopy) if err != nil { return nil, err } @@ -101,7 +101,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { // panics if there is an error in the config. func NewForConfigOrDie(c *rest.Config) *Clientset { var cs Clientset - cs.configV1alpha2 = configv1alpha2.NewForConfigOrDie(c) + cs.networkingV1alpha3 = networkingv1alpha3.NewForConfigOrDie(c) cs.servingV1alpha1 = servingv1alpha1.NewForConfigOrDie(c) cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) @@ -111,7 +111,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { // New creates a new Clientset for the given RESTClient. func New(c rest.Interface) *Clientset { var cs Clientset - cs.configV1alpha2 = configv1alpha2.New(c) + cs.networkingV1alpha3 = networkingv1alpha3.New(c) cs.servingV1alpha1 = servingv1alpha1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) diff --git a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/scheme/register.go b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/scheme/register.go index 4e4a8caf367..f9745bd9766 100644 --- a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/scheme/register.go +++ b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/scheme/register.go @@ -16,7 +16,7 @@ limitations under the License. package scheme import ( - configv1alpha2 "github.com/knative/serving/pkg/apis/istio/v1alpha2" + networkingv1alpha3 "github.com/knative/serving/pkg/apis/istio/v1alpha3" servingv1alpha1 "github.com/knative/serving/pkg/apis/serving/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" @@ -48,6 +48,6 @@ func init() { // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. func AddToScheme(scheme *runtime.Scheme) { - configv1alpha2.AddToScheme(scheme) + networkingv1alpha3.AddToScheme(scheme) servingv1alpha1.AddToScheme(scheme) } diff --git a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha2/generated_expansion.go b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha2/generated_expansion.go deleted file mode 100644 index d76b49759c7..00000000000 --- a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha2/generated_expansion.go +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright 2018 The Knative 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 v1alpha2 - -type RouteRuleExpansion interface{} diff --git a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha2/istio_client.go b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha2/istio_client.go deleted file mode 100644 index 6929f6930db..00000000000 --- a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha2/istio_client.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2018 The Knative 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 v1alpha2 - -import ( - v1alpha2 "github.com/knative/serving/pkg/apis/istio/v1alpha2" - "github.com/knative/serving/pkg/client/clientset/versioned/scheme" - serializer "k8s.io/apimachinery/pkg/runtime/serializer" - rest "k8s.io/client-go/rest" -) - -type ConfigV1alpha2Interface interface { - RESTClient() rest.Interface - RouteRulesGetter -} - -// ConfigV1alpha2Client is used to interact with features provided by the config.istio.io group. -type ConfigV1alpha2Client struct { - restClient rest.Interface -} - -func (c *ConfigV1alpha2Client) RouteRules(namespace string) RouteRuleInterface { - return newRouteRules(c, namespace) -} - -// NewForConfig creates a new ConfigV1alpha2Client for the given config. -func NewForConfig(c *rest.Config) (*ConfigV1alpha2Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &ConfigV1alpha2Client{client}, nil -} - -// NewForConfigOrDie creates a new ConfigV1alpha2Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *ConfigV1alpha2Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new ConfigV1alpha2Client for the given RESTClient. -func New(c rest.Interface) *ConfigV1alpha2Client { - return &ConfigV1alpha2Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v1alpha2.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} - - 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 *ConfigV1alpha2Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha2/routerule.go b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha2/routerule.go deleted file mode 100644 index 8b05853d64b..00000000000 --- a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha2/routerule.go +++ /dev/null @@ -1,154 +0,0 @@ -/* -Copyright 2018 The Knative 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 v1alpha2 - -import ( - v1alpha2 "github.com/knative/serving/pkg/apis/istio/v1alpha2" - scheme "github.com/knative/serving/pkg/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" -) - -// RouteRulesGetter has a method to return a RouteRuleInterface. -// A group's client should implement this interface. -type RouteRulesGetter interface { - RouteRules(namespace string) RouteRuleInterface -} - -// RouteRuleInterface has methods to work with RouteRule resources. -type RouteRuleInterface interface { - Create(*v1alpha2.RouteRule) (*v1alpha2.RouteRule, error) - Update(*v1alpha2.RouteRule) (*v1alpha2.RouteRule, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha2.RouteRule, error) - List(opts v1.ListOptions) (*v1alpha2.RouteRuleList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.RouteRule, err error) - RouteRuleExpansion -} - -// routeRules implements RouteRuleInterface -type routeRules struct { - client rest.Interface - ns string -} - -// newRouteRules returns a RouteRules -func newRouteRules(c *ConfigV1alpha2Client, namespace string) *routeRules { - return &routeRules{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the routeRule, and returns the corresponding routeRule object, and an error if there is any. -func (c *routeRules) Get(name string, options v1.GetOptions) (result *v1alpha2.RouteRule, err error) { - result = &v1alpha2.RouteRule{} - err = c.client.Get(). - Namespace(c.ns). - Resource("routerules"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of RouteRules that match those selectors. -func (c *routeRules) List(opts v1.ListOptions) (result *v1alpha2.RouteRuleList, err error) { - result = &v1alpha2.RouteRuleList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("routerules"). - VersionedParams(&opts, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested routeRules. -func (c *routeRules) Watch(opts v1.ListOptions) (watch.Interface, error) { - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("routerules"). - VersionedParams(&opts, scheme.ParameterCodec). - Watch() -} - -// Create takes the representation of a routeRule and creates it. Returns the server's representation of the routeRule, and an error, if there is any. -func (c *routeRules) Create(routeRule *v1alpha2.RouteRule) (result *v1alpha2.RouteRule, err error) { - result = &v1alpha2.RouteRule{} - err = c.client.Post(). - Namespace(c.ns). - Resource("routerules"). - Body(routeRule). - Do(). - Into(result) - return -} - -// Update takes the representation of a routeRule and updates it. Returns the server's representation of the routeRule, and an error, if there is any. -func (c *routeRules) Update(routeRule *v1alpha2.RouteRule) (result *v1alpha2.RouteRule, err error) { - result = &v1alpha2.RouteRule{} - err = c.client.Put(). - Namespace(c.ns). - Resource("routerules"). - Name(routeRule.Name). - Body(routeRule). - Do(). - Into(result) - return -} - -// Delete takes name of the routeRule and deletes it. Returns an error if one occurs. -func (c *routeRules) Delete(name string, options *v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("routerules"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *routeRules) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("routerules"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched routeRule. -func (c *routeRules) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.RouteRule, err error) { - result = &v1alpha2.RouteRule{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("routerules"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha2/doc.go b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha3/doc.go similarity index 97% rename from vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha2/doc.go rename to vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha3/doc.go index ef0e5bffca0..d1909a47d81 100644 --- a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha2/doc.go +++ b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha3/doc.go @@ -14,4 +14,4 @@ See the License for the specific language governing permissions and limitations under the License. */ // This package has the automatically generated typed clients. -package v1alpha2 +package v1alpha3 diff --git a/pkg/client/clientset/versioned/typed/istio/v1alpha3/gateway.go b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha3/gateway.go similarity index 96% rename from pkg/client/clientset/versioned/typed/istio/v1alpha3/gateway.go rename to vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha3/gateway.go index b15ebbfe3c9..70ccd02d145 100644 --- a/pkg/client/clientset/versioned/typed/istio/v1alpha3/gateway.go +++ b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha3/gateway.go @@ -13,14 +13,11 @@ 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 v1alpha3 import ( - v1alpha3 "github.com/knative/eventing/pkg/apis/istio/v1alpha3" - scheme "github.com/knative/eventing/pkg/client/clientset/versioned/scheme" + v1alpha3 "github.com/knative/serving/pkg/apis/istio/v1alpha3" + scheme "github.com/knative/serving/pkg/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" diff --git a/pkg/client/clientset/versioned/typed/istio/v1alpha3/generated_expansion.go b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha3/generated_expansion.go similarity index 93% rename from pkg/client/clientset/versioned/typed/istio/v1alpha3/generated_expansion.go rename to vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha3/generated_expansion.go index 1e2062d8084..c746b14b13e 100644 --- a/pkg/client/clientset/versioned/typed/istio/v1alpha3/generated_expansion.go +++ b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha3/generated_expansion.go @@ -13,9 +13,6 @@ 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 v1alpha3 type GatewayExpansion interface{} diff --git a/pkg/client/clientset/versioned/typed/istio/v1alpha3/istio_client.go b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha3/istio_client.go similarity index 93% rename from pkg/client/clientset/versioned/typed/istio/v1alpha3/istio_client.go rename to vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha3/istio_client.go index f8de733a888..e2869ab0b29 100644 --- a/pkg/client/clientset/versioned/typed/istio/v1alpha3/istio_client.go +++ b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha3/istio_client.go @@ -13,14 +13,11 @@ 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 v1alpha3 import ( - v1alpha3 "github.com/knative/eventing/pkg/apis/istio/v1alpha3" - "github.com/knative/eventing/pkg/client/clientset/versioned/scheme" + v1alpha3 "github.com/knative/serving/pkg/apis/istio/v1alpha3" + "github.com/knative/serving/pkg/client/clientset/versioned/scheme" serializer "k8s.io/apimachinery/pkg/runtime/serializer" rest "k8s.io/client-go/rest" ) diff --git a/pkg/client/clientset/versioned/typed/istio/v1alpha3/virtualservice.go b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha3/virtualservice.go similarity index 96% rename from pkg/client/clientset/versioned/typed/istio/v1alpha3/virtualservice.go rename to vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha3/virtualservice.go index 9450fdb13a3..feec0590710 100644 --- a/pkg/client/clientset/versioned/typed/istio/v1alpha3/virtualservice.go +++ b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha3/virtualservice.go @@ -13,14 +13,11 @@ 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 v1alpha3 import ( - v1alpha3 "github.com/knative/eventing/pkg/apis/istio/v1alpha3" - scheme "github.com/knative/eventing/pkg/client/clientset/versioned/scheme" + v1alpha3 "github.com/knative/serving/pkg/apis/istio/v1alpha3" + scheme "github.com/knative/serving/pkg/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" diff --git a/vendor/github.com/knative/serving/pkg/client/informers/externalversions/factory.go b/vendor/github.com/knative/serving/pkg/client/informers/externalversions/factory.go index a82de83e834..f55263ed0a9 100644 --- a/vendor/github.com/knative/serving/pkg/client/informers/externalversions/factory.go +++ b/vendor/github.com/knative/serving/pkg/client/informers/externalversions/factory.go @@ -121,11 +121,11 @@ type SharedInformerFactory interface { ForResource(resource schema.GroupVersionResource) (GenericInformer, error) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool - Config() istio.Interface + Networking() istio.Interface Serving() serving.Interface } -func (f *sharedInformerFactory) Config() istio.Interface { +func (f *sharedInformerFactory) Networking() istio.Interface { return istio.New(f, f.namespace, f.tweakListOptions) } diff --git a/vendor/github.com/knative/serving/pkg/client/informers/externalversions/generic.go b/vendor/github.com/knative/serving/pkg/client/informers/externalversions/generic.go index 51c77e586c6..c3bf874d7bb 100644 --- a/vendor/github.com/knative/serving/pkg/client/informers/externalversions/generic.go +++ b/vendor/github.com/knative/serving/pkg/client/informers/externalversions/generic.go @@ -18,7 +18,7 @@ package externalversions import ( "fmt" - v1alpha2 "github.com/knative/serving/pkg/apis/istio/v1alpha2" + v1alpha3 "github.com/knative/serving/pkg/apis/istio/v1alpha3" v1alpha1 "github.com/knative/serving/pkg/apis/serving/v1alpha1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" @@ -50,9 +50,11 @@ func (f *genericInformer) Lister() cache.GenericLister { // TODO extend this to unknown resources with a client pool func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { switch resource { - // Group=config.istio.io, Version=v1alpha2 - case v1alpha2.SchemeGroupVersion.WithResource("routerules"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha2().RouteRules().Informer()}, nil + // Group=networking.istio.io, Version=v1alpha3 + case v1alpha3.SchemeGroupVersion.WithResource("gateways"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1alpha3().Gateways().Informer()}, nil + case v1alpha3.SchemeGroupVersion.WithResource("virtualservices"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1alpha3().VirtualServices().Informer()}, nil // Group=serving.knative.dev, Version=v1alpha1 case v1alpha1.SchemeGroupVersion.WithResource("configurations"): diff --git a/vendor/github.com/knative/serving/pkg/client/informers/externalversions/istio/interface.go b/vendor/github.com/knative/serving/pkg/client/informers/externalversions/istio/interface.go index 94117408860..342acb7e9be 100644 --- a/vendor/github.com/knative/serving/pkg/client/informers/externalversions/istio/interface.go +++ b/vendor/github.com/knative/serving/pkg/client/informers/externalversions/istio/interface.go @@ -13,17 +13,17 @@ 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 config +package networking import ( internalinterfaces "github.com/knative/serving/pkg/client/informers/externalversions/internalinterfaces" - v1alpha2 "github.com/knative/serving/pkg/client/informers/externalversions/istio/v1alpha2" + v1alpha3 "github.com/knative/serving/pkg/client/informers/externalversions/istio/v1alpha3" ) // Interface provides access to each of this group's versions. type Interface interface { - // V1alpha2 provides access to shared informers for resources in V1alpha2. - V1alpha2() v1alpha2.Interface + // V1alpha3 provides access to shared informers for resources in V1alpha3. + V1alpha3() v1alpha3.Interface } type group struct { @@ -37,7 +37,7 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } -// V1alpha2 returns a new v1alpha2.Interface. -func (g *group) V1alpha2() v1alpha2.Interface { - return v1alpha2.New(g.factory, g.namespace, g.tweakListOptions) +// V1alpha3 returns a new v1alpha3.Interface. +func (g *group) V1alpha3() v1alpha3.Interface { + return v1alpha3.New(g.factory, g.namespace, g.tweakListOptions) } diff --git a/vendor/github.com/knative/serving/pkg/client/informers/externalversions/istio/v1alpha2/interface.go b/vendor/github.com/knative/serving/pkg/client/informers/externalversions/istio/v1alpha2/interface.go deleted file mode 100644 index 22560cdda77..00000000000 --- a/vendor/github.com/knative/serving/pkg/client/informers/externalversions/istio/v1alpha2/interface.go +++ /dev/null @@ -1,42 +0,0 @@ -/* -Copyright 2018 The Knative 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 v1alpha2 - -import ( - internalinterfaces "github.com/knative/serving/pkg/client/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // RouteRules returns a RouteRuleInformer. - RouteRules() RouteRuleInformer -} - -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} -} - -// RouteRules returns a RouteRuleInformer. -func (v *version) RouteRules() RouteRuleInformer { - return &routeRuleInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} diff --git a/vendor/github.com/knative/serving/pkg/client/informers/externalversions/istio/v1alpha2/routerule.go b/vendor/github.com/knative/serving/pkg/client/informers/externalversions/istio/v1alpha2/routerule.go deleted file mode 100644 index 99074ac2bce..00000000000 --- a/vendor/github.com/knative/serving/pkg/client/informers/externalversions/istio/v1alpha2/routerule.go +++ /dev/null @@ -1,86 +0,0 @@ -/* -Copyright 2018 The Knative 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 v1alpha2 - -import ( - time "time" - - istio_v1alpha2 "github.com/knative/serving/pkg/apis/istio/v1alpha2" - versioned "github.com/knative/serving/pkg/client/clientset/versioned" - internalinterfaces "github.com/knative/serving/pkg/client/informers/externalversions/internalinterfaces" - v1alpha2 "github.com/knative/serving/pkg/client/listers/istio/v1alpha2" - 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" -) - -// RouteRuleInformer provides access to a shared informer and lister for -// RouteRules. -type RouteRuleInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1alpha2.RouteRuleLister -} - -type routeRuleInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewRouteRuleInformer constructs a new informer for RouteRule 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 NewRouteRuleInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredRouteRuleInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredRouteRuleInformer constructs a new informer for RouteRule 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 NewFilteredRouteRuleInformer(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.ConfigV1alpha2().RouteRules(namespace).List(options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.ConfigV1alpha2().RouteRules(namespace).Watch(options) - }, - }, - &istio_v1alpha2.RouteRule{}, - resyncPeriod, - indexers, - ) -} - -func (f *routeRuleInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredRouteRuleInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *routeRuleInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&istio_v1alpha2.RouteRule{}, f.defaultInformer) -} - -func (f *routeRuleInformer) Lister() v1alpha2.RouteRuleLister { - return v1alpha2.NewRouteRuleLister(f.Informer().GetIndexer()) -} diff --git a/pkg/client/informers/externalversions/istio/v1alpha3/gateway.go b/vendor/github.com/knative/serving/pkg/client/informers/externalversions/istio/v1alpha3/gateway.go similarity index 89% rename from pkg/client/informers/externalversions/istio/v1alpha3/gateway.go rename to vendor/github.com/knative/serving/pkg/client/informers/externalversions/istio/v1alpha3/gateway.go index 847ea1f5729..161c5ff276e 100644 --- a/pkg/client/informers/externalversions/istio/v1alpha3/gateway.go +++ b/vendor/github.com/knative/serving/pkg/client/informers/externalversions/istio/v1alpha3/gateway.go @@ -13,18 +13,15 @@ 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 v1alpha3 import ( time "time" - istio_v1alpha3 "github.com/knative/eventing/pkg/apis/istio/v1alpha3" - versioned "github.com/knative/eventing/pkg/client/clientset/versioned" - internalinterfaces "github.com/knative/eventing/pkg/client/informers/externalversions/internalinterfaces" - v1alpha3 "github.com/knative/eventing/pkg/client/listers/istio/v1alpha3" + istio_v1alpha3 "github.com/knative/serving/pkg/apis/istio/v1alpha3" + versioned "github.com/knative/serving/pkg/client/clientset/versioned" + internalinterfaces "github.com/knative/serving/pkg/client/informers/externalversions/internalinterfaces" + v1alpha3 "github.com/knative/serving/pkg/client/listers/istio/v1alpha3" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" diff --git a/pkg/client/informers/externalversions/istio/v1alpha3/interface.go b/vendor/github.com/knative/serving/pkg/client/informers/externalversions/istio/v1alpha3/interface.go similarity index 91% rename from pkg/client/informers/externalversions/istio/v1alpha3/interface.go rename to vendor/github.com/knative/serving/pkg/client/informers/externalversions/istio/v1alpha3/interface.go index 1ef3f7cf8d8..a6b9fb5690b 100644 --- a/pkg/client/informers/externalversions/istio/v1alpha3/interface.go +++ b/vendor/github.com/knative/serving/pkg/client/informers/externalversions/istio/v1alpha3/interface.go @@ -13,13 +13,10 @@ 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 v1alpha3 import ( - internalinterfaces "github.com/knative/eventing/pkg/client/informers/externalversions/internalinterfaces" + internalinterfaces "github.com/knative/serving/pkg/client/informers/externalversions/internalinterfaces" ) // Interface provides access to all the informers in this group version. diff --git a/pkg/client/informers/externalversions/istio/v1alpha3/virtualservice.go b/vendor/github.com/knative/serving/pkg/client/informers/externalversions/istio/v1alpha3/virtualservice.go similarity index 90% rename from pkg/client/informers/externalversions/istio/v1alpha3/virtualservice.go rename to vendor/github.com/knative/serving/pkg/client/informers/externalversions/istio/v1alpha3/virtualservice.go index e63e822fb1a..541b8ac580d 100644 --- a/pkg/client/informers/externalversions/istio/v1alpha3/virtualservice.go +++ b/vendor/github.com/knative/serving/pkg/client/informers/externalversions/istio/v1alpha3/virtualservice.go @@ -13,18 +13,15 @@ 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 v1alpha3 import ( time "time" - istio_v1alpha3 "github.com/knative/eventing/pkg/apis/istio/v1alpha3" - versioned "github.com/knative/eventing/pkg/client/clientset/versioned" - internalinterfaces "github.com/knative/eventing/pkg/client/informers/externalversions/internalinterfaces" - v1alpha3 "github.com/knative/eventing/pkg/client/listers/istio/v1alpha3" + istio_v1alpha3 "github.com/knative/serving/pkg/apis/istio/v1alpha3" + versioned "github.com/knative/serving/pkg/client/clientset/versioned" + internalinterfaces "github.com/knative/serving/pkg/client/informers/externalversions/internalinterfaces" + v1alpha3 "github.com/knative/serving/pkg/client/listers/istio/v1alpha3" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" diff --git a/vendor/github.com/knative/serving/pkg/client/listers/istio/v1alpha2/expansion_generated.go b/vendor/github.com/knative/serving/pkg/client/listers/istio/v1alpha2/expansion_generated.go deleted file mode 100644 index 1f5bc44ae4e..00000000000 --- a/vendor/github.com/knative/serving/pkg/client/listers/istio/v1alpha2/expansion_generated.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -Copyright 2018 The Knative 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 v1alpha2 - -// RouteRuleListerExpansion allows custom methods to be added to -// RouteRuleLister. -type RouteRuleListerExpansion interface{} - -// RouteRuleNamespaceListerExpansion allows custom methods to be added to -// RouteRuleNamespaceLister. -type RouteRuleNamespaceListerExpansion interface{} diff --git a/vendor/github.com/knative/serving/pkg/client/listers/istio/v1alpha2/routerule.go b/vendor/github.com/knative/serving/pkg/client/listers/istio/v1alpha2/routerule.go deleted file mode 100644 index a08db59ff84..00000000000 --- a/vendor/github.com/knative/serving/pkg/client/listers/istio/v1alpha2/routerule.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -Copyright 2018 The Knative 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 v1alpha2 - -import ( - v1alpha2 "github.com/knative/serving/pkg/apis/istio/v1alpha2" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// RouteRuleLister helps list RouteRules. -type RouteRuleLister interface { - // List lists all RouteRules in the indexer. - List(selector labels.Selector) (ret []*v1alpha2.RouteRule, err error) - // RouteRules returns an object that can list and get RouteRules. - RouteRules(namespace string) RouteRuleNamespaceLister - RouteRuleListerExpansion -} - -// routeRuleLister implements the RouteRuleLister interface. -type routeRuleLister struct { - indexer cache.Indexer -} - -// NewRouteRuleLister returns a new RouteRuleLister. -func NewRouteRuleLister(indexer cache.Indexer) RouteRuleLister { - return &routeRuleLister{indexer: indexer} -} - -// List lists all RouteRules in the indexer. -func (s *routeRuleLister) List(selector labels.Selector) (ret []*v1alpha2.RouteRule, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha2.RouteRule)) - }) - return ret, err -} - -// RouteRules returns an object that can list and get RouteRules. -func (s *routeRuleLister) RouteRules(namespace string) RouteRuleNamespaceLister { - return routeRuleNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// RouteRuleNamespaceLister helps list and get RouteRules. -type RouteRuleNamespaceLister interface { - // List lists all RouteRules in the indexer for a given namespace. - List(selector labels.Selector) (ret []*v1alpha2.RouteRule, err error) - // Get retrieves the RouteRule from the indexer for a given namespace and name. - Get(name string) (*v1alpha2.RouteRule, error) - RouteRuleNamespaceListerExpansion -} - -// routeRuleNamespaceLister implements the RouteRuleNamespaceLister -// interface. -type routeRuleNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all RouteRules in the indexer for a given namespace. -func (s routeRuleNamespaceLister) List(selector labels.Selector) (ret []*v1alpha2.RouteRule, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha2.RouteRule)) - }) - return ret, err -} - -// Get retrieves the RouteRule from the indexer for a given namespace and name. -func (s routeRuleNamespaceLister) Get(name string) (*v1alpha2.RouteRule, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1alpha2.Resource("routerule"), name) - } - return obj.(*v1alpha2.RouteRule), nil -} diff --git a/pkg/client/listers/istio/v1alpha3/expansion_generated.go b/vendor/github.com/knative/serving/pkg/client/listers/istio/v1alpha3/expansion_generated.go similarity index 96% rename from pkg/client/listers/istio/v1alpha3/expansion_generated.go rename to vendor/github.com/knative/serving/pkg/client/listers/istio/v1alpha3/expansion_generated.go index 3e06aa85bb6..5c121800bc3 100644 --- a/pkg/client/listers/istio/v1alpha3/expansion_generated.go +++ b/vendor/github.com/knative/serving/pkg/client/listers/istio/v1alpha3/expansion_generated.go @@ -13,9 +13,6 @@ 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 v1alpha3 // GatewayListerExpansion allows custom methods to be added to diff --git a/pkg/client/listers/istio/v1alpha3/gateway.go b/vendor/github.com/knative/serving/pkg/client/listers/istio/v1alpha3/gateway.go similarity index 96% rename from pkg/client/listers/istio/v1alpha3/gateway.go rename to vendor/github.com/knative/serving/pkg/client/listers/istio/v1alpha3/gateway.go index dce06d2c500..b93ad7cad67 100644 --- a/pkg/client/listers/istio/v1alpha3/gateway.go +++ b/vendor/github.com/knative/serving/pkg/client/listers/istio/v1alpha3/gateway.go @@ -13,13 +13,10 @@ 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 v1alpha3 import ( - v1alpha3 "github.com/knative/eventing/pkg/apis/istio/v1alpha3" + v1alpha3 "github.com/knative/serving/pkg/apis/istio/v1alpha3" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/pkg/client/listers/istio/v1alpha3/virtualservice.go b/vendor/github.com/knative/serving/pkg/client/listers/istio/v1alpha3/virtualservice.go similarity index 96% rename from pkg/client/listers/istio/v1alpha3/virtualservice.go rename to vendor/github.com/knative/serving/pkg/client/listers/istio/v1alpha3/virtualservice.go index 90711d75388..3c96cf4ae88 100644 --- a/pkg/client/listers/istio/v1alpha3/virtualservice.go +++ b/vendor/github.com/knative/serving/pkg/client/listers/istio/v1alpha3/virtualservice.go @@ -13,13 +13,10 @@ 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 v1alpha3 import ( - v1alpha3 "github.com/knative/eventing/pkg/apis/istio/v1alpha3" + v1alpha3 "github.com/knative/serving/pkg/apis/istio/v1alpha3" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache"