From 8ad389655dd0e81359e246fbc43536e5064e80b5 Mon Sep 17 00:00:00 2001 From: Scott Andrews Date: Fri, 29 Jun 2018 16:12:48 -0400 Subject: [PATCH] Use latest knative/serving Now that there is an istio/v1alpha3 client in serving, we can drop our client and share serving's client. Refs https://github.com/knative/eventing/pull/93#issuecomment-398901787 --- Gopkg.lock | 14 +- Gopkg.toml | 4 +- cmd/controller/main.go | 2 +- hack/update-codegen.sh | 2 +- pkg/apis/istio/register.go | 21 -- pkg/client/clientset/versioned/clientset.go | 26 +-- .../versioned/fake/clientset_generated.go | 12 - .../clientset/versioned/fake/register.go | 2 - .../clientset/versioned/scheme/register.go | 2 - .../typed/istio/v1alpha3/fake/doc.go | 20 -- .../typed/istio/v1alpha3/fake/fake_gateway.go | 128 ----------- .../istio/v1alpha3/fake/fake_istio_client.go | 44 ---- .../v1alpha3/fake/fake_virtualservice.go | 128 ----------- .../informers/externalversions/factory.go | 6 - .../informers/externalversions/generic.go | 7 - .../externalversions/istio/interface.go | 46 ---- pkg/controller/bind/controller.go | 2 + pkg/controller/bus/controller.go | 2 + pkg/controller/channel/controller.go | 15 +- pkg/controller/controller.go | 10 +- .../build/v1alpha1/build_template_types.go | 15 ++ .../pkg/apis/build/v1alpha1/build_types.go | 35 ++- vendor/github.com/knative/serving/AUTHORS | 7 + .../serving/pkg/apis/istio/register.go | 4 +- .../serving/pkg/apis/istio/v1alpha2/doc.go | 23 -- .../pkg/apis/istio/v1alpha2/register.go | 53 ----- .../apis/istio/v1alpha2/routerule_types.go | 101 -------- .../istio/v1alpha2/zz_generated.deepcopy.go | 217 ------------------ .../serving/pkg}/apis/istio/v1alpha3/doc.go | 0 .../pkg}/apis/istio/v1alpha3/gateway_types.go | 0 .../pkg}/apis/istio/v1alpha3/register.go | 4 +- .../istio/v1alpha3/virtualservice_types.go | 0 .../istio/v1alpha3/zz_generated.deepcopy.go | 14 +- .../serving/pkg/apis/serving/register.go | 2 +- .../serving/v1alpha1/configuration_types.go | 106 +++++++-- .../serving/pkg/apis/serving/v1alpha1/doc.go | 2 +- .../pkg/apis/serving/v1alpha1/register.go | 2 +- .../apis/serving/v1alpha1/revision_types.go | 213 +++++++++++++++-- .../pkg/apis/serving/v1alpha1/route_types.go | 86 ++++++- .../apis/serving/v1alpha1/service_types.go | 149 +++++++++++- .../serving/v1alpha1/zz_generated.deepcopy.go | 20 +- .../client/clientset/versioned/clientset.go | 30 +-- .../pkg/client/clientset/versioned/doc.go | 2 +- .../client/clientset/versioned/scheme/doc.go | 2 +- .../clientset/versioned/scheme/register.go | 6 +- .../versioned/typed/istio/v1alpha2/doc.go | 17 -- .../istio/v1alpha2/generated_expansion.go | 18 -- .../typed/istio/v1alpha2/istio_client.go | 87 ------- .../typed/istio/v1alpha2/routerule.go | 154 ------------- .../versioned/typed/istio/v1alpha3/doc.go | 3 - .../versioned/typed/istio/v1alpha3/gateway.go | 7 +- .../istio/v1alpha3/generated_expansion.go | 3 - .../typed/istio/v1alpha3/istio_client.go | 7 +- .../typed/istio/v1alpha3/virtualservice.go | 7 +- .../typed/serving/v1alpha1/configuration.go | 2 +- .../versioned/typed/serving/v1alpha1/doc.go | 2 +- .../serving/v1alpha1/generated_expansion.go | 2 +- .../typed/serving/v1alpha1/revision.go | 2 +- .../versioned/typed/serving/v1alpha1/route.go | 2 +- .../typed/serving/v1alpha1/service.go | 2 +- .../typed/serving/v1alpha1/serving_client.go | 2 +- .../informers/externalversions/factory.go | 6 +- .../informers/externalversions/generic.go | 12 +- .../internalinterfaces/factory_interfaces.go | 2 +- .../externalversions/istio/interface.go | 16 +- .../istio/v1alpha2/interface.go | 42 ---- .../istio/v1alpha2/routerule.go | 86 ------- .../istio/v1alpha3/gateway.go | 11 +- .../istio/v1alpha3/interface.go | 5 +- .../istio/v1alpha3/virtualservice.go | 11 +- .../externalversions/serving/interface.go | 2 +- .../serving/v1alpha1/configuration.go | 2 +- .../serving/v1alpha1/interface.go | 2 +- .../serving/v1alpha1/revision.go | 2 +- .../serving/v1alpha1/route.go | 2 +- .../serving/v1alpha1/service.go | 2 +- .../istio/v1alpha2/expansion_generated.go | 24 -- .../listers/istio/v1alpha2/routerule.go | 91 -------- .../istio/v1alpha3/expansion_generated.go | 3 - .../client/listers/istio/v1alpha3/gateway.go | 5 +- .../listers/istio/v1alpha3/virtualservice.go | 5 +- .../listers/serving/v1alpha1/configuration.go | 2 +- .../serving/v1alpha1/expansion_generated.go | 2 +- .../listers/serving/v1alpha1/revision.go | 2 +- .../client/listers/serving/v1alpha1/route.go | 2 +- .../listers/serving/v1alpha1/service.go | 2 +- .../monitoring/{ => common}/istio/LICENSE | 0 .../{ => common}/kubernetes/LICENSE | 0 .../{ => common}/prometheus-operator/LICENSE | 0 .../{ => common}/prometheus-operator/NOTICE | 0 .../monitoring/elasticsearch}/LICENSE | 5 +- 91 files changed, 712 insertions(+), 1537 deletions(-) delete mode 100644 pkg/apis/istio/register.go delete mode 100644 pkg/client/clientset/versioned/typed/istio/v1alpha3/fake/doc.go delete mode 100644 pkg/client/clientset/versioned/typed/istio/v1alpha3/fake/fake_gateway.go delete mode 100644 pkg/client/clientset/versioned/typed/istio/v1alpha3/fake/fake_istio_client.go delete mode 100644 pkg/client/clientset/versioned/typed/istio/v1alpha3/fake/fake_virtualservice.go delete mode 100644 pkg/client/informers/externalversions/istio/interface.go create mode 100644 vendor/github.com/knative/serving/AUTHORS delete mode 100644 vendor/github.com/knative/serving/pkg/apis/istio/v1alpha2/doc.go delete mode 100644 vendor/github.com/knative/serving/pkg/apis/istio/v1alpha2/register.go delete mode 100644 vendor/github.com/knative/serving/pkg/apis/istio/v1alpha2/routerule_types.go delete mode 100644 vendor/github.com/knative/serving/pkg/apis/istio/v1alpha2/zz_generated.deepcopy.go rename {pkg => vendor/github.com/knative/serving/pkg}/apis/istio/v1alpha3/doc.go (100%) rename {pkg => vendor/github.com/knative/serving/pkg}/apis/istio/v1alpha3/gateway_types.go (100%) rename {pkg => vendor/github.com/knative/serving/pkg}/apis/istio/v1alpha3/register.go (94%) rename {pkg => vendor/github.com/knative/serving/pkg}/apis/istio/v1alpha3/virtualservice_types.go (100%) rename {pkg => vendor/github.com/knative/serving/pkg}/apis/istio/v1alpha3/zz_generated.deepcopy.go (99%) delete mode 100644 vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha2/doc.go delete mode 100644 vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha2/generated_expansion.go delete mode 100644 vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha2/istio_client.go delete mode 100644 vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha2/routerule.go rename {pkg => vendor/github.com/knative/serving/pkg}/client/clientset/versioned/typed/istio/v1alpha3/doc.go (93%) rename {pkg => vendor/github.com/knative/serving/pkg}/client/clientset/versioned/typed/istio/v1alpha3/gateway.go (96%) rename {pkg => vendor/github.com/knative/serving/pkg}/client/clientset/versioned/typed/istio/v1alpha3/generated_expansion.go (93%) rename {pkg => vendor/github.com/knative/serving/pkg}/client/clientset/versioned/typed/istio/v1alpha3/istio_client.go (93%) rename {pkg => vendor/github.com/knative/serving/pkg}/client/clientset/versioned/typed/istio/v1alpha3/virtualservice.go (96%) delete mode 100644 vendor/github.com/knative/serving/pkg/client/informers/externalversions/istio/v1alpha2/interface.go delete mode 100644 vendor/github.com/knative/serving/pkg/client/informers/externalversions/istio/v1alpha2/routerule.go rename {pkg => vendor/github.com/knative/serving/pkg}/client/informers/externalversions/istio/v1alpha3/gateway.go (89%) rename {pkg => vendor/github.com/knative/serving/pkg}/client/informers/externalversions/istio/v1alpha3/interface.go (91%) rename {pkg => vendor/github.com/knative/serving/pkg}/client/informers/externalversions/istio/v1alpha3/virtualservice.go (90%) delete mode 100644 vendor/github.com/knative/serving/pkg/client/listers/istio/v1alpha2/expansion_generated.go delete mode 100644 vendor/github.com/knative/serving/pkg/client/listers/istio/v1alpha2/routerule.go rename {pkg => vendor/github.com/knative/serving/pkg}/client/listers/istio/v1alpha3/expansion_generated.go (96%) rename {pkg => vendor/github.com/knative/serving/pkg}/client/listers/istio/v1alpha3/gateway.go (96%) rename {pkg => vendor/github.com/knative/serving/pkg}/client/listers/istio/v1alpha3/virtualservice.go (96%) rename vendor/github.com/knative/serving/third_party/config/monitoring/{ => common}/istio/LICENSE (100%) rename vendor/github.com/knative/serving/third_party/config/monitoring/{ => common}/kubernetes/LICENSE (100%) rename vendor/github.com/knative/serving/third_party/config/monitoring/{ => common}/prometheus-operator/LICENSE (100%) rename vendor/github.com/knative/serving/third_party/config/monitoring/{ => common}/prometheus-operator/NOTICE (100%) rename vendor/github.com/knative/serving/third_party/{istio-0.6.0 => config/monitoring/elasticsearch}/LICENSE (99%) diff --git a/Gopkg.lock b/Gopkg.lock index 16b73bda01d..cd6e0a0be71 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -247,29 +247,29 @@ "pkg/apis/build", "pkg/apis/build/v1alpha1" ] - revision = "bfc0222e894da677b45fd63828a89676aa706589" + revision = "5dba97ea172464d6459c393330ffba2152ec78dd" [[projects]] 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 = "a67361c49ec4a957f60d86de05f168a4b41b72ba" + revision = "22e3cb0f057daf224ef3af5cc37feb9b152f880e" [[projects]] name = "github.com/magiconair/properties" @@ -897,6 +897,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "001aef2bcc7b7a7f3d307748cd9b0615acff2999d22ff7b3fcfc76a807420e69" + inputs-digest = "e317f39c351af27ab91cd73376a0ab864311ac9be87400814c5e17e825c48a30" solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index 1a594e7e571..a2c7ed49519 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -84,5 +84,5 @@ required = [ [[constraint]] name = "github.com/knative/serving" - # HEAD as of 2018-06-01 - revision = "a67361c49ec4a957f60d86de05f168a4b41b72ba" + # HEAD as of 2018-06-29 + revision = "22e3cb0f057daf224ef3af5cc37feb9b152f880e" diff --git a/cmd/controller/main.go b/cmd/controller/main.go index 79ad4434e70..862a938448f 100644 --- a/cmd/controller/main.go +++ b/cmd/controller/main.go @@ -95,7 +95,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/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 b8680d85c8a..4b7af148672 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" ) @@ -70,12 +69,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 d661b9ccfc3..46a7a7eaa3a 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 deb5dc2b492..514e9b80ffc 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" @@ -42,10 +42,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" @@ -76,6 +77,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 @@ -99,12 +102,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() @@ -121,6 +125,7 @@ func NewController( controller := &Controller{ kubeclientset: kubeclientset, channelclientset: channelclientset, + servingclientset: servingclientset, virtualservicesLister: virtualserviceInformer.Lister(), virtualservicesSynced: virtualserviceInformer.Informer().HasSynced, servicesLister: serviceInformer.Lister(), @@ -335,7 +340,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/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/build/pkg/apis/build/v1alpha1/build_template_types.go b/vendor/github.com/knative/build/pkg/apis/build/v1alpha1/build_template_types.go index 4fcba3e30b7..69bf3c05359 100644 --- a/vendor/github.com/knative/build/pkg/apis/build/v1alpha1/build_template_types.go +++ b/vendor/github.com/knative/build/pkg/apis/build/v1alpha1/build_template_types.go @@ -17,6 +17,8 @@ limitations under the License. package v1alpha1 import ( + "encoding/json" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -34,6 +36,13 @@ type BuildTemplate struct { } type BuildTemplateSpec struct { + // TODO: Generation does not work correctly with CRD. They are scrubbed + // by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) + // So, we add Generation here. Once that gets fixed, remove this and use + // ObjectMeta.Generation instead. + // +optional + Generation int64 `json:"generation,omitempty"` + // Parameters defines the parameters that can be populated in a template. Parameters []ParameterSpec `json:"parameters,omitempty"` Steps []corev1.Container `json:"steps"` @@ -49,6 +58,8 @@ type BuildTemplateConditionType string const ( // BuildTemplateInvalid specifies that the given specification is invalid. + // + // TODO(jasonhall): Remove when webhook validation rejects invalid build templates. BuildTemplateInvalid BuildTemplateConditionType = "Invalid" ) @@ -114,3 +125,7 @@ func (b *BuildTemplateStatus) RemoveCondition(t BuildTemplateConditionType) { } b.Conditions = conditions } + +func (bt *BuildTemplate) GetGeneration() int64 { return bt.Spec.Generation } +func (bt *BuildTemplate) SetGeneration(generation int64) { bt.Spec.Generation = generation } +func (bt *BuildTemplate) GetSpecJSON() ([]byte, error) { return json.Marshal(bt.Spec) } diff --git a/vendor/github.com/knative/build/pkg/apis/build/v1alpha1/build_types.go b/vendor/github.com/knative/build/pkg/apis/build/v1alpha1/build_types.go index 988be73c370..3b278317293 100644 --- a/vendor/github.com/knative/build/pkg/apis/build/v1alpha1/build_types.go +++ b/vendor/github.com/knative/build/pkg/apis/build/v1alpha1/build_types.go @@ -17,6 +17,8 @@ limitations under the License. package v1alpha1 import ( + "encoding/json" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -36,6 +38,13 @@ type Build struct { // BuildSpec is the spec for a Build resource type BuildSpec struct { + // TODO: Generation does not work correctly with CRD. They are scrubbed + // by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) + // So, we add Generation here. Once that gets fixed, remove this and use + // ObjectMeta.Generation instead. + // +optional + Generation int64 `json:"generation,omitempty"` + Source *SourceSpec `json:"source,omitempty"` Steps []corev1.Container `json:"steps,omitempty"` @@ -147,11 +156,16 @@ type GoogleSpec struct { type BuildConditionType string const ( - // BuildComplete specifies that the build has completed successfully. - BuildComplete BuildConditionType = "Complete" - // BuildFailed specifies that the build has failed. - BuildFailed BuildConditionType = "Failed" + // BuildSucceeded is set when the build is running, and becomes True + // when the build finishes successfully. + // + // If the build is ongoing, its status will be Unknown. If it fails, + // its status will be False. + BuildSucceeded BuildConditionType = "Succeeded" + // BuildInvalid specifies that the given build specification is invalid. + // + // TODO(jasonhall): Remove when webhook validation rejects invalid builds. BuildInvalid BuildConditionType = "Invalid" ) @@ -178,6 +192,15 @@ type BuildList struct { Items []Build `json:"items"` } +func (bs *BuildStatus) GetCondition(t BuildConditionType) *BuildCondition { + for _, cond := range bs.Conditions { + if cond.Type == t { + return &cond + } + } + return nil +} + func (b *BuildStatus) SetCondition(newCond *BuildCondition) { if newCond == nil { return @@ -203,3 +226,7 @@ func (b *BuildStatus) RemoveCondition(t BuildConditionType) { } b.Conditions = conditions } + +func (b *Build) GetGeneration() int64 { return b.Spec.Generation } +func (b *Build) SetGeneration(generation int64) { b.Spec.Generation = generation } +func (b *Build) GetSpecJSON() ([]byte, error) { return json.Marshal(b.Spec) } diff --git a/vendor/github.com/knative/serving/AUTHORS b/vendor/github.com/knative/serving/AUTHORS new file mode 100644 index 00000000000..ab85282788a --- /dev/null +++ b/vendor/github.com/knative/serving/AUTHORS @@ -0,0 +1,7 @@ +# This is the list of Knative authors for copyright purposes. +# +# This does not necessarily list everyone who has contributed code, since in +# some cases, their employer may be the copyright holder. To see the full list +# of contributors, see the revision history in source control. +Google LLC +Pivotal Software, Inc. 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 73deef9d07c..647eb38a0e1 100644 --- a/vendor/github.com/knative/serving/pkg/apis/istio/register.go +++ b/vendor/github.com/knative/serving/pkg/apis/istio/register.go @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC +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. @@ -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 e7284fcf40f..00000000000 --- a/vendor/github.com/knative/serving/pkg/apis/istio/v1alpha2/doc.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2018 Google LLC - -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 b4ee69cfb34..00000000000 --- a/vendor/github.com/knative/serving/pkg/apis/istio/v1alpha2/register.go +++ /dev/null @@ -1,53 +0,0 @@ -/* -Copyright 2018 Google LLC - -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 2a9f339c993..00000000000 --- a/vendor/github.com/knative/serving/pkg/apis/istio/v1alpha2/routerule_types.go +++ /dev/null @@ -1,101 +0,0 @@ -/* -Copyright 2018 Google LLC - -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"` -} - -// +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 ca2779b6f13..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 Google LLC - -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/register.go b/vendor/github.com/knative/serving/pkg/apis/serving/register.go index 3073ffedc34..d4c7ae5f880 100644 --- a/vendor/github.com/knative/serving/pkg/apis/serving/register.go +++ b/vendor/github.com/knative/serving/pkg/apis/serving/register.go @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC +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. diff --git a/vendor/github.com/knative/serving/pkg/apis/serving/v1alpha1/configuration_types.go b/vendor/github.com/knative/serving/pkg/apis/serving/v1alpha1/configuration_types.go index 76923be6d29..079b530e0a2 100644 --- a/vendor/github.com/knative/serving/pkg/apis/serving/v1alpha1/configuration_types.go +++ b/vendor/github.com/knative/serving/pkg/apis/serving/v1alpha1/configuration_types.go @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC. +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. @@ -18,6 +18,9 @@ package v1alpha1 import ( "encoding/json" + "fmt" + "reflect" + "time" build "github.com/knative/build/pkg/apis/build/v1alpha1" @@ -35,13 +38,16 @@ import ( // "latest ready" revision's name. // See also: https://github.com/knative/serving/blob/master/docs/spec/overview.md#configuration type Configuration struct { - metav1.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` + // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // Spec holds the desired state of the Configuration (from the client). + // +optional Spec ConfigurationSpec `json:"spec,omitempty"` // Status communicates the observed state of the Configuration (from the controller). + // +optional Status ConfigurationStatus `json:"status,omitempty"` } @@ -51,16 +57,19 @@ type ConfigurationSpec struct { // by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) // So, we add Generation here. Once that gets fixed, remove this and use // ObjectMeta.Generation instead. + // +optional Generation int64 `json:"generation,omitempty"` // Build optionally holds the specification for the build to // perform to produce the Revision's container image. + // +optional Build *build.BuildSpec `json:"build,omitempty"` // RevisionTemplate holds the latest specification for the Revision to // be stamped out. If a Build specification is provided, then the // RevisionTemplate's BuildName field will be populated with the name of // the Build object created to produce the container for the Revision. + // +optional RevisionTemplate RevisionTemplateSpec `json:"revisionTemplate"` } @@ -69,12 +78,9 @@ type ConfigurationSpec struct { type ConfigurationConditionType string const ( - // ConfigurationConditionReady is set when the configuration is starting to materialize - // runtime resources, and becomes true when those resources are ready. + // ConfigurationConditionReady is set when the configuration's latest + // underlying revision has reported readiness. ConfigurationConditionReady ConfigurationConditionType = "Ready" - // ConfigurationConditionLatestRevisionReady is set to indicate the status of the latest - // revision of the configuration when it has not become ready yet - ConfigurationConditionLatestRevisionReady ConfigurationConditionType = "LatestRevisionReady" ) // ConfigurationCondition defines a readiness condition for a Configuration. @@ -84,6 +90,9 @@ type ConfigurationCondition struct { Status corev1.ConditionStatus `json:"status" description:"status of the condition, one of True, False, Unknown"` + // +optional + LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" description:"last time the condition transit from one status to another"` + // +optional Reason string `json:"reason,omitempty" description:"one-word CamelCase reason for the condition's last transition"` @@ -96,19 +105,23 @@ type ConfigurationStatus struct { // Conditions communicates information about ongoing/complete // reconciliation processes that bring the "spec" inline with the observed // state of the world. + // +optional Conditions []ConfigurationCondition `json:"conditions,omitempty"` // LatestReadyRevisionName holds the name of the latest Revision stamped out // from this Configuration that has had its "Ready" condition become "True". + // +optional LatestReadyRevisionName string `json:"latestReadyRevisionName,omitempty"` // LatestCreatedRevisionName is the last revision that was created from this // Configuration. It might not be ready yet, for that use LatestReadyRevisionName. + // +optional LatestCreatedRevisionName string `json:"latestCreatedRevisionName,omitempty"` // ObservedGeneration is the 'Generation' of the Configuration that // was last processed by the controller. The observed generation is updated // even if the controller failed to process the spec and create the Revision. + // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` } @@ -136,8 +149,8 @@ func (r *Configuration) GetSpecJSON() ([]byte, error) { // IsReady looks at the conditions on the ConfigurationStatus. // ConfigurationConditionReady returns true if ConditionStatus is True -func (configStatus *ConfigurationStatus) IsReady() bool { - if c := configStatus.GetCondition(ConfigurationConditionReady); c != nil { +func (cs *ConfigurationStatus) IsReady() bool { + if c := cs.GetCondition(ConfigurationConditionReady); c != nil { return c.Status == corev1.ConditionTrue } return false @@ -146,9 +159,9 @@ func (configStatus *ConfigurationStatus) IsReady() bool { // IsLatestReadyRevisionNameUpToDate returns true if the Configuration is ready // and LatestCreateRevisionName is equal to LatestReadyRevisionName. Otherwise // it returns false. -func (configStatus *ConfigurationStatus) IsLatestReadyRevisionNameUpToDate() bool { - return configStatus.IsReady() && - configStatus.LatestCreatedRevisionName == configStatus.LatestReadyRevisionName +func (cs *ConfigurationStatus) IsLatestReadyRevisionNameUpToDate() bool { + return cs.IsReady() && + cs.LatestCreatedRevisionName == cs.LatestReadyRevisionName } func (config *ConfigurationStatus) GetCondition(t ConfigurationConditionType) *ConfigurationCondition { @@ -160,28 +173,85 @@ func (config *ConfigurationStatus) GetCondition(t ConfigurationConditionType) *C return nil } -func (configStatus *ConfigurationStatus) SetCondition(new *ConfigurationCondition) { +func (cs *ConfigurationStatus) setCondition(new *ConfigurationCondition) { if new == nil { return } t := new.Type var conditions []ConfigurationCondition - for _, cond := range configStatus.Conditions { + for _, cond := range cs.Conditions { if cond.Type != t { conditions = append(conditions, cond) + } else { + // If we'd only update the LastTransitionTime, then return. + new.LastTransitionTime = cond.LastTransitionTime + if reflect.DeepEqual(new, &cond) { + return + } } } + new.LastTransitionTime = metav1.NewTime(time.Now()) conditions = append(conditions, *new) - configStatus.Conditions = conditions + cs.Conditions = conditions } -func (configStatus *ConfigurationStatus) RemoveCondition(t ConfigurationConditionType) { +func (cs *ConfigurationStatus) RemoveCondition(t ConfigurationConditionType) { var conditions []ConfigurationCondition - for _, cond := range configStatus.Conditions { + for _, cond := range cs.Conditions { if cond.Type != t { conditions = append(conditions, cond) } } - configStatus.Conditions = conditions + cs.Conditions = conditions +} + +func (cs *ConfigurationStatus) InitializeConditions() { + for _, cond := range []ConfigurationConditionType{ + ConfigurationConditionReady, + } { + if rc := cs.GetCondition(cond); rc == nil { + cs.setCondition(&ConfigurationCondition{ + Type: cond, + Status: corev1.ConditionUnknown, + }) + } + } +} + +func (cs *ConfigurationStatus) SetLatestCreatedRevisionName(name string) { + cs.LatestCreatedRevisionName = name + if cs.LatestReadyRevisionName != name { + cs.setCondition(&ConfigurationCondition{ + Type: ConfigurationConditionReady, + Status: corev1.ConditionUnknown, + }) + } +} + +func (cs *ConfigurationStatus) SetLatestReadyRevisionName(name string) { + cs.LatestReadyRevisionName = name + for _, cond := range []ConfigurationConditionType{ + ConfigurationConditionReady, + } { + cs.setCondition(&ConfigurationCondition{ + Type: cond, + Status: corev1.ConditionTrue, + }) + } +} + +func (cs *ConfigurationStatus) MarkLatestCreatedFailed(name, message string) { + cct := []ConfigurationConditionType{ConfigurationConditionReady} + if cs.LatestReadyRevisionName == "" { + cct = append(cct, ConfigurationConditionReady) + } + for _, cond := range cct { + cs.setCondition(&ConfigurationCondition{ + Type: cond, + Status: corev1.ConditionFalse, + Reason: "RevisionFailed", + Message: fmt.Sprintf("revision %q failed with message: %s", name, message), + }) + } } diff --git a/vendor/github.com/knative/serving/pkg/apis/serving/v1alpha1/doc.go b/vendor/github.com/knative/serving/pkg/apis/serving/v1alpha1/doc.go index 89ac34ba6f0..b0c5ebaf7c1 100644 --- a/vendor/github.com/knative/serving/pkg/apis/serving/v1alpha1/doc.go +++ b/vendor/github.com/knative/serving/pkg/apis/serving/v1alpha1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC +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. diff --git a/vendor/github.com/knative/serving/pkg/apis/serving/v1alpha1/register.go b/vendor/github.com/knative/serving/pkg/apis/serving/v1alpha1/register.go index b7b8e51fefa..0bad032a10e 100644 --- a/vendor/github.com/knative/serving/pkg/apis/serving/v1alpha1/register.go +++ b/vendor/github.com/knative/serving/pkg/apis/serving/v1alpha1/register.go @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC. +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. 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 4b21668ffa4..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 @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC. +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. @@ -18,11 +18,13 @@ package v1alpha1 import ( "encoding/json" + "reflect" "time" corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + buildv1alpha1 "github.com/knative/build/pkg/apis/build/v1alpha1" ) // +genclient @@ -31,21 +33,25 @@ import ( // Revision is an immutable snapshot of code and configuration. // See also: https://github.com/knative/serving/blob/master/docs/spec/overview.md#revision type Revision struct { - metav1.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` + // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // Spec holds the desired state of the Revision (from the client). + // +optional Spec RevisionSpec `json:"spec,omitempty"` // Status communicates the observed state of the Revision (from the controller). + // +optional Status RevisionStatus `json:"status,omitempty"` } // RevisionTemplateSpec describes the data a revision should have when created from a template. // Based on: https://github.com/kubernetes/api/blob/e771f807/core/v1/types.go#L3179-L3190 type RevisionTemplateSpec struct { + // +optional metav1.ObjectMeta `json:"metadata,omitempty"` - + // +optional Spec RevisionSpec `json:"spec,omitempty"` } @@ -65,6 +71,7 @@ const ( // anymore. It should not have any Istio routes or Kubernetes resources. // A Revision may be brought out of retirement, but it may take longer than // it would from a "Reserve" state. + // Note: currently not set anywhere. See https://github.com/knative/serving/issues/1203 RevisionServingStateRetired RevisionServingStateType = "Retired" ) @@ -89,17 +96,20 @@ type RevisionSpec struct { // by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) // So, we add Generation here. Once that gets fixed, remove this and use // ObjectMeta.Generation instead. + // +optional Generation int64 `json:"generation,omitempty"` // ServingState holds a value describing the desired state the Kubernetes // resources should be in for this Revision. // Users must not specify this when creating a revision. It is expected // that the system will manipulate this based on routability and load. + // +optional ServingState RevisionServingStateType `json:"servingState,omitempty"` // ConcurrencyModel specifies the desired concurrency model - // (SingleConcurrency or MultiConcurrency) for the - // Revision. Defaults to MultiConcurrency. + // (Single or Multi) for the + // Revision. Defaults to Multi. + // +optional ConcurrencyModel RevisionRequestConcurrencyModelType `json:"concurrencyModel,omitempty"` // ServiceAccountName holds the name of the Kubernetes service account @@ -109,10 +119,12 @@ type RevisionSpec struct { // This may be used to provide access to private container images by // following: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#add-imagepullsecrets-to-a-service-account // TODO(ZhiminXiang): verify the corresponding service account exists. + // +optional ServiceAccountName string `json:"serviceAccountName,omitempty"` // BuildName optionally holds the name of the Build responsible for // producing the container image for its Revision. + // +optional BuildName string `json:"buildName,omitempty"` // Container defines the unit of execution for this Revision. @@ -120,6 +132,7 @@ type RevisionSpec struct { // this Container, including: name, resources, ports, and volumeMounts. // TODO(mattmoor): Link to the runtime contract tracked by: // https://github.com/knative/serving/issues/627 + // +optional Container corev1.Container `json:"container,omitempty"` } @@ -164,20 +177,24 @@ type RevisionStatus struct { // load balances over the pods backing this Revision. When the Revision // is Active, this service would be an appropriate ingress target for // targeting the revision. + // +optional ServiceName string `json:"serviceName,omitempty"` // Conditions communicates information about ongoing/complete // reconciliation processes that bring the "spec" inline with the observed // state of the world. + // +optional Conditions []RevisionCondition `json:"conditions,omitempty"` // ObservedGeneration is the 'Generation' of the Configuration that // was last processed by the controller. The observed generation is updated // even if the controller failed to process the spec and create the Revision. + // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` // LogURL specifies the generated logging url for this particular revision // based on the revision url template specified in the controller's config. + // +optional LogURL string `json:"logUrl,omitempty"` } @@ -212,17 +229,18 @@ func (rs *RevisionStatus) IsReady() bool { return false } -// IsFailed looks to all non-Ready conditions; if any are false, then -// this node is in a terminal failure state. -func (rs *RevisionStatus) IsFailed() bool { - for _, cond := range rs.Conditions { - if cond.Type != RevisionConditionReady && cond.Status == corev1.ConditionFalse { - return true - } +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 { @@ -232,7 +250,7 @@ func (rs *RevisionStatus) GetCondition(t RevisionConditionType) *RevisionConditi return nil } -func (rs *RevisionStatus) SetCondition(new *RevisionCondition) { +func (rs *RevisionStatus) setCondition(new *RevisionCondition) { if new == nil { return } @@ -242,6 +260,12 @@ func (rs *RevisionStatus) SetCondition(new *RevisionCondition) { for _, cond := range rs.Conditions { if cond.Type != t { conditions = append(conditions, cond) + } else { + // If we'd only update the LastTransitionTime, then return. + new.LastTransitionTime = cond.LastTransitionTime + if reflect.DeepEqual(new, &cond) { + return + } } } new.LastTransitionTime = metav1.NewTime(time.Now()) @@ -258,3 +282,164 @@ func (rs *RevisionStatus) RemoveCondition(t RevisionConditionType) { } rs.Conditions = conditions } + +func (rs *RevisionStatus) InitializeConditions() { + // We don't include BuildSucceeded here because it could confuse users if + // no `buildName` was specified. + for _, cond := range []RevisionConditionType{ + RevisionConditionResourcesAvailable, + RevisionConditionContainerHealthy, + RevisionConditionReady, + } { + if rc := rs.GetCondition(cond); rc == nil { + rs.setCondition(&RevisionCondition{ + Type: cond, + Status: corev1.ConditionUnknown, + }) + } + } +} + +func (rs *RevisionStatus) InitializeBuildCondition() { + if rc := rs.GetCondition(RevisionConditionBuildSucceeded); rc == nil { + rs.setCondition(&RevisionCondition{ + Type: RevisionConditionBuildSucceeded, + Status: corev1.ConditionUnknown, + }) + } +} + +func (rs *RevisionStatus) PropagateBuildStatus(bs buildv1alpha1.BuildStatus) { + bc := bs.GetCondition(buildv1alpha1.BuildSucceeded) + if bc == nil { + // TODO(mattmoor): When Build validation is synchronous, get rid + // of this special logic and just return. + bc = bs.GetCondition(buildv1alpha1.BuildInvalid) + if bc == nil { + return + } + bc = &buildv1alpha1.BuildCondition{ + Type: buildv1alpha1.BuildSucceeded, + Status: corev1.ConditionFalse, + Reason: bc.Reason, + Message: bc.Message, + } + } + rct := []RevisionConditionType{RevisionConditionBuildSucceeded} + // If the underlying Build is not ready, then mark the Revision not ready. + if bc.Status != corev1.ConditionTrue { + rct = append(rct, RevisionConditionReady) + } + reason := "Building" + if bc.Status != corev1.ConditionUnknown { + reason = bc.Reason + } + for _, cond := range rct { + rs.setCondition(&RevisionCondition{ + Type: cond, + Status: bc.Status, + Reason: reason, + Message: bc.Message, + }) + } +} + +func (rs *RevisionStatus) MarkDeploying(reason string) { + for _, cond := range []RevisionConditionType{ + RevisionConditionResourcesAvailable, + RevisionConditionContainerHealthy, + RevisionConditionReady, + } { + rs.setCondition(&RevisionCondition{ + Type: cond, + Status: corev1.ConditionUnknown, + Reason: reason, + }) + } +} + +func (rs *RevisionStatus) MarkServiceTimeout() { + for _, cond := range []RevisionConditionType{ + RevisionConditionResourcesAvailable, + RevisionConditionReady, + } { + rs.setCondition(&RevisionCondition{ + Type: cond, + Status: corev1.ConditionFalse, + Reason: "ServiceTimeout", + Message: "Timed out waiting for a service endpoint to become ready", + }) + } +} + +func (rs *RevisionStatus) MarkProgressDeadlineExceeded(message string) { + for _, cond := range []RevisionConditionType{ + RevisionConditionResourcesAvailable, + RevisionConditionReady, + } { + rs.setCondition(&RevisionCondition{ + Type: cond, + Status: corev1.ConditionFalse, + Reason: "ProgressDeadlineExceeded", + Message: message, + }) + } +} + +func (rs *RevisionStatus) MarkContainerHealthy() { + rs.setCondition(&RevisionCondition{ + Type: RevisionConditionContainerHealthy, + Status: corev1.ConditionTrue, + }) + rs.checkAndMarkReady() +} + +func (rs *RevisionStatus) MarkResourcesAvailable() { + rs.setCondition(&RevisionCondition{ + Type: RevisionConditionResourcesAvailable, + Status: corev1.ConditionTrue, + }) + rs.checkAndMarkReady() +} + +func (rs *RevisionStatus) MarkInactive() { + rs.setCondition(&RevisionCondition{ + Type: RevisionConditionReady, + Status: corev1.ConditionFalse, + Reason: "Inactive", + }) +} + +func (rs *RevisionStatus) MarkContainerMissing(message string) { + for _, cond := range []RevisionConditionType{ + RevisionConditionContainerHealthy, + RevisionConditionReady, + } { + rs.setCondition(&RevisionCondition{ + Type: cond, + Status: corev1.ConditionFalse, + Reason: "ContainerMissing", + Message: message, + }) + } +} + +func (rs *RevisionStatus) checkAndMarkReady() { + for _, cond := range []RevisionConditionType{ + RevisionConditionContainerHealthy, + RevisionConditionResourcesAvailable, + } { + c := rs.GetCondition(cond) + if c == nil || c.Status != corev1.ConditionTrue { + return + } + } + rs.markReady() +} + +func (rs *RevisionStatus) markReady() { + rs.setCondition(&RevisionCondition{ + Type: RevisionConditionReady, + Status: corev1.ConditionTrue, + }) +} 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 ed0dbe899e5..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 @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC. +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. @@ -18,6 +18,9 @@ package v1alpha1 import ( "encoding/json" + "fmt" + "reflect" + "time" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -33,13 +36,16 @@ import ( // "latest ready" revision changes, and smoothly rolling out latest revisions. // See also: https://github.com/knative/serving/blob/master/docs/spec/overview.md#route type Route struct { - metav1.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` + // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // Spec holds the desired state of the Route (from the client). + // +optional Spec RouteSpec `json:"spec,omitempty"` // Status communicates the observed state of the Route (from the controller). + // +optional Status RouteStatus `json:"status,omitempty"` } @@ -75,9 +81,11 @@ type RouteSpec struct { // by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) // So, we add Generation here. Once that gets fixed, remove this and use // ObjectMeta.Generation instead. + // +optional Generation int64 `json:"generation,omitempty"` - // Traffic specifies how to distribute traffic over a collection of Elafros Revisions and Configurations. + // Traffic specifies how to distribute traffic over a collection of Knative Serving Revisions and Configurations. + // +optional Traffic []TrafficTarget `json:"traffic,omitempty"` } @@ -88,6 +96,9 @@ type RouteCondition struct { Status corev1.ConditionStatus `json:"status" description:"status of the condition, one of True, False, Unknown"` + // +optional + LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" description:"last time the condition transit from one status to another"` + // +optional Reason string `json:"reason,omitempty" description:"one-word CamelCase reason for the condition's last transition"` // +optional @@ -102,6 +113,7 @@ const ( // RouteConditionReady is set when the service is configured // and has available backends ready to receive traffic. RouteConditionReady RouteConditionType = "Ready" + // RouteConditionAllTrafficAssigned is set to False when the // service is not configured properly or has no available // backends ready to receive traffic. @@ -112,22 +124,26 @@ const ( type RouteStatus struct { // Domain holds the top-level domain that will distribute traffic over the provided targets. // It generally has the form {route-name}.{route-namespace}.{cluster-level-suffix} + // +optional Domain string `json:"domain,omitempty"` // Traffic holds the configured traffic distribution. // These entries will always contain RevisionName references. // When ConfigurationName appears in the spec, this will hold the // LatestReadyRevisionName that we last observed. + // +optional Traffic []TrafficTarget `json:"traffic,omitempty"` // Conditions communicates information about ongoing/complete // reconciliation processes that bring the "spec" inline with the observed // state of the world. + // +optional Conditions []RouteCondition `json:"conditions,omitempty"` // ObservedGeneration is the 'Generation' of the Configuration that // was last processed by the controller. The observed generation is updated // even if the controller failed to process the spec and create the Revision. + // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` } @@ -169,7 +185,7 @@ func (rs *RouteStatus) GetCondition(t RouteConditionType) *RouteCondition { return nil } -func (rs *RouteStatus) SetCondition(new *RouteCondition) { +func (rs *RouteStatus) setCondition(new *RouteCondition) { if new == nil { return } @@ -179,8 +195,15 @@ func (rs *RouteStatus) SetCondition(new *RouteCondition) { for _, cond := range rs.Conditions { if cond.Type != t { conditions = append(conditions, cond) + } else { + // If we'd only update the LastTransitionTime, then return. + new.LastTransitionTime = cond.LastTransitionTime + if reflect.DeepEqual(new, &cond) { + return + } } } + new.LastTransitionTime = metav1.NewTime(time.Now()) conditions = append(conditions, *new) rs.Conditions = conditions } @@ -194,3 +217,58 @@ func (rs *RouteStatus) RemoveCondition(t RouteConditionType) { } rs.Conditions = conditions } + +func (rs *RouteStatus) InitializeConditions() { + for _, cond := range []RouteConditionType{ + RouteConditionAllTrafficAssigned, + RouteConditionReady, + } { + if rc := rs.GetCondition(cond); rc == nil { + rs.setCondition(&RouteCondition{ + Type: cond, + Status: corev1.ConditionUnknown, + }) + } + } +} + +func (rs *RouteStatus) MarkTrafficAssigned() { + rs.setCondition(&RouteCondition{ + Type: RouteConditionAllTrafficAssigned, + Status: corev1.ConditionTrue, + }) + rs.checkAndMarkReady() +} + +func (rs *RouteStatus) MarkTrafficNotAssigned(kind, name string) { + for _, cond := range []RouteConditionType{ + RouteConditionAllTrafficAssigned, + RouteConditionReady, + } { + rs.setCondition(&RouteCondition{ + Type: cond, + Status: corev1.ConditionFalse, + Reason: kind + "Missing", + Message: fmt.Sprintf("Referenced %s %q not found", kind, name), + }) + } +} + +func (rs *RouteStatus) checkAndMarkReady() { + for _, cond := range []RouteConditionType{ + RouteConditionAllTrafficAssigned, + } { + ata := rs.GetCondition(cond) + if ata == nil || ata.Status != corev1.ConditionTrue { + return + } + } + rs.markReady() +} + +func (rs *RouteStatus) markReady() { + rs.setCondition(&RouteCondition{ + Type: RouteConditionReady, + Status: corev1.ConditionTrue, + }) +} diff --git a/vendor/github.com/knative/serving/pkg/apis/serving/v1alpha1/service_types.go b/vendor/github.com/knative/serving/pkg/apis/serving/v1alpha1/service_types.go index a76fbf1b7bc..a0caf04948e 100644 --- a/vendor/github.com/knative/serving/pkg/apis/serving/v1alpha1/service_types.go +++ b/vendor/github.com/knative/serving/pkg/apis/serving/v1alpha1/service_types.go @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC. +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. @@ -18,6 +18,8 @@ package v1alpha1 import ( "encoding/json" + "reflect" + "time" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -28,10 +30,12 @@ import ( // Service type Service struct { - metav1.TypeMeta `json:",inline"` + metav1.TypeMeta `json:",inline"` + // +optional metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec ServiceSpec `json:"spec,omitempty"` + // +optional + Spec ServiceSpec `json:"spec,omitempty"` + // +optional Status ServiceStatus `json:"status,omitempty"` } @@ -42,6 +46,7 @@ type ServiceSpec struct { // by the APIserver (https://github.com/kubernetes/kubernetes/issues/58778) // So, we add Generation here. Once that gets fixed, remove this and use // ObjectMeta.Generation instead. + // +optional Generation int64 `json:"generation,omitempty"` // RunLatest defines a simple Service. It will automatically @@ -58,15 +63,18 @@ type ServiceSpec struct { type RunLatestType struct { // The configuration for this service. + // +optional Configuration ConfigurationSpec `json:"configuration,omitempty"` } type PinnedType struct { // The revision name to pin this service to until changed // to a different service type. + // +optional RevisionName string `json:"revisionName,omitempty"` // The configuration for this service. + // +optional Configuration ConfigurationSpec `json:"configuration,omitempty"` } @@ -75,6 +83,9 @@ type ServiceCondition struct { Status corev1.ConditionStatus `json:"status" description:"status of the condition, one of True, False, Unknown"` + // +optional + LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" description:"last time the condition transit from one status to another"` + // +optional Reason string `json:"reason,omitempty" description:"one-word CamelCase reason for the condition's last transition"` // +optional @@ -88,13 +99,47 @@ const ( // ServiceConditionReady is set when the service is configured // and has available backends ready to receive traffic. ServiceConditionReady ServiceConditionType = "Ready" + // ServiceConditionRoutesReady is set when the service's underlying + // routes have reported readiness. + ServiceConditionRoutesReady ServiceConditionType = "RoutesReady" + // ServiceConditionConfigurationsReady is set when the service's underlying + // configurations have reported readiness. + ServiceConditionConfigurationsReady ServiceConditionType = "ConfigurationsReady" ) type ServiceStatus struct { + // +optional Conditions []ServiceCondition `json:"conditions,omitempty"` + // From RouteStatus. + // Domain holds the top-level domain that will distribute traffic over the provided targets. + // It generally has the form {route-name}.{route-namespace}.{cluster-level-suffix} + // +optional + Domain string `json:"domain,omitempty"` + + // From RouteStatus. + // Traffic holds the configured traffic distribution. + // These entries will always contain RevisionName references. + // When ConfigurationName appears in the spec, this will hold the + // LatestReadyRevisionName that we last observed. + // +optional + Traffic []TrafficTarget `json:"traffic,omitempty"` + + // From ConfigurationStatus. + // LatestReadyRevisionName holds the name of the latest Revision stamped out + // from this Service's Configuration that has had its "Ready" condition become "True". + // +optional + LatestReadyRevisionName string `json:"latestReadyRevisionName,omitempty"` + + // From ConfigurationStatus. + // LatestCreatedRevisionName is the last revision that was created from this Service's + // Configuration. It might not be ready yet, for that use LatestReadyRevisionName. + // +optional + LatestCreatedRevisionName string `json:"latestCreatedRevisionName,omitempty"` + // ObservedGeneration is the 'Generation' of the Service that // was last processed by the controller. + // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` } @@ -136,7 +181,7 @@ func (ss *ServiceStatus) GetCondition(t ServiceConditionType) *ServiceCondition return nil } -func (ss *ServiceStatus) SetCondition(new *ServiceCondition) { +func (ss *ServiceStatus) setCondition(new *ServiceCondition) { if new == nil { return } @@ -146,8 +191,15 @@ func (ss *ServiceStatus) SetCondition(new *ServiceCondition) { for _, cond := range ss.Conditions { if cond.Type != t { conditions = append(conditions, cond) + } else { + // If we'd only update the LastTransitionTime, then return. + new.LastTransitionTime = cond.LastTransitionTime + if reflect.DeepEqual(new, &cond) { + return + } } } + new.LastTransitionTime = metav1.NewTime(time.Now()) conditions = append(conditions, *new) ss.Conditions = conditions } @@ -161,3 +213,90 @@ func (ss *ServiceStatus) RemoveCondition(t ServiceConditionType) { } ss.Conditions = conditions } + +func (ss *ServiceStatus) InitializeConditions() { + for _, cond := range []ServiceConditionType{ + ServiceConditionReady, + ServiceConditionConfigurationsReady, + ServiceConditionRoutesReady, + } { + if rc := ss.GetCondition(cond); rc == nil { + ss.setCondition(&ServiceCondition{ + Type: cond, + Status: corev1.ConditionUnknown, + }) + } + } +} + +func (ss *ServiceStatus) PropagateConfigurationStatus(cs ConfigurationStatus) { + ss.LatestReadyRevisionName = cs.LatestReadyRevisionName + ss.LatestCreatedRevisionName = cs.LatestCreatedRevisionName + + cc := cs.GetCondition(ConfigurationConditionReady) + if cc == nil { + return + } + sct := []ServiceConditionType{ServiceConditionConfigurationsReady} + // If the underlying Configuration reported not ready, then bubble it up. + if cc.Status != corev1.ConditionTrue { + sct = append(sct, ServiceConditionReady) + } + for _, cond := range sct { + ss.setCondition(&ServiceCondition{ + Type: cond, + Status: cc.Status, + Reason: cc.Reason, + Message: cc.Message, + }) + } + if cc.Status == corev1.ConditionTrue { + ss.checkAndMarkReady() + } +} + +func (ss *ServiceStatus) PropagateRouteStatus(rs RouteStatus) { + ss.Domain = rs.Domain + ss.Traffic = rs.Traffic + + rc := rs.GetCondition(RouteConditionReady) + if rc == nil { + return + } + sct := []ServiceConditionType{ServiceConditionRoutesReady} + // If the underlying Route reported not ready, then bubble it up. + if rc.Status != corev1.ConditionTrue { + sct = append(sct, ServiceConditionReady) + } + for _, cond := range sct { + ss.setCondition(&ServiceCondition{ + Type: cond, + Status: rc.Status, + Reason: rc.Reason, + Message: rc.Message, + }) + } + if rc.Status == corev1.ConditionTrue { + ss.checkAndMarkReady() + } +} + +func (ss *ServiceStatus) checkAndMarkReady() { + for _, cond := range []ServiceConditionType{ + ServiceConditionConfigurationsReady, + ServiceConditionRoutesReady, + } { + c := ss.GetCondition(cond) + if c == nil || c.Status != corev1.ConditionTrue { + return + } + } + ss.markReady() +} + +func (ss *ServiceStatus) markReady() { + ss.setCondition(&ServiceCondition{ + Type: ServiceConditionReady, + Status: corev1.ConditionTrue, + }) +} diff --git a/vendor/github.com/knative/serving/pkg/apis/serving/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/knative/serving/pkg/apis/serving/v1alpha1/zz_generated.deepcopy.go index cb4256eb2b7..62e5b279e2e 100644 --- a/vendor/github.com/knative/serving/pkg/apis/serving/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/github.com/knative/serving/pkg/apis/serving/v1alpha1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 Google LLC +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. @@ -57,6 +57,7 @@ func (in *Configuration) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ConfigurationCondition) DeepCopyInto(out *ConfigurationCondition) { *out = *in + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) return } @@ -136,7 +137,9 @@ func (in *ConfigurationStatus) DeepCopyInto(out *ConfigurationStatus) { if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]ConfigurationCondition, len(*in)) - copy(*out, *in) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } return } @@ -338,6 +341,7 @@ func (in *Route) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RouteCondition) DeepCopyInto(out *RouteCondition) { *out = *in + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) return } @@ -417,7 +421,9 @@ func (in *RouteStatus) DeepCopyInto(out *RouteStatus) { if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]RouteCondition, len(*in)) - copy(*out, *in) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } return } @@ -481,6 +487,7 @@ func (in *Service) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ServiceCondition) DeepCopyInto(out *ServiceCondition) { *out = *in + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) return } @@ -568,6 +575,13 @@ func (in *ServiceStatus) DeepCopyInto(out *ServiceStatus) { if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]ServiceCondition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Traffic != nil { + in, out := &in.Traffic, &out.Traffic + *out = make([]TrafficTarget, len(*in)) copy(*out, *in) } return 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 7be974c10af..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 @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC +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. @@ -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/doc.go b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/doc.go index a979b84c38b..483c0da9de4 100644 --- a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/doc.go +++ b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC +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. diff --git a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/scheme/doc.go b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/scheme/doc.go index 2872a920d57..52627884652 100644 --- a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/scheme/doc.go +++ b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/scheme/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC +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. 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 ac5900b2c3d..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 @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC +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. @@ -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/doc.go b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha2/doc.go deleted file mode 100644 index bebde544855..00000000000 --- a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha2/doc.go +++ /dev/null @@ -1,17 +0,0 @@ -/* -Copyright 2018 Google LLC - -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 package has the automatically generated typed clients. -package v1alpha2 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 58b93d91a00..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 Google LLC - -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 effeee68c7a..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 Google LLC - -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 6dda2077811..00000000000 --- a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha2/routerule.go +++ /dev/null @@ -1,154 +0,0 @@ -/* -Copyright 2018 Google LLC - -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/pkg/client/clientset/versioned/typed/istio/v1alpha3/doc.go b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha3/doc.go similarity index 93% rename from pkg/client/clientset/versioned/typed/istio/v1alpha3/doc.go rename to vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha3/doc.go index acea591f3a3..d1909a47d81 100644 --- a/pkg/client/clientset/versioned/typed/istio/v1alpha3/doc.go +++ b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/istio/v1alpha3/doc.go @@ -13,8 +13,5 @@ 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/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/clientset/versioned/typed/serving/v1alpha1/configuration.go b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/configuration.go index b322aedf0f2..173be64fca7 100644 --- a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/configuration.go +++ b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/configuration.go @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC +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. diff --git a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/doc.go b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/doc.go index 4a847a8cfcb..10ede9da2f0 100644 --- a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/doc.go +++ b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC +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. diff --git a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/generated_expansion.go b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/generated_expansion.go index 22d78edc7b7..af4168b8a61 100644 --- a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/generated_expansion.go +++ b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC +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. diff --git a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/revision.go b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/revision.go index 7f09e31e55d..e4a64efb307 100644 --- a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/revision.go +++ b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/revision.go @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC +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. diff --git a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/route.go b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/route.go index bea317c73fc..e2d3bfb2e86 100644 --- a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/route.go +++ b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/route.go @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC +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. diff --git a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/service.go b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/service.go index 7f6b864ab9d..5f77b55f889 100644 --- a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/service.go +++ b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/service.go @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC +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. diff --git a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/serving_client.go b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/serving_client.go index 793fa8a2f3e..94f839d68ef 100644 --- a/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/serving_client.go +++ b/vendor/github.com/knative/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/serving_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC +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. 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 ea4b2ea58a0..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 @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC +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. @@ -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 9547f925d2e..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 @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC +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. @@ -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/internalinterfaces/factory_interfaces.go b/vendor/github.com/knative/serving/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go index 8fb4e68af70..f64592a969b 100644 --- a/vendor/github.com/knative/serving/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go +++ b/vendor/github.com/knative/serving/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC +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. 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 50a8177604f..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 @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC +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. @@ -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 e45718784c2..00000000000 --- a/vendor/github.com/knative/serving/pkg/client/informers/externalversions/istio/v1alpha2/interface.go +++ /dev/null @@ -1,42 +0,0 @@ -/* -Copyright 2018 Google LLC - -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 b923794dabc..00000000000 --- a/vendor/github.com/knative/serving/pkg/client/informers/externalversions/istio/v1alpha2/routerule.go +++ /dev/null @@ -1,86 +0,0 @@ -/* -Copyright 2018 Google LLC - -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/informers/externalversions/serving/interface.go b/vendor/github.com/knative/serving/pkg/client/informers/externalversions/serving/interface.go index e919b921710..91de67bb4cc 100644 --- a/vendor/github.com/knative/serving/pkg/client/informers/externalversions/serving/interface.go +++ b/vendor/github.com/knative/serving/pkg/client/informers/externalversions/serving/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC +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. diff --git a/vendor/github.com/knative/serving/pkg/client/informers/externalversions/serving/v1alpha1/configuration.go b/vendor/github.com/knative/serving/pkg/client/informers/externalversions/serving/v1alpha1/configuration.go index 26840d5df53..dae80cf3540 100644 --- a/vendor/github.com/knative/serving/pkg/client/informers/externalversions/serving/v1alpha1/configuration.go +++ b/vendor/github.com/knative/serving/pkg/client/informers/externalversions/serving/v1alpha1/configuration.go @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC +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. diff --git a/vendor/github.com/knative/serving/pkg/client/informers/externalversions/serving/v1alpha1/interface.go b/vendor/github.com/knative/serving/pkg/client/informers/externalversions/serving/v1alpha1/interface.go index 63561a250e5..c33cc732614 100644 --- a/vendor/github.com/knative/serving/pkg/client/informers/externalversions/serving/v1alpha1/interface.go +++ b/vendor/github.com/knative/serving/pkg/client/informers/externalversions/serving/v1alpha1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC +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. diff --git a/vendor/github.com/knative/serving/pkg/client/informers/externalversions/serving/v1alpha1/revision.go b/vendor/github.com/knative/serving/pkg/client/informers/externalversions/serving/v1alpha1/revision.go index b817ba55cbe..f02ced19cc2 100644 --- a/vendor/github.com/knative/serving/pkg/client/informers/externalversions/serving/v1alpha1/revision.go +++ b/vendor/github.com/knative/serving/pkg/client/informers/externalversions/serving/v1alpha1/revision.go @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC +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. diff --git a/vendor/github.com/knative/serving/pkg/client/informers/externalversions/serving/v1alpha1/route.go b/vendor/github.com/knative/serving/pkg/client/informers/externalversions/serving/v1alpha1/route.go index ed3eef07f09..54cf00073ef 100644 --- a/vendor/github.com/knative/serving/pkg/client/informers/externalversions/serving/v1alpha1/route.go +++ b/vendor/github.com/knative/serving/pkg/client/informers/externalversions/serving/v1alpha1/route.go @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC +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. diff --git a/vendor/github.com/knative/serving/pkg/client/informers/externalversions/serving/v1alpha1/service.go b/vendor/github.com/knative/serving/pkg/client/informers/externalversions/serving/v1alpha1/service.go index b5fb7bd7d23..2b604724c1e 100644 --- a/vendor/github.com/knative/serving/pkg/client/informers/externalversions/serving/v1alpha1/service.go +++ b/vendor/github.com/knative/serving/pkg/client/informers/externalversions/serving/v1alpha1/service.go @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC +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. 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 63c0e424cf1..00000000000 --- a/vendor/github.com/knative/serving/pkg/client/listers/istio/v1alpha2/expansion_generated.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -Copyright 2018 Google LLC - -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 353d6e01e50..00000000000 --- a/vendor/github.com/knative/serving/pkg/client/listers/istio/v1alpha2/routerule.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -Copyright 2018 Google LLC - -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" diff --git a/vendor/github.com/knative/serving/pkg/client/listers/serving/v1alpha1/configuration.go b/vendor/github.com/knative/serving/pkg/client/listers/serving/v1alpha1/configuration.go index ba3f18506b1..81e552b0215 100644 --- a/vendor/github.com/knative/serving/pkg/client/listers/serving/v1alpha1/configuration.go +++ b/vendor/github.com/knative/serving/pkg/client/listers/serving/v1alpha1/configuration.go @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC +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. diff --git a/vendor/github.com/knative/serving/pkg/client/listers/serving/v1alpha1/expansion_generated.go b/vendor/github.com/knative/serving/pkg/client/listers/serving/v1alpha1/expansion_generated.go index a6f09a5845c..a93f2edb43b 100644 --- a/vendor/github.com/knative/serving/pkg/client/listers/serving/v1alpha1/expansion_generated.go +++ b/vendor/github.com/knative/serving/pkg/client/listers/serving/v1alpha1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC +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. diff --git a/vendor/github.com/knative/serving/pkg/client/listers/serving/v1alpha1/revision.go b/vendor/github.com/knative/serving/pkg/client/listers/serving/v1alpha1/revision.go index 6fb79316481..e8126737aa8 100644 --- a/vendor/github.com/knative/serving/pkg/client/listers/serving/v1alpha1/revision.go +++ b/vendor/github.com/knative/serving/pkg/client/listers/serving/v1alpha1/revision.go @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC +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. diff --git a/vendor/github.com/knative/serving/pkg/client/listers/serving/v1alpha1/route.go b/vendor/github.com/knative/serving/pkg/client/listers/serving/v1alpha1/route.go index 81175b0093f..3e32d22940b 100644 --- a/vendor/github.com/knative/serving/pkg/client/listers/serving/v1alpha1/route.go +++ b/vendor/github.com/knative/serving/pkg/client/listers/serving/v1alpha1/route.go @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC +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. diff --git a/vendor/github.com/knative/serving/pkg/client/listers/serving/v1alpha1/service.go b/vendor/github.com/knative/serving/pkg/client/listers/serving/v1alpha1/service.go index c8bfa21d719..34a3d30f6a7 100644 --- a/vendor/github.com/knative/serving/pkg/client/listers/serving/v1alpha1/service.go +++ b/vendor/github.com/knative/serving/pkg/client/listers/serving/v1alpha1/service.go @@ -1,5 +1,5 @@ /* -Copyright 2018 Google LLC +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. diff --git a/vendor/github.com/knative/serving/third_party/config/monitoring/istio/LICENSE b/vendor/github.com/knative/serving/third_party/config/monitoring/common/istio/LICENSE similarity index 100% rename from vendor/github.com/knative/serving/third_party/config/monitoring/istio/LICENSE rename to vendor/github.com/knative/serving/third_party/config/monitoring/common/istio/LICENSE diff --git a/vendor/github.com/knative/serving/third_party/config/monitoring/kubernetes/LICENSE b/vendor/github.com/knative/serving/third_party/config/monitoring/common/kubernetes/LICENSE similarity index 100% rename from vendor/github.com/knative/serving/third_party/config/monitoring/kubernetes/LICENSE rename to vendor/github.com/knative/serving/third_party/config/monitoring/common/kubernetes/LICENSE diff --git a/vendor/github.com/knative/serving/third_party/config/monitoring/prometheus-operator/LICENSE b/vendor/github.com/knative/serving/third_party/config/monitoring/common/prometheus-operator/LICENSE similarity index 100% rename from vendor/github.com/knative/serving/third_party/config/monitoring/prometheus-operator/LICENSE rename to vendor/github.com/knative/serving/third_party/config/monitoring/common/prometheus-operator/LICENSE diff --git a/vendor/github.com/knative/serving/third_party/config/monitoring/prometheus-operator/NOTICE b/vendor/github.com/knative/serving/third_party/config/monitoring/common/prometheus-operator/NOTICE similarity index 100% rename from vendor/github.com/knative/serving/third_party/config/monitoring/prometheus-operator/NOTICE rename to vendor/github.com/knative/serving/third_party/config/monitoring/common/prometheus-operator/NOTICE diff --git a/vendor/github.com/knative/serving/third_party/istio-0.6.0/LICENSE b/vendor/github.com/knative/serving/third_party/config/monitoring/elasticsearch/LICENSE similarity index 99% rename from vendor/github.com/knative/serving/third_party/istio-0.6.0/LICENSE rename to vendor/github.com/knative/serving/third_party/config/monitoring/elasticsearch/LICENSE index 2c45691e883..8dada3edaf5 100644 --- a/vendor/github.com/knative/serving/third_party/istio-0.6.0/LICENSE +++ b/vendor/github.com/knative/serving/third_party/config/monitoring/elasticsearch/LICENSE @@ -1,5 +1,4 @@ - - Apache License + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -187,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2016 Istio Authors + Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.