From 8b1fc6bbf4137213b21c1dbebbfb1748e30783c1 Mon Sep 17 00:00:00 2001 From: nachocano Date: Tue, 26 Nov 2019 13:19:36 -0800 Subject: [PATCH 1/9] adding github template for bugs and features --- .github/ISSUE_TEMPLATE/bug.md | 22 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature-request.md | 23 +++++++++++++++++++++++ .github/issue-template.md | 11 +++++++++++ .github/pull-request-template.md | 17 +++++++++++++++++ 4 files changed, 73 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug.md create mode 100644 .github/ISSUE_TEMPLATE/feature-request.md create mode 100644 .github/issue-template.md create mode 100644 .github/pull-request-template.md diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md new file mode 100644 index 0000000000..a9cd327d16 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -0,0 +1,22 @@ +--- +name: Bug +about: Create a bug report to help us improve +title: '' +labels: kind/bug +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + + **Expected behavior** +A clear and concise description of what you expected to happen. + + **To Reproduce** +Steps to reproduce the behavior. + + **Knative release version** + + **Additional context** +Add any other context about the problem here such as proposed priority diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md new file mode 100644 index 0000000000..0c0d47616d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -0,0 +1,23 @@ +--- +name: Feature Request +about: "Suggest an idea for this project\tabout" +title: '' +labels: kind/feature-request +assignees: '' + +--- + +**Problem** +A short explanation of the problem, including relevant restrictions. + +**[Persona:](https://github.com/knative/eventing/blob/master/docs/personas.md)** +Which persona is this feature for? + +**Exit Criteria** +A measurable (binary) test that would indicate that the problem has been resolved. + +**Time Estimate (optional):** +How many developer-days do you think this may take to resolve? + +**Additional context (optional)** +Add any other context about the feature request here. diff --git a/.github/issue-template.md b/.github/issue-template.md new file mode 100644 index 0000000000..e555ae2e9f --- /dev/null +++ b/.github/issue-template.md @@ -0,0 +1,11 @@ +## Expected Behavior + +## Actual Behavior + +## Steps to Reproduce the Problem + +1. +2. +3. + +## Additional Info diff --git a/.github/pull-request-template.md b/.github/pull-request-template.md new file mode 100644 index 0000000000..42f2fd90e4 --- /dev/null +++ b/.github/pull-request-template.md @@ -0,0 +1,17 @@ +Fixes # + +## Proposed Changes + +- +- +- + +**Release Note** + + + +```release-note + +``` From d0b1721eb552c8bf3d6bc1f676b02d47986d9c9b Mon Sep 17 00:00:00 2001 From: nachocano Date: Tue, 26 Nov 2019 13:28:08 -0800 Subject: [PATCH 2/9] renaming --- .github/ISSUE_TEMPLATE/bug.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md index a9cd327d16..3349284857 100644 --- a/.github/ISSUE_TEMPLATE/bug.md +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -16,7 +16,7 @@ A clear and concise description of what you expected to happen. **To Reproduce** Steps to reproduce the behavior. - **Knative release version** + **Knative-GCP release version** **Additional context** Add any other context about the problem here such as proposed priority From e9678baab9de56a6c23b87344373f7e7238f82c5 Mon Sep 17 00:00:00 2001 From: nachocano Date: Fri, 13 Dec 2019 17:16:42 -0800 Subject: [PATCH 3/9] adding comment --- Gopkg.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Gopkg.toml b/Gopkg.toml index 477d552205..5872bed976 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -63,6 +63,8 @@ required = [ [[override]] name = "github.com/cloudevents/sdk-go" + # HEAD as of 2019-12-13. Needed the master for this fix: https://github.com/cloudevents/sdk-go/pull/272. + # Should be switched back to a release, once a new one is available. branch = "master" [prune] From b5ee575c0c19c0e49e5f7f40ca8c625bf4850e79 Mon Sep 17 00:00:00 2001 From: Nacho Cano Date: Fri, 17 Jan 2020 00:33:11 -0800 Subject: [PATCH 4/9] nits --- config/300-auditlogssource.yaml | 3 ++- docs/auditlogssource/README.md | 6 +++--- docs/install/README.md | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/config/300-auditlogssource.yaml b/config/300-auditlogssource.yaml index bfd11baa0c..48b63a4c2a 100644 --- a/config/300-auditlogssource.yaml +++ b/config/300-auditlogssource.yaml @@ -16,7 +16,7 @@ apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: labels: - eventing.knative.dev/source: "true" + duck.knative.dev/source: "true" events.cloud.google.com/release: devel events.cloud.google.com/crd-install: "true" annotations: @@ -33,6 +33,7 @@ spec: - all - knative - auditlogssource + - sources kind: AuditLogsSource plural: auditlogssources scope: Namespaced diff --git a/docs/auditlogssource/README.md b/docs/auditlogssource/README.md index 4f670a534f..995f9db4ff 100644 --- a/docs/auditlogssource/README.md +++ b/docs/auditlogssource/README.md @@ -21,9 +21,9 @@ in CloudEvents format. ## Deployment -1. Create a [auditlogssource](./auditlogssource.yaml). - This `AuditLogsSource` will get Cloud Audit Log Entries for topic creation. - You can change the `serviceName`, `methodName` and `resourceName` ([detailed description](https://cloud.google.com/logging/docs/reference/audit/auditlog/rest/Shared.Types/AuditLog)) to select the Cloud Audit Log Entries you want to view. +1. Create an [auditlogssource](./auditlogssource.yaml). + This `AuditLogsSource` will emit Cloud Audit Log Entries for the creation of Pub/Sub topics. + You can change the `serviceName`, `methodName` and `resourceName` (see detailed description [here](https://cloud.google.com/logging/docs/reference/audit/auditlog/rest/Shared.Types/AuditLog)) to select the Cloud Audit Log Entries you want to view. | AuditLogsSource Spec | Audit Log Entry Fields | | :-------------------: | :--------------------------: | diff --git a/docs/install/README.md b/docs/install/README.md index 7ff0e18c0e..327fba9b5a 100644 --- a/docs/install/README.md +++ b/docs/install/README.md @@ -39,7 +39,7 @@ | PullSubscription | roles/pubsub.editor | | Topic | roles/pubsub.editor | - In this guide, and for the sake of simplicity, we will just grant `roles/editor` privileges to the Service Account, + In this guide, and for the sake of simplicity, we will just grant `roles/owner` privileges to the Service Account, which encompasses all of the above plus some other permissions. Note that if you prefer finer-grained privileges, you can just grant the ones described in the Table. Also, you can refer to [managing multiple projects](../install/managing-multiple-projects.md) in case you want your Service Account to manage multiple projects. @@ -47,7 +47,7 @@ ```shell gcloud projects add-iam-policy-binding $PROJECT_ID \ --member=serviceAccount:cloud-run-events@$PROJECT_ID.iam.gserviceaccount.com \ - --role roles/editor + --role roles/owner ``` 1. Download a new JSON private key for that Service Account. **Be sure not to check this key into source control!** From 91e64fe2b73826ba7c7a6e6518ba7b7faf8bddc4 Mon Sep 17 00:00:00 2001 From: Nacho Cano Date: Fri, 17 Jan 2020 00:36:05 -0800 Subject: [PATCH 5/9] nits --- docs/auditlogssource/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/auditlogssource/README.md b/docs/auditlogssource/README.md index 995f9db4ff..83d5a773f8 100644 --- a/docs/auditlogssource/README.md +++ b/docs/auditlogssource/README.md @@ -21,7 +21,7 @@ in CloudEvents format. ## Deployment -1. Create an [auditlogssource](./auditlogssource.yaml). +1. Create an [AuditLogsSource](./auditlogssource.yaml). This `AuditLogsSource` will emit Cloud Audit Log Entries for the creation of Pub/Sub topics. You can change the `serviceName`, `methodName` and `resourceName` (see detailed description [here](https://cloud.google.com/logging/docs/reference/audit/auditlog/rest/Shared.Types/AuditLog)) to select the Cloud Audit Log Entries you want to view. From 20cc453029912d70c22bd337b9c73fbd6b1a7e4a Mon Sep 17 00:00:00 2001 From: nachocano Date: Tue, 21 Jan 2020 13:02:29 -0800 Subject: [PATCH 6/9] updating to master --- Gopkg.lock | 12 +- Gopkg.toml | 2 +- vendor/knative.dev/pkg/Gopkg.lock | 4 +- vendor/knative.dev/pkg/RELEASING.md | 2 +- .../pkg/metrics/config_observability.go | 6 + vendor/knative.dev/pkg/test/junit/junit.go | 4 + .../test/webhook-apicoverage/tools/tools.go | 4 +- vendor/knative.dev/pkg/webhook/webhook.go | 136 +++++------------- .../v1alpha1/zz_generated.deepcopy.go | 2 +- .../apis/config/testdata/config-defaults.yaml | 2 +- .../pkg/apis/config/zz_generated.deepcopy.go | 2 +- .../networking/v1alpha1/ingress_defaults.go | 11 +- .../networking/v1alpha1/ingress_lifecycle.go | 6 +- .../apis/networking/v1alpha1/ingress_types.go | 4 +- .../v1alpha1/zz_generated.deepcopy.go | 2 +- .../apis/serving/v1/zz_generated.deepcopy.go | 2 +- .../serving/v1alpha1/revision_lifecycle.go | 4 - .../serving/v1alpha1/zz_generated.deepcopy.go | 2 +- .../serving/v1beta1/zz_generated.deepcopy.go | 2 +- .../testdata/config-autoscaler.yaml | 2 +- .../client/clientset/versioned/clientset.go | 9 +- .../pkg/client/clientset/versioned/doc.go | 2 +- .../versioned/fake/clientset_generated.go | 2 +- .../client/clientset/versioned/fake/doc.go | 2 +- .../clientset/versioned/fake/register.go | 2 +- .../client/clientset/versioned/scheme/doc.go | 2 +- .../clientset/versioned/scheme/register.go | 2 +- .../v1alpha1/autoscaling_client.go | 2 +- .../typed/autoscaling/v1alpha1/doc.go | 2 +- .../typed/autoscaling/v1alpha1/fake/doc.go | 2 +- .../v1alpha1/fake/fake_autoscaling_client.go | 2 +- .../autoscaling/v1alpha1/fake/fake_metric.go | 2 +- .../v1alpha1/fake/fake_podautoscaler.go | 2 +- .../v1alpha1/generated_expansion.go | 2 +- .../typed/autoscaling/v1alpha1/metric.go | 2 +- .../autoscaling/v1alpha1/podautoscaler.go | 2 +- .../typed/networking/v1alpha1/certificate.go | 2 +- .../typed/networking/v1alpha1/doc.go | 2 +- .../typed/networking/v1alpha1/fake/doc.go | 2 +- .../v1alpha1/fake/fake_certificate.go | 2 +- .../networking/v1alpha1/fake/fake_ingress.go | 2 +- .../v1alpha1/fake/fake_networking_client.go | 2 +- .../v1alpha1/fake/fake_serverlessservice.go | 2 +- .../v1alpha1/generated_expansion.go | 2 +- .../typed/networking/v1alpha1/ingress.go | 2 +- .../networking/v1alpha1/networking_client.go | 2 +- .../networking/v1alpha1/serverlessservice.go | 2 +- .../typed/serving/v1/configuration.go | 2 +- .../versioned/typed/serving/v1/doc.go | 2 +- .../versioned/typed/serving/v1/fake/doc.go | 2 +- .../serving/v1/fake/fake_configuration.go | 2 +- .../typed/serving/v1/fake/fake_revision.go | 2 +- .../typed/serving/v1/fake/fake_route.go | 2 +- .../typed/serving/v1/fake/fake_service.go | 2 +- .../serving/v1/fake/fake_serving_client.go | 2 +- .../typed/serving/v1/generated_expansion.go | 2 +- .../versioned/typed/serving/v1/revision.go | 2 +- .../versioned/typed/serving/v1/route.go | 2 +- .../versioned/typed/serving/v1/service.go | 2 +- .../typed/serving/v1/serving_client.go | 2 +- .../typed/serving/v1alpha1/configuration.go | 2 +- .../versioned/typed/serving/v1alpha1/doc.go | 2 +- .../typed/serving/v1alpha1/fake/doc.go | 2 +- .../v1alpha1/fake/fake_configuration.go | 2 +- .../serving/v1alpha1/fake/fake_revision.go | 2 +- .../typed/serving/v1alpha1/fake/fake_route.go | 2 +- .../serving/v1alpha1/fake/fake_service.go | 2 +- .../v1alpha1/fake/fake_serving_client.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 +- .../typed/serving/v1beta1/configuration.go | 2 +- .../versioned/typed/serving/v1beta1/doc.go | 2 +- .../typed/serving/v1beta1/fake/doc.go | 2 +- .../v1beta1/fake/fake_configuration.go | 2 +- .../serving/v1beta1/fake/fake_revision.go | 2 +- .../typed/serving/v1beta1/fake/fake_route.go | 2 +- .../serving/v1beta1/fake/fake_service.go | 2 +- .../v1beta1/fake/fake_serving_client.go | 2 +- .../serving/v1beta1/generated_expansion.go | 2 +- .../typed/serving/v1beta1/revision.go | 2 +- .../versioned/typed/serving/v1beta1/route.go | 2 +- .../typed/serving/v1beta1/service.go | 2 +- .../typed/serving/v1beta1/serving_client.go | 2 +- .../externalversions/autoscaling/interface.go | 2 +- .../autoscaling/v1alpha1/interface.go | 2 +- .../autoscaling/v1alpha1/metric.go | 2 +- .../autoscaling/v1alpha1/podautoscaler.go | 2 +- .../informers/externalversions/factory.go | 2 +- .../informers/externalversions/generic.go | 2 +- .../internalinterfaces/factory_interfaces.go | 2 +- .../externalversions/networking/interface.go | 2 +- .../networking/v1alpha1/certificate.go | 2 +- .../networking/v1alpha1/ingress.go | 2 +- .../networking/v1alpha1/interface.go | 2 +- .../networking/v1alpha1/serverlessservice.go | 2 +- .../externalversions/serving/interface.go | 2 +- .../serving/v1/configuration.go | 2 +- .../externalversions/serving/v1/interface.go | 2 +- .../externalversions/serving/v1/revision.go | 2 +- .../externalversions/serving/v1/route.go | 2 +- .../externalversions/serving/v1/service.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 +- .../serving/v1beta1/configuration.go | 2 +- .../serving/v1beta1/interface.go | 2 +- .../serving/v1beta1/revision.go | 2 +- .../externalversions/serving/v1beta1/route.go | 2 +- .../serving/v1beta1/service.go | 2 +- .../pkg/client/injection/client/client.go | 2 +- .../pkg/client/injection/client/fake/fake.go | 2 +- .../injection/informers/factory/factory.go | 2 +- .../injection/informers/factory/fake/fake.go | 2 +- .../informers/serving/v1/service/fake/fake.go | 2 +- .../informers/serving/v1/service/service.go | 2 +- .../v1alpha1/expansion_generated.go | 2 +- .../listers/autoscaling/v1alpha1/metric.go | 2 +- .../autoscaling/v1alpha1/podautoscaler.go | 2 +- .../networking/v1alpha1/certificate.go | 2 +- .../v1alpha1/expansion_generated.go | 2 +- .../listers/networking/v1alpha1/ingress.go | 2 +- .../networking/v1alpha1/serverlessservice.go | 2 +- .../listers/serving/v1/configuration.go | 2 +- .../listers/serving/v1/expansion_generated.go | 2 +- .../pkg/client/listers/serving/v1/revision.go | 2 +- .../pkg/client/listers/serving/v1/route.go | 2 +- .../pkg/client/listers/serving/v1/service.go | 2 +- .../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 +- .../listers/serving/v1beta1/configuration.go | 2 +- .../serving/v1beta1/expansion_generated.go | 2 +- .../listers/serving/v1beta1/revision.go | 2 +- .../client/listers/serving/v1beta1/route.go | 2 +- .../client/listers/serving/v1beta1/service.go | 2 +- .../testdata/config-deployment.yaml | 2 +- vendor/knative.dev/serving/pkg/gc/config.go | 12 +- .../serving/pkg/gc/testdata/config-gc.yaml | 2 +- .../serving/pkg/gc/zz_generated.deepcopy.go | 2 +- .../pkg/logging/testdata/config-logging.yaml | 2 +- .../testdata/config-observability.yaml | 2 +- .../serving/pkg/network/network.go | 20 +++ .../pkg/network/testdata/config-network.yaml | 2 +- .../pkg/network/zz_generated.deepcopy.go | 2 +- .../config/testdata/config-certmanager.yaml | 2 +- .../gc/config/testdata/config-gc.yaml | 2 +- .../ingress/config/testdata/config-istio.yaml | 2 +- .../config/testdata/config-network.yaml | 2 +- .../config/testdata/config-autoscaler.yaml | 2 +- .../config/testdata/config-defaults.yaml | 2 +- .../config/testdata/config-deployment.yaml | 2 +- .../config/testdata/config-logging.yaml | 2 +- .../config/testdata/config-network.yaml | 2 +- .../config/testdata/config-observability.yaml | 2 +- .../route/config/testdata/config-domain.yaml | 2 +- .../route/config/testdata/config-gc.yaml | 2 +- .../route/config/testdata/config-network.yaml | 2 +- .../route/config/zz_generated.deepcopy.go | 2 +- .../test/config/100-istio-default-domain.yaml | 1 - 166 files changed, 250 insertions(+), 287 deletions(-) delete mode 120000 vendor/knative.dev/serving/test/config/100-istio-default-domain.yaml diff --git a/Gopkg.lock b/Gopkg.lock index f1555a8ef5..2b94ad4d83 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -1396,11 +1396,11 @@ "test/test_images/transformevents", ] pruneopts = "UT" - revision = "b7c51d963ac0ab8bdc3cf23c906b690b87ccfb77" + revision = "7b12239a441ba684dfde93bb55fe2cbbdd1d1d57" [[projects]] - branch = "release-0.12" - digest = "1:048b68ed41f274d9f9c663076f987bb4be938273ba13bc68088910ad634a354b" + branch = "master" + digest = "1:342e150dd5c3ce921be78ce3e8cbfb03aaf01b07a26258f39dc9e90caf277a2b" name = "knative.dev/pkg" packages = [ "apis", @@ -1472,11 +1472,11 @@ "webhook/resourcesemantics/validation", ] pruneopts = "T" - revision = "b8dc5fbc6d2f4717a69d15382921a51f93ab4cbb" + revision = "96d3b8c24c34ea7a8d9da9e7dbb65610aa9ac7b0" [[projects]] branch = "master" - digest = "1:3f002deeefd836d5572a7c0be40f2d8de0cdd5f88661ba40fa6b93e1a9fe9fa5" + digest = "1:c9cf1670af44077ad8a75b8fc5d617c668fe5560ac90e7d53147b9ef18b24458" name = "knative.dev/serving" packages = [ "pkg/apis/autoscaling", @@ -1527,7 +1527,7 @@ "pkg/reconciler/route/config", ] pruneopts = "NUT" - revision = "191785c54f36e57a129c451f1561a7582a120c8f" + revision = "5c909f23fb31da62ecaef01286990cef48f09587" [[projects]] branch = "master" diff --git a/Gopkg.toml b/Gopkg.toml index 00402c50e6..689b03bd88 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -28,7 +28,7 @@ required = [ # Our master branch tracks knative/pkg master or a release. [[override]] name = "knative.dev/pkg" - branch = "release-0.12" + branch = "master" # This is a preemptive override. [[override]] diff --git a/vendor/knative.dev/pkg/Gopkg.lock b/vendor/knative.dev/pkg/Gopkg.lock index ab3d508a6d..258660c508 100644 --- a/vendor/knative.dev/pkg/Gopkg.lock +++ b/vendor/knative.dev/pkg/Gopkg.lock @@ -1311,14 +1311,14 @@ [[projects]] branch = "master" - digest = "1:c20a6bc69c6e4299afa4e4cb6016451fc751c5bb14025a271f3436f212ae73f7" + digest = "1:4ba0f80b3feed917d2c9a1aa79ea95836c3aef84589431cff77ffd01615a1150" name = "knative.dev/test-infra" packages = [ "scripts", "tools/dep-collector", ] pruneopts = "UT" - revision = "32d84d399e44c68470d2703a6de633ab0a826d49" + revision = "d5990f0e5a05d5819a40ad3b4de6227406850b48" [[projects]] digest = "1:8730e0150dfb2b7e173890c8b9868e7a273082ef8e39f4940e3506a481cf895c" diff --git a/vendor/knative.dev/pkg/RELEASING.md b/vendor/knative.dev/pkg/RELEASING.md index 3299c73989..73a9eedb2d 100644 --- a/vendor/knative.dev/pkg/RELEASING.md +++ b/vendor/knative.dev/pkg/RELEASING.md @@ -18,7 +18,7 @@ At present, these downstream repositories include: 1. knative/eventing 1. knative/eventing-contrib 1. knative/sample-controller -1. google/knative-gcp +1. knative/sample-source > The automation that auto-bumps these lives > [here](https://github.com/mattmoor/knobots/tree/knative/cmd/periodic/kodata). diff --git a/vendor/knative.dev/pkg/metrics/config_observability.go b/vendor/knative.dev/pkg/metrics/config_observability.go index 496443e91f..5eaf0eb9fa 100644 --- a/vendor/knative.dev/pkg/metrics/config_observability.go +++ b/vendor/knative.dev/pkg/metrics/config_observability.go @@ -27,6 +27,10 @@ import ( const ( // The following is used to set the default log url template DefaultLogURLTemplate = "http://localhost:8001/api/v1/namespaces/knative-monitoring/services/kibana-logging/proxy/app/kibana#/discover?_a=(query:(match:(kubernetes.labels.knative-dev%2FrevisionUID:(query:'${REVISION_UID}',type:phrase))))" + + // The following is used to set the default metrics backend + DefaultRequestMetricsBackend = "prometheus" + // The env var name for config-observability ConfigMapNameEnv = "CONFIG_OBSERVABILITY_NAME" ) @@ -84,6 +88,8 @@ func NewObservabilityConfigFromConfigMap(configMap *corev1.ConfigMap) (*Observab if mb, ok := configMap.Data["metrics.request-metrics-backend-destination"]; ok { oc.RequestMetricsBackend = mb + } else { + oc.RequestMetricsBackend = DefaultRequestMetricsBackend } if prof, ok := configMap.Data["profiling.enable"]; ok { diff --git a/vendor/knative.dev/pkg/test/junit/junit.go b/vendor/knative.dev/pkg/test/junit/junit.go index 898de62eed..2e53da618a 100644 --- a/vendor/knative.dev/pkg/test/junit/junit.go +++ b/vendor/knative.dev/pkg/test/junit/junit.go @@ -95,6 +95,10 @@ func (testCase *TestCase) AddProperty(name, val string) { // AddTestCase adds a testcase to the testsuite func (ts *TestSuite) AddTestCase(tc TestCase) { + ts.Tests++ + if tc.GetTestStatus() == Failed { + ts.Failures++ + } ts.TestCases = append(ts.TestCases, tc) } diff --git a/vendor/knative.dev/pkg/test/webhook-apicoverage/tools/tools.go b/vendor/knative.dev/pkg/test/webhook-apicoverage/tools/tools.go index 3b7c520f48..9735d1cdf7 100644 --- a/vendor/knative.dev/pkg/test/webhook-apicoverage/tools/tools.go +++ b/vendor/knative.dev/pkg/test/webhook-apicoverage/tools/tools.go @@ -155,7 +155,7 @@ func GetTotalCoverage(webhookIP string) (*coveragecalculator.CoverageValues, err resp, err := client.Get(fmt.Sprintf(WebhookTotalCoverageEndPoint, webhookIP)) if err != nil { - return nil, fmt.Errorf("encountered error making total coverage request") + return nil, fmt.Errorf("encountered error making total coverage request: %w", err) } if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("invalid HTTP Status received for total coverage request. Status: %d", resp.StatusCode) @@ -163,7 +163,7 @@ func GetTotalCoverage(webhookIP string) (*coveragecalculator.CoverageValues, err var body []byte if body, err = ioutil.ReadAll(resp.Body); err != nil { - return nil, fmt.Errorf("error reading total coverage response: %v", err) + return nil, fmt.Errorf("error reading total coverage response: %w", err) } var coverage coveragecalculator.CoverageValues diff --git a/vendor/knative.dev/pkg/webhook/webhook.go b/vendor/knative.dev/pkg/webhook/webhook.go index f478eb7b38..aafb8fbb8c 100644 --- a/vendor/knative.dev/pkg/webhook/webhook.go +++ b/vendor/knative.dev/pkg/webhook/webhook.go @@ -19,11 +19,9 @@ package webhook import ( "context" "crypto/tls" - "encoding/json" "errors" "fmt" "net/http" - "time" // Injection stuff kubeclient "knative.dev/pkg/client/injection/kube/client" @@ -31,12 +29,9 @@ import ( "go.uber.org/zap" "golang.org/x/sync/errgroup" - admissionv1beta1 "k8s.io/api/admission/v1beta1" - apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/client-go/kubernetes" corelisters "k8s.io/client-go/listers/core/v1" "knative.dev/pkg/logging" - "knative.dev/pkg/logging/logkey" "knative.dev/pkg/system" certresources "knative.dev/pkg/webhook/certificates/resources" ) @@ -63,30 +58,29 @@ type Options struct { StatsReporter StatsReporter } -// AdmissionController provides the interface for different admission controllers -type AdmissionController interface { - // Path returns the path that this particular admission controller serves on. - Path() string - - // Admit is the callback which is invoked when an HTTPS request comes in on Path(). - Admit(context.Context, *admissionv1beta1.AdmissionRequest) *admissionv1beta1.AdmissionResponse -} - // Webhook implements the external webhook for validation of // resources and configuration. type Webhook struct { - Client kubernetes.Interface - Options Options - Logger *zap.SugaredLogger - admissionControllers map[string]AdmissionController - secretlister corelisters.SecretLister + Client kubernetes.Interface + Options Options + Logger *zap.SugaredLogger + + mux http.ServeMux + secretlister corelisters.SecretLister } // New constructs a Webhook func New( ctx context.Context, - admissionControllers []AdmissionController, -) (*Webhook, error) { + controllers []AdmissionController, +) (webhook *Webhook, err error) { + + // ServeMux.Handle panics on duplicate paths + defer func() { + if r := recover(); r != nil { + err = fmt.Errorf("error creating webhook %v", r) + } + }() client := kubeclient.Get(ctx) @@ -111,35 +105,37 @@ func New( opts.StatsReporter = reporter } - // Build up a map of paths to admission controllers for routing handlers. - acs := make(map[string]AdmissionController, len(admissionControllers)) - for _, ac := range admissionControllers { - if _, ok := acs[ac.Path()]; ok { - return nil, fmt.Errorf("duplicate webhook for path: %v", ac.Path()) - } - acs[ac.Path()] = ac + webhook = &Webhook{ + Client: client, + Options: *opts, + secretlister: secretInformer.Lister(), + Logger: logger, } - return &Webhook{ - Client: client, - Options: *opts, - secretlister: secretInformer.Lister(), - admissionControllers: acs, - Logger: logger, - }, nil + webhook.mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + http.Error(w, fmt.Sprintf("no admission controller registered for: %s", r.URL.Path), http.StatusBadRequest) + }) + + for _, c := range controllers { + webhook.mux.Handle( + c.Path(), + admissionHandler(logger, opts.StatsReporter, c), + ) + } + return } // Run implements the admission controller run loop. -func (ac *Webhook) Run(stop <-chan struct{}) error { - logger := ac.Logger +func (wh *Webhook) Run(stop <-chan struct{}) error { + logger := wh.Logger ctx := logging.WithLogger(context.Background(), logger) server := &http.Server{ - Handler: ac, - Addr: fmt.Sprintf(":%v", ac.Options.Port), + Handler: wh, + Addr: fmt.Sprintf(":%d", wh.Options.Port), TLSConfig: &tls.Config{ GetCertificate: func(*tls.ClientHelloInfo) (*tls.Certificate, error) { - secret, err := ac.secretlister.Secrets(system.Namespace()).Get(ac.Options.SecretName) + secret, err := wh.secretlister.Secrets(system.Namespace()).Get(wh.Options.SecretName) if err != nil { return nil, err } @@ -183,13 +179,7 @@ func (ac *Webhook) Run(stop <-chan struct{}) error { } } -// ServeHTTP implements the external admission webhook for mutating -// serving resources. -func (ac *Webhook) ServeHTTP(w http.ResponseWriter, r *http.Request) { - var ttStart = time.Now() - logger := ac.Logger - logger.Infof("Webhook ServeHTTP request=%#v", r) - +func (wh *Webhook) ServeHTTP(w http.ResponseWriter, r *http.Request) { // Verify the content type is accurate. contentType := r.Header.Get("Content-Type") if contentType != "application/json" { @@ -197,55 +187,5 @@ func (ac *Webhook) ServeHTTP(w http.ResponseWriter, r *http.Request) { return } - var review admissionv1beta1.AdmissionReview - if err := json.NewDecoder(r.Body).Decode(&review); err != nil { - http.Error(w, fmt.Sprintf("could not decode body: %v", err), http.StatusBadRequest) - return - } - - logger = logger.With( - zap.String(logkey.Kind, fmt.Sprint(review.Request.Kind)), - zap.String(logkey.Namespace, review.Request.Namespace), - zap.String(logkey.Name, review.Request.Name), - zap.String(logkey.Operation, fmt.Sprint(review.Request.Operation)), - zap.String(logkey.Resource, fmt.Sprint(review.Request.Resource)), - zap.String(logkey.SubResource, fmt.Sprint(review.Request.SubResource)), - zap.String(logkey.UserInfo, fmt.Sprint(review.Request.UserInfo))) - ctx := logging.WithLogger(r.Context(), logger) - - c, ok := ac.admissionControllers[r.URL.Path] - if !ok { - http.Error(w, fmt.Sprintf("no admission controller registered for: %s", r.URL.Path), http.StatusBadRequest) - return - } - - var response admissionv1beta1.AdmissionReview - reviewResponse := c.Admit(ctx, review.Request) - logger.Infof("AdmissionReview for %#v: %s/%s response=%#v", - review.Request.Kind, review.Request.Namespace, review.Request.Name, reviewResponse) - - if !reviewResponse.Allowed { - response.Response = reviewResponse - } else if reviewResponse.PatchType != nil || response.Response == nil { - response.Response = reviewResponse - } - response.Response.UID = review.Request.UID - - if err := json.NewEncoder(w).Encode(response); err != nil { - http.Error(w, fmt.Sprintf("could encode response: %v", err), http.StatusInternalServerError) - return - } - - if ac.Options.StatsReporter != nil { - // Only report valid requests - ac.Options.StatsReporter.ReportRequest(review.Request, response.Response, time.Since(ttStart)) - } -} - -func MakeErrorStatus(reason string, args ...interface{}) *admissionv1beta1.AdmissionResponse { - result := apierrors.NewBadRequest(fmt.Sprintf(reason, args...)).Status() - return &admissionv1beta1.AdmissionResponse{ - Result: &result, - Allowed: false, - } + wh.mux.ServeHTTP(w, r) } diff --git a/vendor/knative.dev/serving/pkg/apis/autoscaling/v1alpha1/zz_generated.deepcopy.go b/vendor/knative.dev/serving/pkg/apis/autoscaling/v1alpha1/zz_generated.deepcopy.go index 4e2b521a3e..a4a822dfa9 100644 --- a/vendor/knative.dev/serving/pkg/apis/autoscaling/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/knative.dev/serving/pkg/apis/autoscaling/v1alpha1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/apis/config/testdata/config-defaults.yaml b/vendor/knative.dev/serving/pkg/apis/config/testdata/config-defaults.yaml index 4f00ffb571..4e958fe292 120000 --- a/vendor/knative.dev/serving/pkg/apis/config/testdata/config-defaults.yaml +++ b/vendor/knative.dev/serving/pkg/apis/config/testdata/config-defaults.yaml @@ -1 +1 @@ -../../../../config/config-defaults.yaml \ No newline at end of file +../../../../config/core/configmaps/defaults.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/pkg/apis/config/zz_generated.deepcopy.go b/vendor/knative.dev/serving/pkg/apis/config/zz_generated.deepcopy.go index d0e78d8c0d..341f6334ba 100644 --- a/vendor/knative.dev/serving/pkg/apis/config/zz_generated.deepcopy.go +++ b/vendor/knative.dev/serving/pkg/apis/config/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/apis/networking/v1alpha1/ingress_defaults.go b/vendor/knative.dev/serving/pkg/apis/networking/v1alpha1/ingress_defaults.go index 4da79a16cc..b0a724991d 100644 --- a/vendor/knative.dev/serving/pkg/apis/networking/v1alpha1/ingress_defaults.go +++ b/vendor/knative.dev/serving/pkg/apis/networking/v1alpha1/ingress_defaults.go @@ -51,14 +51,9 @@ func (s *IngressSpec) SetDefaults(ctx context.Context) { // SetDefaults populates default values in IngressTLS func (t *IngressTLS) SetDefaults(ctx context.Context) { - // Default Secret key for ServerCertificate is `tls.crt`. - if t.ServerCertificate == "" { - t.ServerCertificate = "tls.crt" - } - // Default Secret key for PrivateKey is `tls.key`. - if t.PrivateKey == "" { - t.PrivateKey = "tls.key" - } + // Deprecated, do not use. + t.DeprecatedServerCertificate = "" + t.DeprecatedPrivateKey = "" } // SetDefaults populates default values in IngressRule diff --git a/vendor/knative.dev/serving/pkg/apis/networking/v1alpha1/ingress_lifecycle.go b/vendor/knative.dev/serving/pkg/apis/networking/v1alpha1/ingress_lifecycle.go index fe840dc506..c6fd1b9e28 100644 --- a/vendor/knative.dev/serving/pkg/apis/networking/v1alpha1/ingress_lifecycle.go +++ b/vendor/knative.dev/serving/pkg/apis/networking/v1alpha1/ingress_lifecycle.go @@ -29,10 +29,6 @@ var ingressCondSet = apis.NewLivingConditionSet( IngressConditionLoadBalancerReady, ) -// VirtualServiceNotReconciled is used for the reason of MarkLoadBalancerFailed -// when VirtualService is failed to be reconciled. -var VirtualServiceNotReconciled = "ReconcileVirtualServiceFailed" - // GetGroupVersionKind returns SchemeGroupVersion of an Ingress func (i *Ingress) GetGroupVersionKind() schema.GroupVersionKind { return SchemeGroupVersion.WithKind("Ingress") @@ -79,7 +75,7 @@ func (is *IngressStatus) MarkLoadBalancerReady(lbs []LoadBalancerIngressStatus, // reflect that the load balancer is not ready yet. func (is *IngressStatus) MarkLoadBalancerNotReady() { ingressCondSet.Manage(is).MarkUnknown(IngressConditionLoadBalancerReady, "Uninitialized", - "Waiting for VirtualService to be ready") + "Waiting for load balancer to be ready") } // MarkLoadBalancerFailed marks the "IngressConditionLoadBalancerReady" condition to false. diff --git a/vendor/knative.dev/serving/pkg/apis/networking/v1alpha1/ingress_types.go b/vendor/knative.dev/serving/pkg/apis/networking/v1alpha1/ingress_types.go index 449cced9f1..f779bef9ef 100644 --- a/vendor/knative.dev/serving/pkg/apis/networking/v1alpha1/ingress_types.go +++ b/vendor/knative.dev/serving/pkg/apis/networking/v1alpha1/ingress_types.go @@ -143,12 +143,12 @@ type IngressTLS struct { // ServerCertificate identifies the certificate filename in the secret. // Defaults to `tls.crt`. // +optional - ServerCertificate string `json:"serverCertificate,omitempty"` + DeprecatedServerCertificate string `json:"serverCertificate,omitempty"` // PrivateKey identifies the private key filename in the secret. // Defaults to `tls.key`. // +optional - PrivateKey string `json:"privateKey,omitempty"` + DeprecatedPrivateKey string `json:"privateKey,omitempty"` } // IngressRule represents the rules mapping the paths under a specified host to diff --git a/vendor/knative.dev/serving/pkg/apis/networking/v1alpha1/zz_generated.deepcopy.go b/vendor/knative.dev/serving/pkg/apis/networking/v1alpha1/zz_generated.deepcopy.go index ea652386cc..0f4641d8b7 100644 --- a/vendor/knative.dev/serving/pkg/apis/networking/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/knative.dev/serving/pkg/apis/networking/v1alpha1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/apis/serving/v1/zz_generated.deepcopy.go b/vendor/knative.dev/serving/pkg/apis/serving/v1/zz_generated.deepcopy.go index 7d8eeddce7..bfff38f197 100644 --- a/vendor/knative.dev/serving/pkg/apis/serving/v1/zz_generated.deepcopy.go +++ b/vendor/knative.dev/serving/pkg/apis/serving/v1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/apis/serving/v1alpha1/revision_lifecycle.go b/vendor/knative.dev/serving/pkg/apis/serving/v1alpha1/revision_lifecycle.go index 6bfbcca72d..f8ca021bdc 100644 --- a/vendor/knative.dev/serving/pkg/apis/serving/v1alpha1/revision_lifecycle.go +++ b/vendor/knative.dev/serving/pkg/apis/serving/v1alpha1/revision_lifecycle.go @@ -53,10 +53,6 @@ const ( // UserQueueMetricsPortName specifies the port name to use for metrics // emitted by queue-proxy for end user. UserQueueMetricsPortName = "http-usermetric" - - // ServiceQueueMetricsPortName is the name of the port that serves metrics - // on the Kubernetes service. - ServiceQueueMetricsPortName = "http-metrics" ) var revCondSet = apis.NewLivingConditionSet( diff --git a/vendor/knative.dev/serving/pkg/apis/serving/v1alpha1/zz_generated.deepcopy.go b/vendor/knative.dev/serving/pkg/apis/serving/v1alpha1/zz_generated.deepcopy.go index 25ac6e5111..8d347d821b 100644 --- a/vendor/knative.dev/serving/pkg/apis/serving/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/knative.dev/serving/pkg/apis/serving/v1alpha1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/apis/serving/v1beta1/zz_generated.deepcopy.go b/vendor/knative.dev/serving/pkg/apis/serving/v1beta1/zz_generated.deepcopy.go index ef7830bf1e..0c9d27d139 100644 --- a/vendor/knative.dev/serving/pkg/apis/serving/v1beta1/zz_generated.deepcopy.go +++ b/vendor/knative.dev/serving/pkg/apis/serving/v1beta1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/autoscaler/testdata/config-autoscaler.yaml b/vendor/knative.dev/serving/pkg/autoscaler/testdata/config-autoscaler.yaml index 855fbd8994..a57d715c10 120000 --- a/vendor/knative.dev/serving/pkg/autoscaler/testdata/config-autoscaler.yaml +++ b/vendor/knative.dev/serving/pkg/autoscaler/testdata/config-autoscaler.yaml @@ -1 +1 @@ -../../../config/config-autoscaler.yaml \ No newline at end of file +../../../config/core/configmaps/autoscaler.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/pkg/client/clientset/versioned/clientset.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/clientset.go index bcfe2a0781..6c637a6c0c 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/clientset.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/clientset.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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. @@ -19,6 +19,8 @@ limitations under the License. package versioned import ( + "fmt" + discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" @@ -83,9 +85,14 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { } // NewForConfig creates a new Clientset for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfig will generate a rate-limiter in configShallowCopy. func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + if configShallowCopy.Burst <= 0 { + return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + } configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } var cs Clientset diff --git a/vendor/knative.dev/serving/pkg/client/clientset/versioned/doc.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/doc.go index 1122e50bfc..e48c2aa446 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/doc.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/fake/clientset_generated.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/fake/clientset_generated.go index 9a89b1c4d6..9a071bf4f1 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/fake/clientset_generated.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/fake/clientset_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/fake/doc.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/fake/doc.go index 87f3c3e0b0..2c4903250c 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/fake/doc.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/fake/register.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/fake/register.go index b746560468..c00c329ed3 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/fake/register.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/fake/register.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/scheme/doc.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/scheme/doc.go index 7d76538485..7acc2dcf25 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/scheme/doc.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/scheme/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/scheme/register.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/scheme/register.go index b9049aef87..d35b6c429d 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/scheme/register.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/scheme/register.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/autoscaling_client.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/autoscaling_client.go index 283e3c5bcf..03344f58c1 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/autoscaling_client.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/autoscaling_client.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/doc.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/doc.go index a1c6bb9fe8..41e872fe9a 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/doc.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/fake/doc.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/fake/doc.go index a00e5d7b21..c7f6e65cab 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/fake/doc.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/fake/fake_autoscaling_client.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/fake/fake_autoscaling_client.go index c6fa09ca43..1a172fd0c0 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/fake/fake_autoscaling_client.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/fake/fake_autoscaling_client.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/fake/fake_metric.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/fake/fake_metric.go index ed0419df8a..41497c9f24 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/fake/fake_metric.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/fake/fake_metric.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/fake/fake_podautoscaler.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/fake/fake_podautoscaler.go index 462ec49a73..8f79c262b9 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/fake/fake_podautoscaler.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/fake/fake_podautoscaler.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/generated_expansion.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/generated_expansion.go index f3b1683738..a9b63f8e07 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/generated_expansion.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/metric.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/metric.go index e3ebfa80c3..5441e307ee 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/metric.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/metric.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/podautoscaler.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/podautoscaler.go index 3c72d5a974..64fcbe2137 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/podautoscaler.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/podautoscaler.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/certificate.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/certificate.go index e7393b1b4f..a75c439c56 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/certificate.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/certificate.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/doc.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/doc.go index a1c6bb9fe8..41e872fe9a 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/doc.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/fake/doc.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/fake/doc.go index a00e5d7b21..c7f6e65cab 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/fake/doc.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/fake/fake_certificate.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/fake/fake_certificate.go index 55977dfae1..b216a354c9 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/fake/fake_certificate.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/fake/fake_certificate.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/fake/fake_ingress.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/fake/fake_ingress.go index bf64fa6942..dd20595fc3 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/fake/fake_ingress.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/fake/fake_ingress.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/fake/fake_networking_client.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/fake/fake_networking_client.go index 1157b084cb..439ee16a55 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/fake/fake_networking_client.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/fake/fake_networking_client.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/fake/fake_serverlessservice.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/fake/fake_serverlessservice.go index 7323d3559f..92a9fc106e 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/fake/fake_serverlessservice.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/fake/fake_serverlessservice.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/generated_expansion.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/generated_expansion.go index f89e7b6514..de5c9dac5b 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/generated_expansion.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/ingress.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/ingress.go index 8e16bf7dd3..1610ffc7e4 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/ingress.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/ingress.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/networking_client.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/networking_client.go index 520d2acae3..fc7fd0617b 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/networking_client.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/networking_client.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/serverlessservice.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/serverlessservice.go index 509126d949..7fbd71d4e8 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/serverlessservice.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/networking/v1alpha1/serverlessservice.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/configuration.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/configuration.go index 49dbf80add..2bff52a806 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/configuration.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/configuration.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/doc.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/doc.go index dbfbca303d..5b83bd1f41 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/doc.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/fake/doc.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/fake/doc.go index a00e5d7b21..c7f6e65cab 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/fake/doc.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/fake/fake_configuration.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/fake/fake_configuration.go index 6aa9f26ae4..7a55655155 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/fake/fake_configuration.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/fake/fake_configuration.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/fake/fake_revision.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/fake/fake_revision.go index 0161aca1f9..2d57ce7b5a 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/fake/fake_revision.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/fake/fake_revision.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/fake/fake_route.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/fake/fake_route.go index 1d8ad4fc40..00692ab987 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/fake/fake_route.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/fake/fake_route.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/fake/fake_service.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/fake/fake_service.go index d1a835117a..f9f335e282 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/fake/fake_service.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/fake/fake_service.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/fake/fake_serving_client.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/fake/fake_serving_client.go index 3560f7ea3c..617587c4c2 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/fake/fake_serving_client.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/fake/fake_serving_client.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/generated_expansion.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/generated_expansion.go index 5d6a8dde20..4c0460b13c 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/generated_expansion.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/revision.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/revision.go index 0e9a620a13..e6d5120437 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/revision.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/revision.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/route.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/route.go index cc1d063235..b3105f3a95 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/route.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/route.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/service.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/service.go index 04d5a1ada8..a2148ae012 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/service.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/service.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/serving_client.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/serving_client.go index ed1e1b94e7..25925ba2d0 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/serving_client.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1/serving_client.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/configuration.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/configuration.go index a747d3ff01..1d583fdbaf 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/configuration.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/configuration.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/doc.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/doc.go index a1c6bb9fe8..41e872fe9a 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/doc.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/fake/doc.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/fake/doc.go index a00e5d7b21..c7f6e65cab 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/fake/doc.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/fake/fake_configuration.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/fake/fake_configuration.go index 10da68b915..670989b3f5 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/fake/fake_configuration.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/fake/fake_configuration.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/fake/fake_revision.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/fake/fake_revision.go index 1df1766c81..113ab1aab9 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/fake/fake_revision.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/fake/fake_revision.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/fake/fake_route.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/fake/fake_route.go index e77a2ad04d..a972e90cf4 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/fake/fake_route.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/fake/fake_route.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/fake/fake_service.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/fake/fake_service.go index d3d4ac00ec..c319e904d8 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/fake/fake_service.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/fake/fake_service.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/fake/fake_serving_client.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/fake/fake_serving_client.go index 384a951c08..dfe37782ed 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/fake/fake_serving_client.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/fake/fake_serving_client.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/generated_expansion.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/generated_expansion.go index 6ce17decf7..1e9bae5365 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/generated_expansion.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/revision.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/revision.go index 3bb2663c11..efac4f465a 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/revision.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/revision.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/route.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/route.go index 0d8edf8857..82e9d2373b 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/route.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/route.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/service.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/service.go index 384c987819..a5b669ab38 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/service.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/service.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/serving_client.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/serving_client.go index 1c7173ddfc..e6ade911be 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/serving_client.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/serving_client.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/configuration.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/configuration.go index cb32b7eebf..abc50b8a1b 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/configuration.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/configuration.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/doc.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/doc.go index ede2d4a287..b641cb3730 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/doc.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/fake/doc.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/fake/doc.go index a00e5d7b21..c7f6e65cab 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/fake/doc.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/fake/fake_configuration.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/fake/fake_configuration.go index 396c580913..c0aa1d2510 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/fake/fake_configuration.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/fake/fake_configuration.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/fake/fake_revision.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/fake/fake_revision.go index fef6147120..4025c07594 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/fake/fake_revision.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/fake/fake_revision.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/fake/fake_route.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/fake/fake_route.go index b058805d1a..4bb9dc913d 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/fake/fake_route.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/fake/fake_route.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/fake/fake_service.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/fake/fake_service.go index db5331b1a0..593f70c17a 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/fake/fake_service.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/fake/fake_service.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/fake/fake_serving_client.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/fake/fake_serving_client.go index 5d9bc1550a..74b9670397 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/fake/fake_serving_client.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/fake/fake_serving_client.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/generated_expansion.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/generated_expansion.go index 58d005da44..b7a7ae310c 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/generated_expansion.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/revision.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/revision.go index 22df50aff2..a8ca29f396 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/revision.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/revision.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/route.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/route.go index 9151c93f49..b893abcf27 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/route.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/route.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/service.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/service.go index 1965a5f9b7..12985f2c77 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/service.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/service.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/serving_client.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/serving_client.go index 8c1efd82b4..235b173914 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/serving_client.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1beta1/serving_client.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/informers/externalversions/autoscaling/interface.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/autoscaling/interface.go index 4f0685b44a..a21a2a0bde 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/autoscaling/interface.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/autoscaling/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/informers/externalversions/autoscaling/v1alpha1/interface.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/autoscaling/v1alpha1/interface.go index 5caa044ee8..fa410aa8d3 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/autoscaling/v1alpha1/interface.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/autoscaling/v1alpha1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/informers/externalversions/autoscaling/v1alpha1/metric.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/autoscaling/v1alpha1/metric.go index 810958d34c..5a5a8f4515 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/autoscaling/v1alpha1/metric.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/autoscaling/v1alpha1/metric.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/informers/externalversions/autoscaling/v1alpha1/podautoscaler.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/autoscaling/v1alpha1/podautoscaler.go index f96d19ad16..eb872c4f55 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/autoscaling/v1alpha1/podautoscaler.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/autoscaling/v1alpha1/podautoscaler.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/informers/externalversions/factory.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/factory.go index 1ca1788e83..1d42b4c3e7 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/factory.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/factory.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/informers/externalversions/generic.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/generic.go index e25f62f80f..00313b24f5 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/generic.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/generic.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go index aeb04f08da..94e406ae77 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/informers/externalversions/networking/interface.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/networking/interface.go index fdb2d5c19a..1a234e1c13 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/networking/interface.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/networking/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/informers/externalversions/networking/v1alpha1/certificate.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/networking/v1alpha1/certificate.go index 1c58c0d571..b53730e218 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/networking/v1alpha1/certificate.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/networking/v1alpha1/certificate.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/informers/externalversions/networking/v1alpha1/ingress.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/networking/v1alpha1/ingress.go index ec529bf9c8..a43875dfb5 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/networking/v1alpha1/ingress.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/networking/v1alpha1/ingress.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/informers/externalversions/networking/v1alpha1/interface.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/networking/v1alpha1/interface.go index c837253d64..55d1bf1b57 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/networking/v1alpha1/interface.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/networking/v1alpha1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/informers/externalversions/networking/v1alpha1/serverlessservice.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/networking/v1alpha1/serverlessservice.go index 2c4c3c782c..e346aca70b 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/networking/v1alpha1/serverlessservice.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/networking/v1alpha1/serverlessservice.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/informers/externalversions/serving/interface.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/interface.go index 464f72de1a..be69bb69dd 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/interface.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/configuration.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/configuration.go index 2de7a2bcbc..6e5b5e5e32 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/configuration.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/configuration.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/interface.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/interface.go index ead5e6e33a..d1a44d3186 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/interface.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/revision.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/revision.go index 6656308d9d..759a009327 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/revision.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/revision.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/route.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/route.go index 3491334d04..dd94268445 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/route.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/route.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/service.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/service.go index d66024a7d6..2f17a4fc92 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/service.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1/service.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/configuration.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/configuration.go index 67efcc7e2a..a7f4b47e25 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/configuration.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/configuration.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/interface.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/interface.go index 347978c55c..7b49153ba8 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/interface.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/revision.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/revision.go index 8fa0914c98..3fccf1d3b6 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/revision.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/revision.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/route.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/route.go index 2347c750cc..79db675ef0 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/route.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/route.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/service.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/service.go index 3796a6f83e..1b141a6f3f 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/service.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1alpha1/service.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/configuration.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/configuration.go index 86548abdb8..338b8d014c 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/configuration.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/configuration.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/interface.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/interface.go index 500761d45c..6e9290d1e2 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/interface.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/revision.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/revision.go index a68e968b15..1d44246d0c 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/revision.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/revision.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/route.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/route.go index f81e6964f1..3d22f848f5 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/route.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/route.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/service.go b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/service.go index d80a9c9763..e06575d1ef 100644 --- a/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/service.go +++ b/vendor/knative.dev/serving/pkg/client/informers/externalversions/serving/v1beta1/service.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/injection/client/client.go b/vendor/knative.dev/serving/pkg/client/injection/client/client.go index 532e1a55ae..1c49fa91a6 100644 --- a/vendor/knative.dev/serving/pkg/client/injection/client/client.go +++ b/vendor/knative.dev/serving/pkg/client/injection/client/client.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/injection/client/fake/fake.go b/vendor/knative.dev/serving/pkg/client/injection/client/fake/fake.go index dba2bef970..582e58d23c 100644 --- a/vendor/knative.dev/serving/pkg/client/injection/client/fake/fake.go +++ b/vendor/knative.dev/serving/pkg/client/injection/client/fake/fake.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/injection/informers/factory/factory.go b/vendor/knative.dev/serving/pkg/client/injection/informers/factory/factory.go index a4cadf53de..ba5f57b48e 100644 --- a/vendor/knative.dev/serving/pkg/client/injection/informers/factory/factory.go +++ b/vendor/knative.dev/serving/pkg/client/injection/informers/factory/factory.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/injection/informers/factory/fake/fake.go b/vendor/knative.dev/serving/pkg/client/injection/informers/factory/fake/fake.go index a0cba5d090..e984ede573 100644 --- a/vendor/knative.dev/serving/pkg/client/injection/informers/factory/fake/fake.go +++ b/vendor/knative.dev/serving/pkg/client/injection/informers/factory/fake/fake.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/injection/informers/serving/v1/service/fake/fake.go b/vendor/knative.dev/serving/pkg/client/injection/informers/serving/v1/service/fake/fake.go index 44ce1bfa15..e41017317e 100644 --- a/vendor/knative.dev/serving/pkg/client/injection/informers/serving/v1/service/fake/fake.go +++ b/vendor/knative.dev/serving/pkg/client/injection/informers/serving/v1/service/fake/fake.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/injection/informers/serving/v1/service/service.go b/vendor/knative.dev/serving/pkg/client/injection/informers/serving/v1/service/service.go index 639a292da1..1b72173367 100644 --- a/vendor/knative.dev/serving/pkg/client/injection/informers/serving/v1/service/service.go +++ b/vendor/knative.dev/serving/pkg/client/injection/informers/serving/v1/service/service.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/listers/autoscaling/v1alpha1/expansion_generated.go b/vendor/knative.dev/serving/pkg/client/listers/autoscaling/v1alpha1/expansion_generated.go index 1f55672a13..58fd37c078 100644 --- a/vendor/knative.dev/serving/pkg/client/listers/autoscaling/v1alpha1/expansion_generated.go +++ b/vendor/knative.dev/serving/pkg/client/listers/autoscaling/v1alpha1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/listers/autoscaling/v1alpha1/metric.go b/vendor/knative.dev/serving/pkg/client/listers/autoscaling/v1alpha1/metric.go index 1e897dcb12..192ec63b93 100644 --- a/vendor/knative.dev/serving/pkg/client/listers/autoscaling/v1alpha1/metric.go +++ b/vendor/knative.dev/serving/pkg/client/listers/autoscaling/v1alpha1/metric.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/listers/autoscaling/v1alpha1/podautoscaler.go b/vendor/knative.dev/serving/pkg/client/listers/autoscaling/v1alpha1/podautoscaler.go index f9a760628b..f9cdc39448 100644 --- a/vendor/knative.dev/serving/pkg/client/listers/autoscaling/v1alpha1/podautoscaler.go +++ b/vendor/knative.dev/serving/pkg/client/listers/autoscaling/v1alpha1/podautoscaler.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/listers/networking/v1alpha1/certificate.go b/vendor/knative.dev/serving/pkg/client/listers/networking/v1alpha1/certificate.go index 8806023116..81c7473c17 100644 --- a/vendor/knative.dev/serving/pkg/client/listers/networking/v1alpha1/certificate.go +++ b/vendor/knative.dev/serving/pkg/client/listers/networking/v1alpha1/certificate.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/listers/networking/v1alpha1/expansion_generated.go b/vendor/knative.dev/serving/pkg/client/listers/networking/v1alpha1/expansion_generated.go index 90dc171d70..a31fdafdcf 100644 --- a/vendor/knative.dev/serving/pkg/client/listers/networking/v1alpha1/expansion_generated.go +++ b/vendor/knative.dev/serving/pkg/client/listers/networking/v1alpha1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/listers/networking/v1alpha1/ingress.go b/vendor/knative.dev/serving/pkg/client/listers/networking/v1alpha1/ingress.go index dcaf860990..14efa3e959 100644 --- a/vendor/knative.dev/serving/pkg/client/listers/networking/v1alpha1/ingress.go +++ b/vendor/knative.dev/serving/pkg/client/listers/networking/v1alpha1/ingress.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/listers/networking/v1alpha1/serverlessservice.go b/vendor/knative.dev/serving/pkg/client/listers/networking/v1alpha1/serverlessservice.go index f79f4dc274..f6d3fcd9f0 100644 --- a/vendor/knative.dev/serving/pkg/client/listers/networking/v1alpha1/serverlessservice.go +++ b/vendor/knative.dev/serving/pkg/client/listers/networking/v1alpha1/serverlessservice.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/listers/serving/v1/configuration.go b/vendor/knative.dev/serving/pkg/client/listers/serving/v1/configuration.go index 274fa20a76..94c3f33641 100644 --- a/vendor/knative.dev/serving/pkg/client/listers/serving/v1/configuration.go +++ b/vendor/knative.dev/serving/pkg/client/listers/serving/v1/configuration.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/listers/serving/v1/expansion_generated.go b/vendor/knative.dev/serving/pkg/client/listers/serving/v1/expansion_generated.go index 644e0b7885..091768b12d 100644 --- a/vendor/knative.dev/serving/pkg/client/listers/serving/v1/expansion_generated.go +++ b/vendor/knative.dev/serving/pkg/client/listers/serving/v1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/listers/serving/v1/revision.go b/vendor/knative.dev/serving/pkg/client/listers/serving/v1/revision.go index 9bf628a409..f53c58db1b 100644 --- a/vendor/knative.dev/serving/pkg/client/listers/serving/v1/revision.go +++ b/vendor/knative.dev/serving/pkg/client/listers/serving/v1/revision.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/listers/serving/v1/route.go b/vendor/knative.dev/serving/pkg/client/listers/serving/v1/route.go index f6a784dfd4..02e6374fb5 100644 --- a/vendor/knative.dev/serving/pkg/client/listers/serving/v1/route.go +++ b/vendor/knative.dev/serving/pkg/client/listers/serving/v1/route.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/listers/serving/v1/service.go b/vendor/knative.dev/serving/pkg/client/listers/serving/v1/service.go index f3f224b0a7..5ba9b86c19 100644 --- a/vendor/knative.dev/serving/pkg/client/listers/serving/v1/service.go +++ b/vendor/knative.dev/serving/pkg/client/listers/serving/v1/service.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/listers/serving/v1alpha1/configuration.go b/vendor/knative.dev/serving/pkg/client/listers/serving/v1alpha1/configuration.go index a31ae73c6f..0b3e4d65e6 100644 --- a/vendor/knative.dev/serving/pkg/client/listers/serving/v1alpha1/configuration.go +++ b/vendor/knative.dev/serving/pkg/client/listers/serving/v1alpha1/configuration.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/listers/serving/v1alpha1/expansion_generated.go b/vendor/knative.dev/serving/pkg/client/listers/serving/v1alpha1/expansion_generated.go index ab65259117..cc9c0e1aa6 100644 --- a/vendor/knative.dev/serving/pkg/client/listers/serving/v1alpha1/expansion_generated.go +++ b/vendor/knative.dev/serving/pkg/client/listers/serving/v1alpha1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/listers/serving/v1alpha1/revision.go b/vendor/knative.dev/serving/pkg/client/listers/serving/v1alpha1/revision.go index 79b365d3ee..508c59df23 100644 --- a/vendor/knative.dev/serving/pkg/client/listers/serving/v1alpha1/revision.go +++ b/vendor/knative.dev/serving/pkg/client/listers/serving/v1alpha1/revision.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/listers/serving/v1alpha1/route.go b/vendor/knative.dev/serving/pkg/client/listers/serving/v1alpha1/route.go index f6b433fa10..aee2b9f4a5 100644 --- a/vendor/knative.dev/serving/pkg/client/listers/serving/v1alpha1/route.go +++ b/vendor/knative.dev/serving/pkg/client/listers/serving/v1alpha1/route.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/listers/serving/v1alpha1/service.go b/vendor/knative.dev/serving/pkg/client/listers/serving/v1alpha1/service.go index 6acf883533..798d2b2757 100644 --- a/vendor/knative.dev/serving/pkg/client/listers/serving/v1alpha1/service.go +++ b/vendor/knative.dev/serving/pkg/client/listers/serving/v1alpha1/service.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/listers/serving/v1beta1/configuration.go b/vendor/knative.dev/serving/pkg/client/listers/serving/v1beta1/configuration.go index 227ef087ba..5ccceff028 100644 --- a/vendor/knative.dev/serving/pkg/client/listers/serving/v1beta1/configuration.go +++ b/vendor/knative.dev/serving/pkg/client/listers/serving/v1beta1/configuration.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/listers/serving/v1beta1/expansion_generated.go b/vendor/knative.dev/serving/pkg/client/listers/serving/v1beta1/expansion_generated.go index acaa8f21c3..ad73dc85de 100644 --- a/vendor/knative.dev/serving/pkg/client/listers/serving/v1beta1/expansion_generated.go +++ b/vendor/knative.dev/serving/pkg/client/listers/serving/v1beta1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/listers/serving/v1beta1/revision.go b/vendor/knative.dev/serving/pkg/client/listers/serving/v1beta1/revision.go index 18340f15f6..a74c986f56 100644 --- a/vendor/knative.dev/serving/pkg/client/listers/serving/v1beta1/revision.go +++ b/vendor/knative.dev/serving/pkg/client/listers/serving/v1beta1/revision.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/listers/serving/v1beta1/route.go b/vendor/knative.dev/serving/pkg/client/listers/serving/v1beta1/route.go index dbcd19e63a..d965d0b2cd 100644 --- a/vendor/knative.dev/serving/pkg/client/listers/serving/v1beta1/route.go +++ b/vendor/knative.dev/serving/pkg/client/listers/serving/v1beta1/route.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/client/listers/serving/v1beta1/service.go b/vendor/knative.dev/serving/pkg/client/listers/serving/v1beta1/service.go index aeb5c1a9fc..3fd62721c9 100644 --- a/vendor/knative.dev/serving/pkg/client/listers/serving/v1beta1/service.go +++ b/vendor/knative.dev/serving/pkg/client/listers/serving/v1beta1/service.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/deployment/testdata/config-deployment.yaml b/vendor/knative.dev/serving/pkg/deployment/testdata/config-deployment.yaml index a1c7629c19..10ba19c148 120000 --- a/vendor/knative.dev/serving/pkg/deployment/testdata/config-deployment.yaml +++ b/vendor/knative.dev/serving/pkg/deployment/testdata/config-deployment.yaml @@ -1 +1 @@ -../../../config/config-deployment.yaml \ No newline at end of file +../../../config/core/configmaps/deployment.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/pkg/gc/config.go b/vendor/knative.dev/serving/pkg/gc/config.go index 7090bf1198..25c2d63844 100644 --- a/vendor/knative.dev/serving/pkg/gc/config.go +++ b/vendor/knative.dev/serving/pkg/gc/config.go @@ -18,7 +18,7 @@ package gc import ( "context" - "errors" + "fmt" "strconv" "time" @@ -56,7 +56,7 @@ func NewConfigFromConfigMapFunc(ctx context.Context) func(configMap *corev1.Conf }{{ key: "stale-revision-create-delay", field: &c.StaleRevisionCreateDelay, - defaultValue: 24 * time.Hour, + defaultValue: 48 * time.Hour, }, { key: "stale-revision-timeout", field: &c.StaleRevisionTimeout, @@ -76,17 +76,17 @@ func NewConfigFromConfigMapFunc(ctx context.Context) func(configMap *corev1.Conf } if raw, ok := configMap.Data["stale-revision-minimum-generations"]; !ok { - c.StaleRevisionMinimumGenerations = 1 - } else if val, err := strconv.ParseInt(raw, 10, 64); err != nil { + c.StaleRevisionMinimumGenerations = 20 + } else if val, err := strconv.ParseInt(raw, 10 /*base*/, 64 /*bit count*/); err != nil { return nil, err } else if val < 0 { - return nil, errors.New("stale-revision-minimum-generations must be zero or greater") + return nil, fmt.Errorf("stale-revision-minimum-generations must be non-negative, was: %d", val) } else { c.StaleRevisionMinimumGenerations = val } if c.StaleRevisionTimeout-c.StaleRevisionLastpinnedDebounce < minRevisionTimeout { - logger.Errorf("Got revision timeout of %v, minimum supported value is %v", c.StaleRevisionTimeout, minRevisionTimeout+c.StaleRevisionLastpinnedDebounce) + logger.Warnf("Got revision timeout of %v, minimum supported value is %v", c.StaleRevisionTimeout, minRevisionTimeout+c.StaleRevisionLastpinnedDebounce) c.StaleRevisionTimeout = minRevisionTimeout + c.StaleRevisionLastpinnedDebounce return &c, nil } diff --git a/vendor/knative.dev/serving/pkg/gc/testdata/config-gc.yaml b/vendor/knative.dev/serving/pkg/gc/testdata/config-gc.yaml index f6ee95a326..0fc14e43b5 120000 --- a/vendor/knative.dev/serving/pkg/gc/testdata/config-gc.yaml +++ b/vendor/knative.dev/serving/pkg/gc/testdata/config-gc.yaml @@ -1 +1 @@ -../../../config/config-gc.yaml \ No newline at end of file +../../../config/core/configmaps/gc.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/pkg/gc/zz_generated.deepcopy.go b/vendor/knative.dev/serving/pkg/gc/zz_generated.deepcopy.go index 7a08eb69b2..9a3151e120 100644 --- a/vendor/knative.dev/serving/pkg/gc/zz_generated.deepcopy.go +++ b/vendor/knative.dev/serving/pkg/gc/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/logging/testdata/config-logging.yaml b/vendor/knative.dev/serving/pkg/logging/testdata/config-logging.yaml index 581e985f9c..affd1b5f81 120000 --- a/vendor/knative.dev/serving/pkg/logging/testdata/config-logging.yaml +++ b/vendor/knative.dev/serving/pkg/logging/testdata/config-logging.yaml @@ -1 +1 @@ -../../../config/config-logging.yaml \ No newline at end of file +../../../config/core/configmaps/logging.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/pkg/metrics/testdata/config-observability.yaml b/vendor/knative.dev/serving/pkg/metrics/testdata/config-observability.yaml index 7827630e3a..5bf896ec8c 120000 --- a/vendor/knative.dev/serving/pkg/metrics/testdata/config-observability.yaml +++ b/vendor/knative.dev/serving/pkg/metrics/testdata/config-observability.yaml @@ -1 +1 @@ -../../../config/config-observability.yaml \ No newline at end of file +../../../config/core/configmaps/observability.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/pkg/network/network.go b/vendor/knative.dev/serving/pkg/network/network.go index 04d219799c..c620b81bb8 100644 --- a/vendor/knative.dev/serving/pkg/network/network.go +++ b/vendor/knative.dev/serving/pkg/network/network.go @@ -384,3 +384,23 @@ func RewriteHostOut(r *http.Request) { r.Header.Del(OriginalHostHeader) } } + +// NameForPortNumber finds the name for a given port as defined by a Service. +func NameForPortNumber(svc *corev1.Service, portNumber int32) (string, error) { + for _, port := range svc.Spec.Ports { + if port.Port == portNumber { + return port.Name, nil + } + } + return "", fmt.Errorf("no port with number %d found", portNumber) +} + +// PortNumberForName resolves a given name to a portNumber as defined by an EndpointSubset. +func PortNumberForName(sub corev1.EndpointSubset, portName string) (int32, error) { + for _, subPort := range sub.Ports { + if subPort.Name == portName { + return subPort.Port, nil + } + } + return 0, fmt.Errorf("no port for name %q found", portName) +} diff --git a/vendor/knative.dev/serving/pkg/network/testdata/config-network.yaml b/vendor/knative.dev/serving/pkg/network/testdata/config-network.yaml index e316b0466b..eb11ac0e9f 120000 --- a/vendor/knative.dev/serving/pkg/network/testdata/config-network.yaml +++ b/vendor/knative.dev/serving/pkg/network/testdata/config-network.yaml @@ -1 +1 @@ -../../../config/config-network.yaml \ No newline at end of file +../../../config/core/configmaps/network.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/pkg/network/zz_generated.deepcopy.go b/vendor/knative.dev/serving/pkg/network/zz_generated.deepcopy.go index 1a180f397a..43e67b1931 100644 --- a/vendor/knative.dev/serving/pkg/network/zz_generated.deepcopy.go +++ b/vendor/knative.dev/serving/pkg/network/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/pkg/reconciler/certificate/config/testdata/config-certmanager.yaml b/vendor/knative.dev/serving/pkg/reconciler/certificate/config/testdata/config-certmanager.yaml index 6d8b9bae96..e1a32211b0 120000 --- a/vendor/knative.dev/serving/pkg/reconciler/certificate/config/testdata/config-certmanager.yaml +++ b/vendor/knative.dev/serving/pkg/reconciler/certificate/config/testdata/config-certmanager.yaml @@ -1 +1 @@ -../../../../../config/config-certmanager.yaml \ No newline at end of file +../../../../../config/cert-manager/config.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/pkg/reconciler/gc/config/testdata/config-gc.yaml b/vendor/knative.dev/serving/pkg/reconciler/gc/config/testdata/config-gc.yaml index 929b7c057a..71c3f7d74d 120000 --- a/vendor/knative.dev/serving/pkg/reconciler/gc/config/testdata/config-gc.yaml +++ b/vendor/knative.dev/serving/pkg/reconciler/gc/config/testdata/config-gc.yaml @@ -1 +1 @@ -../../../../../config/config-gc.yaml \ No newline at end of file +../../../../../config/core/configmaps/gc.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/pkg/reconciler/ingress/config/testdata/config-istio.yaml b/vendor/knative.dev/serving/pkg/reconciler/ingress/config/testdata/config-istio.yaml index 342ffffed5..7f36983365 120000 --- a/vendor/knative.dev/serving/pkg/reconciler/ingress/config/testdata/config-istio.yaml +++ b/vendor/knative.dev/serving/pkg/reconciler/ingress/config/testdata/config-istio.yaml @@ -1 +1 @@ -../../../../../config/config-istio.yaml \ No newline at end of file +../../../../../config/istio-ingress/config.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/pkg/reconciler/ingress/config/testdata/config-network.yaml b/vendor/knative.dev/serving/pkg/reconciler/ingress/config/testdata/config-network.yaml index b774d24cbb..56cb332a04 120000 --- a/vendor/knative.dev/serving/pkg/reconciler/ingress/config/testdata/config-network.yaml +++ b/vendor/knative.dev/serving/pkg/reconciler/ingress/config/testdata/config-network.yaml @@ -1 +1 @@ -../../../../../config/config-network.yaml \ No newline at end of file +../../../../../config/core/configmaps/network.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/pkg/reconciler/revision/config/testdata/config-autoscaler.yaml b/vendor/knative.dev/serving/pkg/reconciler/revision/config/testdata/config-autoscaler.yaml index 05b9f33bbc..4ed318ac46 120000 --- a/vendor/knative.dev/serving/pkg/reconciler/revision/config/testdata/config-autoscaler.yaml +++ b/vendor/knative.dev/serving/pkg/reconciler/revision/config/testdata/config-autoscaler.yaml @@ -1 +1 @@ -../../../../../config/config-autoscaler.yaml \ No newline at end of file +../../../../../config/core/configmaps/autoscaler.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/pkg/reconciler/revision/config/testdata/config-defaults.yaml b/vendor/knative.dev/serving/pkg/reconciler/revision/config/testdata/config-defaults.yaml index 93ce67f647..f10641f859 120000 --- a/vendor/knative.dev/serving/pkg/reconciler/revision/config/testdata/config-defaults.yaml +++ b/vendor/knative.dev/serving/pkg/reconciler/revision/config/testdata/config-defaults.yaml @@ -1 +1 @@ -../../../../../config/config-defaults.yaml \ No newline at end of file +../../../../../config/core/configmaps/defaults.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/pkg/reconciler/revision/config/testdata/config-deployment.yaml b/vendor/knative.dev/serving/pkg/reconciler/revision/config/testdata/config-deployment.yaml index 8e4b6d96a0..fa9039a1c3 120000 --- a/vendor/knative.dev/serving/pkg/reconciler/revision/config/testdata/config-deployment.yaml +++ b/vendor/knative.dev/serving/pkg/reconciler/revision/config/testdata/config-deployment.yaml @@ -1 +1 @@ -../../../../../config/config-deployment.yaml \ No newline at end of file +../../../../../config/core/configmaps/deployment.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/pkg/reconciler/revision/config/testdata/config-logging.yaml b/vendor/knative.dev/serving/pkg/reconciler/revision/config/testdata/config-logging.yaml index def106f120..a76506aeb2 120000 --- a/vendor/knative.dev/serving/pkg/reconciler/revision/config/testdata/config-logging.yaml +++ b/vendor/knative.dev/serving/pkg/reconciler/revision/config/testdata/config-logging.yaml @@ -1 +1 @@ -../../../../../config/config-logging.yaml \ No newline at end of file +../../../../../config/core/configmaps/logging.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/pkg/reconciler/revision/config/testdata/config-network.yaml b/vendor/knative.dev/serving/pkg/reconciler/revision/config/testdata/config-network.yaml index b774d24cbb..56cb332a04 120000 --- a/vendor/knative.dev/serving/pkg/reconciler/revision/config/testdata/config-network.yaml +++ b/vendor/knative.dev/serving/pkg/reconciler/revision/config/testdata/config-network.yaml @@ -1 +1 @@ -../../../../../config/config-network.yaml \ No newline at end of file +../../../../../config/core/configmaps/network.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/pkg/reconciler/revision/config/testdata/config-observability.yaml b/vendor/knative.dev/serving/pkg/reconciler/revision/config/testdata/config-observability.yaml index ecbbeaaee7..78663f4745 120000 --- a/vendor/knative.dev/serving/pkg/reconciler/revision/config/testdata/config-observability.yaml +++ b/vendor/knative.dev/serving/pkg/reconciler/revision/config/testdata/config-observability.yaml @@ -1 +1 @@ -../../../../../config/config-observability.yaml \ No newline at end of file +../../../../../config/core/configmaps/observability.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/pkg/reconciler/route/config/testdata/config-domain.yaml b/vendor/knative.dev/serving/pkg/reconciler/route/config/testdata/config-domain.yaml index fd6402b7c4..39a7f1839a 120000 --- a/vendor/knative.dev/serving/pkg/reconciler/route/config/testdata/config-domain.yaml +++ b/vendor/knative.dev/serving/pkg/reconciler/route/config/testdata/config-domain.yaml @@ -1 +1 @@ -../../../../../config/config-domain.yaml \ No newline at end of file +../../../../../config/core/configmaps/domain.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/pkg/reconciler/route/config/testdata/config-gc.yaml b/vendor/knative.dev/serving/pkg/reconciler/route/config/testdata/config-gc.yaml index 929b7c057a..71c3f7d74d 120000 --- a/vendor/knative.dev/serving/pkg/reconciler/route/config/testdata/config-gc.yaml +++ b/vendor/knative.dev/serving/pkg/reconciler/route/config/testdata/config-gc.yaml @@ -1 +1 @@ -../../../../../config/config-gc.yaml \ No newline at end of file +../../../../../config/core/configmaps/gc.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/pkg/reconciler/route/config/testdata/config-network.yaml b/vendor/knative.dev/serving/pkg/reconciler/route/config/testdata/config-network.yaml index b774d24cbb..56cb332a04 120000 --- a/vendor/knative.dev/serving/pkg/reconciler/route/config/testdata/config-network.yaml +++ b/vendor/knative.dev/serving/pkg/reconciler/route/config/testdata/config-network.yaml @@ -1 +1 @@ -../../../../../config/config-network.yaml \ No newline at end of file +../../../../../config/core/configmaps/network.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/pkg/reconciler/route/config/zz_generated.deepcopy.go b/vendor/knative.dev/serving/pkg/reconciler/route/config/zz_generated.deepcopy.go index 8e6a4a773b..86b30c4995 100644 --- a/vendor/knative.dev/serving/pkg/reconciler/route/config/zz_generated.deepcopy.go +++ b/vendor/knative.dev/serving/pkg/reconciler/route/config/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2019 The Knative Authors +Copyright 2020 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/knative.dev/serving/test/config/100-istio-default-domain.yaml b/vendor/knative.dev/serving/test/config/100-istio-default-domain.yaml deleted file mode 120000 index 7d6227ed31..0000000000 --- a/vendor/knative.dev/serving/test/config/100-istio-default-domain.yaml +++ /dev/null @@ -1 +0,0 @@ -../../config/post-install/100-istio-default-domain.yaml \ No newline at end of file From 88cc65f5f1f6f81414e46382e889ae6327eb11df Mon Sep 17 00:00:00 2001 From: nachocano Date: Tue, 21 Jan 2020 13:46:46 -0800 Subject: [PATCH 7/9] missing files --- .../pkg/testutils/junithelper/README.md | 22 +++++ .../pkg/testutils/junithelper/main.go | 57 +++++++++++ vendor/knative.dev/pkg/webhook/admission.go | 94 +++++++++++++++++++ .../serving/config/100-namespace.yaml | 1 + ...200-addressable-resolvers-clusterrole.yaml | 1 + .../config/200-clusterrole-certmanager.yaml | 1 + .../serving/config/200-clusterrole-istio.yaml | 1 + .../config/200-clusterrole-metrics.yaml | 1 + .../config/200-clusterrole-namespaced.yaml | 1 + .../serving/config/200-clusterrole.yaml | 1 + .../200-podspecable-bindings-clusterrole.yaml | 1 + .../serving/config/200-serviceaccount.yaml | 1 + ...201-clusterrolebinding-metrics-server.yaml | 1 + .../201-clusterrolebinding-metrics.yaml | 1 + .../config/201-clusterrolebinding.yaml | 1 + .../201-rolebinding-metrics-server.yaml | 1 + .../serving/config/202-gateway.yaml | 1 + .../serving/config/203-local-gateway.yaml | 1 + .../serving/config/300-certificate.yaml | 1 + .../serving/config/300-configuration.yaml | 1 + .../serving/config/300-ingress.yaml | 1 + .../serving/config/300-metric.yaml | 1 + vendor/knative.dev/serving/config/300-pa.yaml | 1 + .../serving/config/300-revision.yaml | 1 + .../knative.dev/serving/config/300-route.yaml | 1 + .../serving/config/300-service.yaml | 1 + .../knative.dev/serving/config/300-sks.yaml | 1 + .../500-webhook-configmap-validation.yaml | 1 + .../config/500-webhook-defaulting.yaml | 1 + .../500-webhook-resource-validation.yaml | 1 + .../serving/config/500-webhook-secret.yaml | 1 + .../knative.dev/serving/config/999-cache.yaml | 1 + .../serving/config/activator-hpa.yaml | 1 + .../knative.dev/serving/config/activator.yaml | 1 + .../serving/config/autoscaler-hpa.yaml | 1 + .../serving/config/autoscaler.yaml | 1 + .../serving/config/config-autoscaler.yaml | 1 + .../serving/config/config-certmanager.yaml | 1 + .../serving/config/config-defaults.yaml | 1 + .../serving/config/config-deployment.yaml | 1 + .../serving/config/config-domain.yaml | 1 + .../knative.dev/serving/config/config-gc.yaml | 1 + .../serving/config/config-istio.yaml | 1 + .../serving/config/config-logging.yaml | 1 + .../serving/config/config-network.yaml | 1 + .../serving/config/config-observability.yaml | 1 + .../serving/config/config-tracing.yaml | 1 + .../serving/config/controller.yaml | 1 + .../config/custom-metrics-apiservice.yaml | 1 + .../config/networking-certmanager.yaml | 1 + .../serving/config/networking-istio.yaml | 1 + .../serving/config/networking-ns-cert.yaml | 1 + .../knative.dev/serving/config/webhook.yaml | 1 + .../serving/pkg/network/bufferpool.go | 55 +++++++++++ 54 files changed, 278 insertions(+) create mode 100644 vendor/knative.dev/pkg/testutils/junithelper/README.md create mode 100644 vendor/knative.dev/pkg/testutils/junithelper/main.go create mode 100644 vendor/knative.dev/pkg/webhook/admission.go create mode 120000 vendor/knative.dev/serving/config/100-namespace.yaml create mode 120000 vendor/knative.dev/serving/config/200-addressable-resolvers-clusterrole.yaml create mode 120000 vendor/knative.dev/serving/config/200-clusterrole-certmanager.yaml create mode 120000 vendor/knative.dev/serving/config/200-clusterrole-istio.yaml create mode 120000 vendor/knative.dev/serving/config/200-clusterrole-metrics.yaml create mode 120000 vendor/knative.dev/serving/config/200-clusterrole-namespaced.yaml create mode 120000 vendor/knative.dev/serving/config/200-clusterrole.yaml create mode 120000 vendor/knative.dev/serving/config/200-podspecable-bindings-clusterrole.yaml create mode 120000 vendor/knative.dev/serving/config/200-serviceaccount.yaml create mode 120000 vendor/knative.dev/serving/config/201-clusterrolebinding-metrics-server.yaml create mode 120000 vendor/knative.dev/serving/config/201-clusterrolebinding-metrics.yaml create mode 120000 vendor/knative.dev/serving/config/201-clusterrolebinding.yaml create mode 120000 vendor/knative.dev/serving/config/201-rolebinding-metrics-server.yaml create mode 120000 vendor/knative.dev/serving/config/202-gateway.yaml create mode 120000 vendor/knative.dev/serving/config/203-local-gateway.yaml create mode 120000 vendor/knative.dev/serving/config/300-certificate.yaml create mode 120000 vendor/knative.dev/serving/config/300-configuration.yaml create mode 120000 vendor/knative.dev/serving/config/300-ingress.yaml create mode 120000 vendor/knative.dev/serving/config/300-metric.yaml create mode 120000 vendor/knative.dev/serving/config/300-pa.yaml create mode 120000 vendor/knative.dev/serving/config/300-revision.yaml create mode 120000 vendor/knative.dev/serving/config/300-route.yaml create mode 120000 vendor/knative.dev/serving/config/300-service.yaml create mode 120000 vendor/knative.dev/serving/config/300-sks.yaml create mode 120000 vendor/knative.dev/serving/config/500-webhook-configmap-validation.yaml create mode 120000 vendor/knative.dev/serving/config/500-webhook-defaulting.yaml create mode 120000 vendor/knative.dev/serving/config/500-webhook-resource-validation.yaml create mode 120000 vendor/knative.dev/serving/config/500-webhook-secret.yaml create mode 120000 vendor/knative.dev/serving/config/999-cache.yaml create mode 120000 vendor/knative.dev/serving/config/activator-hpa.yaml create mode 120000 vendor/knative.dev/serving/config/activator.yaml create mode 120000 vendor/knative.dev/serving/config/autoscaler-hpa.yaml create mode 120000 vendor/knative.dev/serving/config/autoscaler.yaml create mode 120000 vendor/knative.dev/serving/config/config-autoscaler.yaml create mode 120000 vendor/knative.dev/serving/config/config-certmanager.yaml create mode 120000 vendor/knative.dev/serving/config/config-defaults.yaml create mode 120000 vendor/knative.dev/serving/config/config-deployment.yaml create mode 120000 vendor/knative.dev/serving/config/config-domain.yaml create mode 120000 vendor/knative.dev/serving/config/config-gc.yaml create mode 120000 vendor/knative.dev/serving/config/config-istio.yaml create mode 120000 vendor/knative.dev/serving/config/config-logging.yaml create mode 120000 vendor/knative.dev/serving/config/config-network.yaml create mode 120000 vendor/knative.dev/serving/config/config-observability.yaml create mode 120000 vendor/knative.dev/serving/config/config-tracing.yaml create mode 120000 vendor/knative.dev/serving/config/controller.yaml create mode 120000 vendor/knative.dev/serving/config/custom-metrics-apiservice.yaml create mode 120000 vendor/knative.dev/serving/config/networking-certmanager.yaml create mode 120000 vendor/knative.dev/serving/config/networking-istio.yaml create mode 120000 vendor/knative.dev/serving/config/networking-ns-cert.yaml create mode 120000 vendor/knative.dev/serving/config/webhook.yaml create mode 100644 vendor/knative.dev/serving/pkg/network/bufferpool.go diff --git a/vendor/knative.dev/pkg/testutils/junithelper/README.md b/vendor/knative.dev/pkg/testutils/junithelper/README.md new file mode 100644 index 0000000000..4f53a84b54 --- /dev/null +++ b/vendor/knative.dev/pkg/testutils/junithelper/README.md @@ -0,0 +1,22 @@ +## junithelper + +junithelper is a tool for creating a simple junit test result, which is used for +creating a single junit result file with a single test + +## Usage + +This tool can be invoked from command line with following parameters: + +- `--suite`: name of suite +- `--name`: name of test +- `--err-msg`: (optional) error message, by default it's empty, means test + passed +- `--dest`: (optional) file path for result to be written to, default + `junit_result.xml` + +### Example + +``` +go run junithelper --suite foo --name TestBar --err-msg "Failed Randomly" --dest +"/tmp/junit_important_suite.xml" +``` diff --git a/vendor/knative.dev/pkg/testutils/junithelper/main.go b/vendor/knative.dev/pkg/testutils/junithelper/main.go new file mode 100644 index 0000000000..64be657d88 --- /dev/null +++ b/vendor/knative.dev/pkg/testutils/junithelper/main.go @@ -0,0 +1,57 @@ +/* +Copyright 2019 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 main + +import ( + "flag" + "io/ioutil" + "log" + + "knative.dev/pkg/test/junit" +) + +var ( + suite string + name string + errMsg string + dest string +) + +func main() { + flag.StringVar(&suite, "suite", "", "Name of suite") + flag.StringVar(&name, "name", "", "Name of test") + flag.StringVar(&errMsg, "err-msg", "", "Error message, empty means test passed, default empty") + flag.StringVar(&dest, "dest", "junit_result.xml", "Where junit xml writes to") + flag.Parse() + + suites := junit.TestSuites{} + suite := junit.TestSuite{Name: suite} + var errP *string + if errMsg != "" { + errP = &errMsg + } + suite.AddTestCase(junit.TestCase{ + Name: name, + Failure: errP, + }) + suites.AddTestSuite(&suite) + contents, err := suites.ToBytes("", "") + if err != nil { + log.Fatal(err) + } + ioutil.WriteFile(dest, contents, 0644) +} diff --git a/vendor/knative.dev/pkg/webhook/admission.go b/vendor/knative.dev/pkg/webhook/admission.go new file mode 100644 index 0000000000..be13d6d1fb --- /dev/null +++ b/vendor/knative.dev/pkg/webhook/admission.go @@ -0,0 +1,94 @@ +/* +Copyright 2020 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 webhook + +import ( + "context" + "encoding/json" + "fmt" + "net/http" + "time" + + "go.uber.org/zap" + admissionv1beta1 "k8s.io/api/admission/v1beta1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + "knative.dev/pkg/logging" + "knative.dev/pkg/logging/logkey" +) + +// AdmissionController provides the interface for different admission controllers +type AdmissionController interface { + // Path returns the path that this particular admission controller serves on. + Path() string + + // Admit is the callback which is invoked when an HTTPS request comes in on Path(). + Admit(context.Context, *admissionv1beta1.AdmissionRequest) *admissionv1beta1.AdmissionResponse +} + +// MakeErrorStatus creates an 'BadRequest' error AdmissionResponse +func MakeErrorStatus(reason string, args ...interface{}) *admissionv1beta1.AdmissionResponse { + result := apierrors.NewBadRequest(fmt.Sprintf(reason, args...)).Status() + return &admissionv1beta1.AdmissionResponse{ + Result: &result, + Allowed: false, + } +} + +func admissionHandler(rootLogger *zap.SugaredLogger, stats StatsReporter, c AdmissionController) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + var ttStart = time.Now() + logger := rootLogger + logger.Infof("Webhook ServeHTTP request=%#v", r) + + var review admissionv1beta1.AdmissionReview + if err := json.NewDecoder(r.Body).Decode(&review); err != nil { + http.Error(w, fmt.Sprintf("could not decode body: %v", err), http.StatusBadRequest) + return + } + + logger = logger.With( + zap.String(logkey.Kind, review.Request.Kind.String()), + zap.String(logkey.Namespace, review.Request.Namespace), + zap.String(logkey.Name, review.Request.Name), + zap.String(logkey.Operation, string(review.Request.Operation)), + zap.String(logkey.Resource, review.Request.Resource.String()), + zap.String(logkey.SubResource, review.Request.SubResource), + zap.String(logkey.UserInfo, fmt.Sprint(review.Request.UserInfo))) + + ctx := logging.WithLogger(r.Context(), logger) + + var response admissionv1beta1.AdmissionReview + reviewResponse := c.Admit(ctx, review.Request) + logger.Infof("AdmissionReview for %#v: %s/%s response=%#v", + review.Request.Kind, review.Request.Namespace, review.Request.Name, reviewResponse) + + if !reviewResponse.Allowed || reviewResponse.PatchType != nil || response.Response == nil { + response.Response = reviewResponse + } + response.Response.UID = review.Request.UID + + if err := json.NewEncoder(w).Encode(response); err != nil { + http.Error(w, fmt.Sprintf("could encode response: %v", err), http.StatusInternalServerError) + return + } + + if stats != nil { + // Only report valid requests + stats.ReportRequest(review.Request, response.Response, time.Since(ttStart)) + } + } +} diff --git a/vendor/knative.dev/serving/config/100-namespace.yaml b/vendor/knative.dev/serving/config/100-namespace.yaml new file mode 120000 index 0000000000..edab691b93 --- /dev/null +++ b/vendor/knative.dev/serving/config/100-namespace.yaml @@ -0,0 +1 @@ +core/100-namespace.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/200-addressable-resolvers-clusterrole.yaml b/vendor/knative.dev/serving/config/200-addressable-resolvers-clusterrole.yaml new file mode 120000 index 0000000000..dcd8f99259 --- /dev/null +++ b/vendor/knative.dev/serving/config/200-addressable-resolvers-clusterrole.yaml @@ -0,0 +1 @@ +core/rbac/200-addressable-resolvers-clusterrole.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/200-clusterrole-certmanager.yaml b/vendor/knative.dev/serving/config/200-clusterrole-certmanager.yaml new file mode 120000 index 0000000000..8eddd094dd --- /dev/null +++ b/vendor/knative.dev/serving/config/200-clusterrole-certmanager.yaml @@ -0,0 +1 @@ +cert-manager/200-clusterrole.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/200-clusterrole-istio.yaml b/vendor/knative.dev/serving/config/200-clusterrole-istio.yaml new file mode 120000 index 0000000000..8b996e07e9 --- /dev/null +++ b/vendor/knative.dev/serving/config/200-clusterrole-istio.yaml @@ -0,0 +1 @@ +istio-ingress/200-clusterrole.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/200-clusterrole-metrics.yaml b/vendor/knative.dev/serving/config/200-clusterrole-metrics.yaml new file mode 120000 index 0000000000..41ac79309d --- /dev/null +++ b/vendor/knative.dev/serving/config/200-clusterrole-metrics.yaml @@ -0,0 +1 @@ +hpa-autoscaling/200-clusterrole-metrics.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/200-clusterrole-namespaced.yaml b/vendor/knative.dev/serving/config/200-clusterrole-namespaced.yaml new file mode 120000 index 0000000000..f555e4e9a6 --- /dev/null +++ b/vendor/knative.dev/serving/config/200-clusterrole-namespaced.yaml @@ -0,0 +1 @@ +core/rbac/200-clusterrole-namespaced.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/200-clusterrole.yaml b/vendor/knative.dev/serving/config/200-clusterrole.yaml new file mode 120000 index 0000000000..b8ceb9d219 --- /dev/null +++ b/vendor/knative.dev/serving/config/200-clusterrole.yaml @@ -0,0 +1 @@ +core/rbac/200-clusterrole.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/200-podspecable-bindings-clusterrole.yaml b/vendor/knative.dev/serving/config/200-podspecable-bindings-clusterrole.yaml new file mode 120000 index 0000000000..51cbb49ec9 --- /dev/null +++ b/vendor/knative.dev/serving/config/200-podspecable-bindings-clusterrole.yaml @@ -0,0 +1 @@ +core/rbac/200-podspecable-bindings-clusterrole.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/200-serviceaccount.yaml b/vendor/knative.dev/serving/config/200-serviceaccount.yaml new file mode 120000 index 0000000000..151307ac84 --- /dev/null +++ b/vendor/knative.dev/serving/config/200-serviceaccount.yaml @@ -0,0 +1 @@ +core/rbac/200-serviceaccount.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/201-clusterrolebinding-metrics-server.yaml b/vendor/knative.dev/serving/config/201-clusterrolebinding-metrics-server.yaml new file mode 120000 index 0000000000..cfcb33b68b --- /dev/null +++ b/vendor/knative.dev/serving/config/201-clusterrolebinding-metrics-server.yaml @@ -0,0 +1 @@ +hpa-autoscaling/201-clusterrolebinding-metrics-server.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/201-clusterrolebinding-metrics.yaml b/vendor/knative.dev/serving/config/201-clusterrolebinding-metrics.yaml new file mode 120000 index 0000000000..2d10d8a06d --- /dev/null +++ b/vendor/knative.dev/serving/config/201-clusterrolebinding-metrics.yaml @@ -0,0 +1 @@ +hpa-autoscaling/201-clusterrolebinding-metrics.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/201-clusterrolebinding.yaml b/vendor/knative.dev/serving/config/201-clusterrolebinding.yaml new file mode 120000 index 0000000000..badb803bb3 --- /dev/null +++ b/vendor/knative.dev/serving/config/201-clusterrolebinding.yaml @@ -0,0 +1 @@ +core/rbac/201-clusterrolebinding.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/201-rolebinding-metrics-server.yaml b/vendor/knative.dev/serving/config/201-rolebinding-metrics-server.yaml new file mode 120000 index 0000000000..50208a006f --- /dev/null +++ b/vendor/knative.dev/serving/config/201-rolebinding-metrics-server.yaml @@ -0,0 +1 @@ +hpa-autoscaling/201-rolebinding-metrics-server.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/202-gateway.yaml b/vendor/knative.dev/serving/config/202-gateway.yaml new file mode 120000 index 0000000000..4e530b44ee --- /dev/null +++ b/vendor/knative.dev/serving/config/202-gateway.yaml @@ -0,0 +1 @@ +istio-ingress/202-gateway.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/203-local-gateway.yaml b/vendor/knative.dev/serving/config/203-local-gateway.yaml new file mode 120000 index 0000000000..8296e3ecb1 --- /dev/null +++ b/vendor/knative.dev/serving/config/203-local-gateway.yaml @@ -0,0 +1 @@ +istio-ingress/203-local-gateway.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/300-certificate.yaml b/vendor/knative.dev/serving/config/300-certificate.yaml new file mode 120000 index 0000000000..ac41200ebf --- /dev/null +++ b/vendor/knative.dev/serving/config/300-certificate.yaml @@ -0,0 +1 @@ +core/resources/certificate.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/300-configuration.yaml b/vendor/knative.dev/serving/config/300-configuration.yaml new file mode 120000 index 0000000000..f8c1477766 --- /dev/null +++ b/vendor/knative.dev/serving/config/300-configuration.yaml @@ -0,0 +1 @@ +core/resources/configuration.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/300-ingress.yaml b/vendor/knative.dev/serving/config/300-ingress.yaml new file mode 120000 index 0000000000..dcabdf0cb3 --- /dev/null +++ b/vendor/knative.dev/serving/config/300-ingress.yaml @@ -0,0 +1 @@ +core/resources/ingress.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/300-metric.yaml b/vendor/knative.dev/serving/config/300-metric.yaml new file mode 120000 index 0000000000..f4ac600fca --- /dev/null +++ b/vendor/knative.dev/serving/config/300-metric.yaml @@ -0,0 +1 @@ +core/resources/metric.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/300-pa.yaml b/vendor/knative.dev/serving/config/300-pa.yaml new file mode 120000 index 0000000000..3d214c7f81 --- /dev/null +++ b/vendor/knative.dev/serving/config/300-pa.yaml @@ -0,0 +1 @@ +core/resources/podautoscaler.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/300-revision.yaml b/vendor/knative.dev/serving/config/300-revision.yaml new file mode 120000 index 0000000000..8256c9b228 --- /dev/null +++ b/vendor/knative.dev/serving/config/300-revision.yaml @@ -0,0 +1 @@ +core/resources/revision.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/300-route.yaml b/vendor/knative.dev/serving/config/300-route.yaml new file mode 120000 index 0000000000..f6e9d50a01 --- /dev/null +++ b/vendor/knative.dev/serving/config/300-route.yaml @@ -0,0 +1 @@ +core/resources/route.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/300-service.yaml b/vendor/knative.dev/serving/config/300-service.yaml new file mode 120000 index 0000000000..2148b81899 --- /dev/null +++ b/vendor/knative.dev/serving/config/300-service.yaml @@ -0,0 +1 @@ +core/resources/service.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/300-sks.yaml b/vendor/knative.dev/serving/config/300-sks.yaml new file mode 120000 index 0000000000..6fcdada686 --- /dev/null +++ b/vendor/knative.dev/serving/config/300-sks.yaml @@ -0,0 +1 @@ +core/resources/serverlessservice.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/500-webhook-configmap-validation.yaml b/vendor/knative.dev/serving/config/500-webhook-configmap-validation.yaml new file mode 120000 index 0000000000..948218552b --- /dev/null +++ b/vendor/knative.dev/serving/config/500-webhook-configmap-validation.yaml @@ -0,0 +1 @@ +./core/webhooks/configmap-validation.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/500-webhook-defaulting.yaml b/vendor/knative.dev/serving/config/500-webhook-defaulting.yaml new file mode 120000 index 0000000000..604b1f814b --- /dev/null +++ b/vendor/knative.dev/serving/config/500-webhook-defaulting.yaml @@ -0,0 +1 @@ +./core/webhooks/defaulting.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/500-webhook-resource-validation.yaml b/vendor/knative.dev/serving/config/500-webhook-resource-validation.yaml new file mode 120000 index 0000000000..68f024380e --- /dev/null +++ b/vendor/knative.dev/serving/config/500-webhook-resource-validation.yaml @@ -0,0 +1 @@ +./core/webhooks/resource-validation.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/500-webhook-secret.yaml b/vendor/knative.dev/serving/config/500-webhook-secret.yaml new file mode 120000 index 0000000000..c8b148a1f3 --- /dev/null +++ b/vendor/knative.dev/serving/config/500-webhook-secret.yaml @@ -0,0 +1 @@ +./core/webhooks/secret.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/999-cache.yaml b/vendor/knative.dev/serving/config/999-cache.yaml new file mode 120000 index 0000000000..c004bf36f1 --- /dev/null +++ b/vendor/knative.dev/serving/config/999-cache.yaml @@ -0,0 +1 @@ +core/999-cache.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/activator-hpa.yaml b/vendor/knative.dev/serving/config/activator-hpa.yaml new file mode 120000 index 0000000000..15a3555cad --- /dev/null +++ b/vendor/knative.dev/serving/config/activator-hpa.yaml @@ -0,0 +1 @@ +core/deployments/activator-hpa.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/activator.yaml b/vendor/knative.dev/serving/config/activator.yaml new file mode 120000 index 0000000000..aa5465250c --- /dev/null +++ b/vendor/knative.dev/serving/config/activator.yaml @@ -0,0 +1 @@ +core/deployments/activator.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/autoscaler-hpa.yaml b/vendor/knative.dev/serving/config/autoscaler-hpa.yaml new file mode 120000 index 0000000000..9c7c8d6859 --- /dev/null +++ b/vendor/knative.dev/serving/config/autoscaler-hpa.yaml @@ -0,0 +1 @@ +hpa-autoscaling/controller.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/autoscaler.yaml b/vendor/knative.dev/serving/config/autoscaler.yaml new file mode 120000 index 0000000000..3f67084652 --- /dev/null +++ b/vendor/knative.dev/serving/config/autoscaler.yaml @@ -0,0 +1 @@ +core/deployments/autoscaler.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/config-autoscaler.yaml b/vendor/knative.dev/serving/config/config-autoscaler.yaml new file mode 120000 index 0000000000..a3ad66dd0e --- /dev/null +++ b/vendor/knative.dev/serving/config/config-autoscaler.yaml @@ -0,0 +1 @@ +core/configmaps/autoscaler.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/config-certmanager.yaml b/vendor/knative.dev/serving/config/config-certmanager.yaml new file mode 120000 index 0000000000..42575fa7c3 --- /dev/null +++ b/vendor/knative.dev/serving/config/config-certmanager.yaml @@ -0,0 +1 @@ +cert-manager/config.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/config-defaults.yaml b/vendor/knative.dev/serving/config/config-defaults.yaml new file mode 120000 index 0000000000..cdce59640f --- /dev/null +++ b/vendor/knative.dev/serving/config/config-defaults.yaml @@ -0,0 +1 @@ +core/configmaps/defaults.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/config-deployment.yaml b/vendor/knative.dev/serving/config/config-deployment.yaml new file mode 120000 index 0000000000..ac8682ddec --- /dev/null +++ b/vendor/knative.dev/serving/config/config-deployment.yaml @@ -0,0 +1 @@ +core/configmaps/deployment.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/config-domain.yaml b/vendor/knative.dev/serving/config/config-domain.yaml new file mode 120000 index 0000000000..1702a3b138 --- /dev/null +++ b/vendor/knative.dev/serving/config/config-domain.yaml @@ -0,0 +1 @@ +core/configmaps/domain.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/config-gc.yaml b/vendor/knative.dev/serving/config/config-gc.yaml new file mode 120000 index 0000000000..bb86ac4f73 --- /dev/null +++ b/vendor/knative.dev/serving/config/config-gc.yaml @@ -0,0 +1 @@ +core/configmaps/gc.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/config-istio.yaml b/vendor/knative.dev/serving/config/config-istio.yaml new file mode 120000 index 0000000000..0598b6e30f --- /dev/null +++ b/vendor/knative.dev/serving/config/config-istio.yaml @@ -0,0 +1 @@ +istio-ingress/config.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/config-logging.yaml b/vendor/knative.dev/serving/config/config-logging.yaml new file mode 120000 index 0000000000..fdd487354e --- /dev/null +++ b/vendor/knative.dev/serving/config/config-logging.yaml @@ -0,0 +1 @@ +core/configmaps/logging.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/config-network.yaml b/vendor/knative.dev/serving/config/config-network.yaml new file mode 120000 index 0000000000..e4e48d42d4 --- /dev/null +++ b/vendor/knative.dev/serving/config/config-network.yaml @@ -0,0 +1 @@ +core/configmaps/network.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/config-observability.yaml b/vendor/knative.dev/serving/config/config-observability.yaml new file mode 120000 index 0000000000..972be50a8c --- /dev/null +++ b/vendor/knative.dev/serving/config/config-observability.yaml @@ -0,0 +1 @@ +core/configmaps/observability.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/config-tracing.yaml b/vendor/knative.dev/serving/config/config-tracing.yaml new file mode 120000 index 0000000000..8a578ada95 --- /dev/null +++ b/vendor/knative.dev/serving/config/config-tracing.yaml @@ -0,0 +1 @@ +core/configmaps/tracing.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/controller.yaml b/vendor/knative.dev/serving/config/controller.yaml new file mode 120000 index 0000000000..a3175117ed --- /dev/null +++ b/vendor/knative.dev/serving/config/controller.yaml @@ -0,0 +1 @@ +core/deployments/controller.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/custom-metrics-apiservice.yaml b/vendor/knative.dev/serving/config/custom-metrics-apiservice.yaml new file mode 120000 index 0000000000..3fe4a2a46c --- /dev/null +++ b/vendor/knative.dev/serving/config/custom-metrics-apiservice.yaml @@ -0,0 +1 @@ +hpa-autoscaling/custom-metrics-apiservice.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/networking-certmanager.yaml b/vendor/knative.dev/serving/config/networking-certmanager.yaml new file mode 120000 index 0000000000..a4f43e8b42 --- /dev/null +++ b/vendor/knative.dev/serving/config/networking-certmanager.yaml @@ -0,0 +1 @@ +cert-manager/controller.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/networking-istio.yaml b/vendor/knative.dev/serving/config/networking-istio.yaml new file mode 120000 index 0000000000..2bf1688b9c --- /dev/null +++ b/vendor/knative.dev/serving/config/networking-istio.yaml @@ -0,0 +1 @@ +istio-ingress/controller.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/networking-ns-cert.yaml b/vendor/knative.dev/serving/config/networking-ns-cert.yaml new file mode 120000 index 0000000000..37ae032bc5 --- /dev/null +++ b/vendor/knative.dev/serving/config/networking-ns-cert.yaml @@ -0,0 +1 @@ +namespace-wildcard-certs/controller.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/config/webhook.yaml b/vendor/knative.dev/serving/config/webhook.yaml new file mode 120000 index 0000000000..4aedde6aca --- /dev/null +++ b/vendor/knative.dev/serving/config/webhook.yaml @@ -0,0 +1 @@ +core/deployments/webhook.yaml \ No newline at end of file diff --git a/vendor/knative.dev/serving/pkg/network/bufferpool.go b/vendor/knative.dev/serving/pkg/network/bufferpool.go new file mode 100644 index 0000000000..d571fb1181 --- /dev/null +++ b/vendor/knative.dev/serving/pkg/network/bufferpool.go @@ -0,0 +1,55 @@ +/* +Copyright 2020 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 + + https://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 network + +import ( + "net/http/httputil" + "sync" +) + +// bufferPool implements the BufferPool interface to be used in +// httputil.ReverseProxy. It stores pointers to to slices to +// further avoid allocations, see https://staticcheck.io/docs/checks#SA6002. +type bufferPool struct { + pool *sync.Pool +} + +// NewBufferPool creates a new BytePool. This is only safe to use in the context +// of a httputil.ReverseProxy, as the buffers returned via Put are not cleaned +// explicitly. +func NewBufferPool() httputil.BufferPool { + return &bufferPool{ + pool: &sync.Pool{}, + } +} + +// Get gets a []byte from the bufferPool, or creates a new one if none are +// available in the pool. +func (b *bufferPool) Get() []byte { + buf := b.pool.Get() + if buf == nil { + // Use the default buffer size as defined in the ReverseProxy itself. + return make([]byte, 32*1024) + } + + return *buf.(*[]byte) +} + +// Put returns the given Buffer to the bufferPool. +func (b *bufferPool) Put(buffer []byte) { + b.pool.Put(&buffer) +} From d02e6855c5dd150abb7b9e9a9940baea5d217890 Mon Sep 17 00:00:00 2001 From: nachocano Date: Thu, 23 Jan 2020 14:56:37 -0800 Subject: [PATCH 8/9] using revision instead of master --- Gopkg.lock | 1 - Gopkg.toml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index b605c447ed..5676225b07 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -136,7 +136,6 @@ version = "v0.2.1" [[projects]] - branch = "master" digest = "1:9beee36e5f85a34a8d8e5b6e58fec01d81c6f74247cb9baed6c5e8f198e9da5e" name = "github.com/cloudevents/sdk-go" packages = [ diff --git a/Gopkg.toml b/Gopkg.toml index 333aa68192..02f07f7e1c 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -69,7 +69,7 @@ required = [ # once we get one. [[override]] name = "github.com/cloudevents/sdk-go" - branch = "master" + revision = "2c354395746cfea050b7426aaef63993161a8b50" [prune] go-tests = true From a3830db8dc6ef7b14ae5c56468cb8b699bd67382 Mon Sep 17 00:00:00 2001 From: nachocano Date: Wed, 26 Feb 2020 13:20:26 -0800 Subject: [PATCH 9/9] removing pubsubsecret. Other validation cleanup. --- config/300-cloudauditlogssource.yaml | 5 +- config/300-cloudpubsubsource.yaml | 2 +- config/300-cloudschedulersource.yaml | 5 +- config/300-cloudstoragesource.yaml | 5 +- config/300-pullsubscription.yaml | 2 +- pkg/apis/duck/v1alpha1/pubsub_types.go | 10 +- .../duck/v1alpha1/zz_generated.deepcopy.go | 5 - .../cloudauditlogssource_validation.go | 21 +++ .../cloudauditlogssource_validation_test.go | 10 ++ .../v1alpha1/cloudpubsubsource_validation.go | 10 ++ .../cloudpubsubsource_validation_test.go | 150 ++++++++-------- .../cloudschedulersource_validation.go | 11 +- .../cloudschedulersource_validation_test.go | 160 +++--------------- .../v1alpha1/cloudstoragesource_validation.go | 11 +- .../cloudstoragesource_validation_test.go | 108 +----------- .../v1alpha1/pullsubscription_validation.go | 22 +++ .../pullsubscription_validation_test.go | 12 ++ .../events/auditlogs/auditlogs_test.go | 14 ++ .../pubsub/resources/pullsubscription.go | 9 +- pkg/reconciler/pubsub/resources/topic.go | 10 +- pkg/reconciler/pubsub/resources/topic_test.go | 83 --------- 21 files changed, 208 insertions(+), 457 deletions(-) diff --git a/config/300-cloudauditlogssource.yaml b/config/300-cloudauditlogssource.yaml index 8bc3e6fd43..4e52da1142 100644 --- a/config/300-cloudauditlogssource.yaml +++ b/config/300-cloudauditlogssource.yaml @@ -56,10 +56,7 @@ spec: properties: secret: type: object - description: "Credential used to pull Stackdriver audit log pubsub messages. Must be a service account key in JSON format (see https://cloud.google.com/iam/docs/creating-managing-service-account-keys). If omitted, defaults to 'google-cloud-key'" - pubSubSecret: - type: object - description: "Optional credential to use for creating a Topic and subscribing to the Topic. If omitted, uses secret. Must be a service account key in JSON format (see https://cloud.google.com/iam/docs/creating-managing-service-account-keys)." + description: "Credential used to poll the Cloud Pub/Sub Subscription. It is not used to create or delete the Subscription, only to poll it. The value of the secret entry must be a service account key in the JSON format (see https://cloud.google.com/iam/docs/creating-managing-service-account-keys). Defaults to secret.name of 'google-cloud-key' and secret.key of 'key.json'." serviceAccountName: type: string description: "Service Account to run Receive Adapter as. If omitted, uses 'default'." diff --git a/config/300-cloudpubsubsource.yaml b/config/300-cloudpubsubsource.yaml index d8b341f9b4..9331a66ed2 100644 --- a/config/300-cloudpubsubsource.yaml +++ b/config/300-cloudpubsubsource.yaml @@ -59,7 +59,7 @@ spec: properties: secret: type: object - description: "Credential to use to poll the Cloud Pub/Sub Subscription. It is not used to create or delete the Subscription, only to poll it. The value of the secret entry must be a service account key in the JSON format (see https://cloud.google.com/iam/docs/creating-managing-service-account-keys). Defaults to secret.name of 'google-cloud-key' and secret.key of 'key.json'." + description: "Credential used to poll the Cloud Pub/Sub Subscription. It is not used to create or delete the Subscription, only to poll it. The value of the secret entry must be a service account key in the JSON format (see https://cloud.google.com/iam/docs/creating-managing-service-account-keys). Defaults to secret.name of 'google-cloud-key' and secret.key of 'key.json'." project: type: string description: "ID of the Google Cloud Project that the Pub/Sub Topic exists in. E.g. 'my-project-1234' rather than its display name, 'My Project' or its number '1234567890'. If omitted uses the Project ID from the GKE cluster metadata service." diff --git a/config/300-cloudschedulersource.yaml b/config/300-cloudschedulersource.yaml index 7335b27338..3c1f84c887 100644 --- a/config/300-cloudschedulersource.yaml +++ b/config/300-cloudschedulersource.yaml @@ -56,10 +56,7 @@ spec: properties: secret: type: object - description: "Credential to use for managing Scheduler Jobs. Must be a service account key in JSON format (see https://cloud.google.com/iam/docs/creating-managing-service-account-keys). If omitted, defaults to 'google-cloud-key'." - pubSubSecret: - type: object - description: "Optional credential to use for creating a Topic and subscribing to the Topic. If omitted, uses secret. Must be a service account key in JSON format (see https://cloud.google.com/iam/docs/creating-managing-service-account-keys)." + description: "Credential used to poll the Cloud Pub/Sub Subscription. It is not used to create or delete the Subscription, only to poll it. The value of the secret entry must be a service account key in the JSON format (see https://cloud.google.com/iam/docs/creating-managing-service-account-keys). Defaults to secret.name of 'google-cloud-key' and secret.key of 'key.json'." project: type: string description: "Google Cloud Project ID of the project into which the Scheduler job should be created. If omitted uses the Project ID from the GKE cluster metadata service." diff --git a/config/300-cloudstoragesource.yaml b/config/300-cloudstoragesource.yaml index 20a0d6f96c..91bb767d06 100644 --- a/config/300-cloudstoragesource.yaml +++ b/config/300-cloudstoragesource.yaml @@ -59,10 +59,7 @@ spec: properties: secret: type: object - description: "Credential to use for managing GCS notifications. Must be a service account key in JSON format (see https://cloud.google.com/iam/docs/creating-managing-service-account-keys). If omitted, defaults to 'google-cloud-key'." - pubSubSecret: - type: object - description: "Optional credential to use for creating a Topic and subscribing to the Topic. If omitted, uses secret. Must be a service account key in JSON format (see https://cloud.google.com/iam/docs/creating-managing-service-account-keys)." + description: "Credential used to poll the Cloud Pub/Sub Subscription. It is not used to create or delete the Subscription, only to poll it. The value of the secret entry must be a service account key in the JSON format (see https://cloud.google.com/iam/docs/creating-managing-service-account-keys). Defaults to secret.name of 'google-cloud-key' and secret.key of 'key.json'." serviceAccountName: type: string description: "Service Account to run Receive Adapter as. If omitted, uses 'default'." diff --git a/config/300-pullsubscription.yaml b/config/300-pullsubscription.yaml index 5a95cad17e..7767d7537b 100644 --- a/config/300-pullsubscription.yaml +++ b/config/300-pullsubscription.yaml @@ -53,7 +53,7 @@ spec: properties: secret: type: object - description: "Credential to use to poll the Cloud Pub/Sub Subscription. It is not used to create or delete the Subscription, only to poll it. The value of the secret entry must be a service account key in the JSON format (see https://cloud.google.com/iam/docs/creating-managing-service-account-keys). Defaults to secret.name of 'google-cloud-key' and secret.key of 'key.json'." + description: "Credential used to poll the Cloud Pub/Sub Subscription. It is not used to create or delete the Subscription, only to poll it. The value of the secret entry must be a service account key in the JSON format (see https://cloud.google.com/iam/docs/creating-managing-service-account-keys). Defaults to secret.name of 'google-cloud-key' and secret.key of 'key.json'." project: type: string description: "ID of the Google Cloud Project that the Pub/Sub Topic exists in. E.g. 'my-project-1234' rather than its display name, 'My Project' or its number '1234567890'. If omitted uses the Project ID from the GKE cluster metadata service." diff --git a/pkg/apis/duck/v1alpha1/pubsub_types.go b/pkg/apis/duck/v1alpha1/pubsub_types.go index 1853f0eb2a..4f8e21b981 100644 --- a/pkg/apis/duck/v1alpha1/pubsub_types.go +++ b/pkg/apis/duck/v1alpha1/pubsub_types.go @@ -50,17 +50,13 @@ type PubSubSpec struct { // This brings in CloudEventOverrides and Sink. duckv1.SourceSpec `json:",inline"` - // Secret is the credential to use to create the "entity" in GCP. + // Secret is the credential to use to poll from a Cloud Pub/Sub subscription. // If not specified, defaults to: // Name: google-cloud-key // Key: key.json // +optional Secret *corev1.SecretKeySelector `json:"secret,omitempty"` - // PubSubSecret is the credential to use to create - // Topic / PullSubscription resources. If omitted, uses Secret - PubSubSecret *corev1.SecretKeySelector `json:"pubsubSecret,omitempty"` - // Project is the ID of the Google Cloud Project that the PubSub Topic exists in. // If omitted, defaults to same as the cluster. // +optional @@ -134,10 +130,6 @@ func (s *PubSub) Populate() { LocalObjectReference: corev1.LocalObjectReference{Name: "secret"}, Key: "secretkey", } - s.Spec.PubSubSecret = &corev1.SecretKeySelector{ - LocalObjectReference: corev1.LocalObjectReference{Name: "pubsubsecret"}, - Key: "pubsubkey", - } s.Status.ObservedGeneration = 42 s.Status.Conditions = duckv1.Conditions{{ // Populate ALL fields diff --git a/pkg/apis/duck/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/duck/v1alpha1/zz_generated.deepcopy.go index fb654c1d53..b750223fc7 100644 --- a/pkg/apis/duck/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/duck/v1alpha1/zz_generated.deepcopy.go @@ -95,11 +95,6 @@ func (in *PubSubSpec) DeepCopyInto(out *PubSubSpec) { *out = new(v1.SecretKeySelector) (*in).DeepCopyInto(*out) } - if in.PubSubSecret != nil { - in, out := &in.PubSubSecret, &out.PubSubSecret - *out = new(v1.SecretKeySelector) - (*in).DeepCopyInto(*out) - } return } diff --git a/pkg/apis/events/v1alpha1/cloudauditlogssource_validation.go b/pkg/apis/events/v1alpha1/cloudauditlogssource_validation.go index 825e6fecd6..510b11b8af 100644 --- a/pkg/apis/events/v1alpha1/cloudauditlogssource_validation.go +++ b/pkg/apis/events/v1alpha1/cloudauditlogssource_validation.go @@ -18,9 +18,13 @@ package v1alpha1 import ( "context" + "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/equality" "knative.dev/pkg/apis" + duckv1 "knative.dev/pkg/apis/duck/v1" ) func (current *CloudAuditLogsSource) Validate(ctx context.Context) *apis.FieldError { @@ -29,6 +33,14 @@ func (current *CloudAuditLogsSource) Validate(ctx context.Context) *apis.FieldEr func (current *CloudAuditLogsSourceSpec) Validate(ctx context.Context) *apis.FieldError { var errs *apis.FieldError + + // Sink [required] + if equality.Semantic.DeepEqual(current.Sink, duckv1.Destination{}) { + errs = errs.Also(apis.ErrMissingField("sink")) + } else if err := current.Sink.Validate(ctx); err != nil { + errs = errs.Also(err.ViaField("sink")) + } + // ServiceName [required] if current.ServiceName == "" { errs = errs.Also(apis.ErrMissingField("serviceName")) @@ -38,6 +50,15 @@ func (current *CloudAuditLogsSourceSpec) Validate(ctx context.Context) *apis.Fie errs = errs.Also(apis.ErrMissingField("methodName")) } + if current.Secret != nil { + if !equality.Semantic.DeepEqual(current.Secret, &corev1.SecretKeySelector{}) { + err := validateSecret(current.Secret) + if err != nil { + errs = errs.Also(err.ViaField("secret")) + } + } + } + return errs } diff --git a/pkg/apis/events/v1alpha1/cloudauditlogssource_validation_test.go b/pkg/apis/events/v1alpha1/cloudauditlogssource_validation_test.go index f161d3212e..b8a19e6485 100644 --- a/pkg/apis/events/v1alpha1/cloudauditlogssource_validation_test.go +++ b/pkg/apis/events/v1alpha1/cloudauditlogssource_validation_test.go @@ -77,6 +77,16 @@ func TestCloudAuditLogsSourceValidationFields(t *testing.T) { }(), error: true, }, + "invalid scheduler secret, missing key": { + spec: func() CloudAuditLogsSourceSpec { + obj := auditLogsSourceSpec.DeepCopy() + obj.Secret = &corev1.SecretKeySelector{ + LocalObjectReference: corev1.LocalObjectReference{Name: "test-secret"}, + } + return *obj + }(), + error: true, + }, } for n, tc := range testCases { t.Run(n, func(t *testing.T) { diff --git a/pkg/apis/events/v1alpha1/cloudpubsubsource_validation.go b/pkg/apis/events/v1alpha1/cloudpubsubsource_validation.go index b209ff44d8..a21654dee0 100644 --- a/pkg/apis/events/v1alpha1/cloudpubsubsource_validation.go +++ b/pkg/apis/events/v1alpha1/cloudpubsubsource_validation.go @@ -21,6 +21,7 @@ import ( "time" duckv1alpha1 "github.com/google/knative-gcp/pkg/apis/duck/v1alpha1" + corev1 "k8s.io/api/core/v1" duckv1 "knative.dev/pkg/apis/duck/v1" "github.com/google/go-cmp/cmp/cmpopts" @@ -76,6 +77,15 @@ func (current *CloudPubSubSourceSpec) Validate(ctx context.Context) *apis.FieldE } } + if current.Secret != nil { + if !equality.Semantic.DeepEqual(current.Secret, &corev1.SecretKeySelector{}) { + err := validateSecret(current.Secret) + if err != nil { + errs = errs.Also(err.ViaField("secret")) + } + } + } + return errs } diff --git a/pkg/apis/events/v1alpha1/cloudpubsubsource_validation_test.go b/pkg/apis/events/v1alpha1/cloudpubsubsource_validation_test.go index 0ec65aea89..2afda096f2 100644 --- a/pkg/apis/events/v1alpha1/cloudpubsubsource_validation_test.go +++ b/pkg/apis/events/v1alpha1/cloudpubsubsource_validation_test.go @@ -28,7 +28,7 @@ import ( ) var ( - pullSubscriptionSpec = CloudPubSubSourceSpec{ + pubSubSourceSpec = CloudPubSubSourceSpec{ PubSubSpec: duckv1alpha1.PubSubSpec{ Secret: &corev1.SecretKeySelector{ LocalObjectReference: corev1.LocalObjectReference{ @@ -58,12 +58,12 @@ func TestCloudPubSubSourceCheckValidationFields(t *testing.T) { error bool }{ "ok": { - spec: pullSubscriptionSpec, + spec: pubSubSourceSpec, error: false, }, "bad RetentionDuration": { spec: func() CloudPubSubSourceSpec { - obj := pullSubscriptionSpec.DeepCopy() + obj := pubSubSourceSpec.DeepCopy() obj.RetentionDuration = ptr.String("wrong") return *obj }(), @@ -71,7 +71,7 @@ func TestCloudPubSubSourceCheckValidationFields(t *testing.T) { }, "bad RetentionDuration, range": { spec: func() CloudPubSubSourceSpec { - obj := pullSubscriptionSpec.DeepCopy() + obj := pubSubSourceSpec.DeepCopy() obj.RetentionDuration = ptr.String("10000h") return *obj }(), @@ -79,7 +79,7 @@ func TestCloudPubSubSourceCheckValidationFields(t *testing.T) { }, "bad AckDeadline": { spec: func() CloudPubSubSourceSpec { - obj := pullSubscriptionSpec.DeepCopy() + obj := pubSubSourceSpec.DeepCopy() obj.AckDeadline = ptr.String("wrong") return *obj }(), @@ -87,7 +87,7 @@ func TestCloudPubSubSourceCheckValidationFields(t *testing.T) { }, "bad AckDeadline, range": { spec: func() CloudPubSubSourceSpec { - obj := pullSubscriptionSpec.DeepCopy() + obj := pubSubSourceSpec.DeepCopy() obj.AckDeadline = ptr.String("10000h") return *obj }(), @@ -95,7 +95,7 @@ func TestCloudPubSubSourceCheckValidationFields(t *testing.T) { }, "bad sink, name": { spec: func() CloudPubSubSourceSpec { - obj := pullSubscriptionSpec.DeepCopy() + obj := pubSubSourceSpec.DeepCopy() obj.Sink.Ref.Name = "" return *obj }(), @@ -103,7 +103,7 @@ func TestCloudPubSubSourceCheckValidationFields(t *testing.T) { }, "bad sink, apiVersion": { spec: func() CloudPubSubSourceSpec { - obj := pullSubscriptionSpec.DeepCopy() + obj := pubSubSourceSpec.DeepCopy() obj.Sink.Ref.APIVersion = "" return *obj }(), @@ -111,7 +111,7 @@ func TestCloudPubSubSourceCheckValidationFields(t *testing.T) { }, "bad sink, kind": { spec: func() CloudPubSubSourceSpec { - obj := pullSubscriptionSpec.DeepCopy() + obj := pubSubSourceSpec.DeepCopy() obj.Sink.Ref.Kind = "" return *obj }(), @@ -119,7 +119,7 @@ func TestCloudPubSubSourceCheckValidationFields(t *testing.T) { }, "bad sink, empty": { spec: func() CloudPubSubSourceSpec { - obj := pullSubscriptionSpec.DeepCopy() + obj := pubSubSourceSpec.DeepCopy() obj.Sink = duckv1.Destination{} return *obj }(), @@ -127,7 +127,7 @@ func TestCloudPubSubSourceCheckValidationFields(t *testing.T) { }, "bad sink, uri scheme": { spec: func() CloudPubSubSourceSpec { - obj := pullSubscriptionSpec.DeepCopy() + obj := pubSubSourceSpec.DeepCopy() obj.Sink = duckv1.Destination{ URI: &apis.URL{ Host: "example.com", @@ -139,7 +139,7 @@ func TestCloudPubSubSourceCheckValidationFields(t *testing.T) { }, "bad sink, uri host": { spec: func() CloudPubSubSourceSpec { - obj := pullSubscriptionSpec.DeepCopy() + obj := pubSubSourceSpec.DeepCopy() obj.Sink = duckv1.Destination{ URI: &apis.URL{ Scheme: "http", @@ -151,7 +151,7 @@ func TestCloudPubSubSourceCheckValidationFields(t *testing.T) { }, "bad sink, uri and ref": { spec: func() CloudPubSubSourceSpec { - obj := pullSubscriptionSpec.DeepCopy() + obj := pubSubSourceSpec.DeepCopy() obj.Sink = duckv1.Destination{ URI: &apis.URL{ Scheme: "http", @@ -165,6 +165,18 @@ func TestCloudPubSubSourceCheckValidationFields(t *testing.T) { }(), error: true, }, + "invalid secret, missing key": { + spec: func() CloudPubSubSourceSpec { + obj := pubSubSourceSpec.DeepCopy() + obj.Secret = &corev1.SecretKeySelector{ + LocalObjectReference: corev1.LocalObjectReference{ + Name: "name", + }, + } + return *obj + }(), + error: true, + }, } for n, tc := range testCases { t.Run(n, func(t *testing.T) { @@ -183,79 +195,79 @@ func TestCloudPubSubSourceCheckImmutableFields(t *testing.T) { allowed bool }{ "nil orig": { - updated: pullSubscriptionSpec, + updated: pubSubSourceSpec, allowed: true, }, "Secret.Name changed": { - orig: &pullSubscriptionSpec, + orig: &pubSubSourceSpec, updated: CloudPubSubSourceSpec{ PubSubSpec: duckv1alpha1.PubSubSpec{ Secret: &corev1.SecretKeySelector{ LocalObjectReference: corev1.LocalObjectReference{ Name: "some-other-name", }, - Key: pullSubscriptionSpec.Secret.Key, + Key: pubSubSourceSpec.Secret.Key, }, - Project: pullSubscriptionSpec.Project, + Project: pubSubSourceSpec.Project, SourceSpec: duckv1.SourceSpec{ - Sink: pullSubscriptionSpec.Sink, + Sink: pubSubSourceSpec.Sink, }, }, - Topic: pullSubscriptionSpec.Topic, + Topic: pubSubSourceSpec.Topic, }, allowed: false, }, "Secret.Key changed": { - orig: &pullSubscriptionSpec, + orig: &pubSubSourceSpec, updated: CloudPubSubSourceSpec{ PubSubSpec: duckv1alpha1.PubSubSpec{ Secret: &corev1.SecretKeySelector{ LocalObjectReference: corev1.LocalObjectReference{ - Name: pullSubscriptionSpec.Secret.Name, + Name: pubSubSourceSpec.Secret.Name, }, Key: "some-other-key", }, - Project: pullSubscriptionSpec.Project, + Project: pubSubSourceSpec.Project, SourceSpec: duckv1.SourceSpec{ - Sink: pullSubscriptionSpec.Sink, + Sink: pubSubSourceSpec.Sink, }, }, - Topic: pullSubscriptionSpec.Topic, + Topic: pubSubSourceSpec.Topic, }, allowed: false, }, "Project changed": { - orig: &pullSubscriptionSpec, + orig: &pubSubSourceSpec, updated: CloudPubSubSourceSpec{ PubSubSpec: duckv1alpha1.PubSubSpec{ Secret: &corev1.SecretKeySelector{ LocalObjectReference: corev1.LocalObjectReference{ - Name: pullSubscriptionSpec.Secret.Name, + Name: pubSubSourceSpec.Secret.Name, }, - Key: pullSubscriptionSpec.Secret.Key, + Key: pubSubSourceSpec.Secret.Key, }, Project: "some-other-project", SourceSpec: duckv1.SourceSpec{ - Sink: pullSubscriptionSpec.Sink, + Sink: pubSubSourceSpec.Sink, }, }, - Topic: pullSubscriptionSpec.Topic, + Topic: pubSubSourceSpec.Topic, }, allowed: false, }, "Topic changed": { - orig: &pullSubscriptionSpec, + orig: &pubSubSourceSpec, updated: CloudPubSubSourceSpec{ PubSubSpec: duckv1alpha1.PubSubSpec{ Secret: &corev1.SecretKeySelector{ LocalObjectReference: corev1.LocalObjectReference{ - Name: pullSubscriptionSpec.Secret.Name, + Name: pubSubSourceSpec.Secret.Name, }, - Key: pullSubscriptionSpec.Secret.Key, + Key: pubSubSourceSpec.Secret.Key, }, - Project: pullSubscriptionSpec.Project, + Project: pubSubSourceSpec.Project, SourceSpec: duckv1.SourceSpec{ - Sink: pullSubscriptionSpec.Sink, + Sink: pubSubSourceSpec.Sink, }, }, Topic: "some-other-topic", @@ -263,117 +275,117 @@ func TestCloudPubSubSourceCheckImmutableFields(t *testing.T) { allowed: false, }, "Sink.APIVersion changed": { - orig: &pullSubscriptionSpec, + orig: &pubSubSourceSpec, updated: CloudPubSubSourceSpec{ PubSubSpec: duckv1alpha1.PubSubSpec{ Secret: &corev1.SecretKeySelector{ LocalObjectReference: corev1.LocalObjectReference{ - Name: pullSubscriptionSpec.Secret.Name, + Name: pubSubSourceSpec.Secret.Name, }, - Key: pullSubscriptionSpec.Secret.Key, + Key: pubSubSourceSpec.Secret.Key, }, - Project: pullSubscriptionSpec.Project, + Project: pubSubSourceSpec.Project, SourceSpec: duckv1.SourceSpec{ Sink: duckv1.Destination{ Ref: &duckv1.KReference{ APIVersion: "some-other-api-version", - Kind: pullSubscriptionSpec.Sink.Ref.Kind, - Namespace: pullSubscriptionSpec.Sink.Ref.Namespace, - Name: pullSubscriptionSpec.Sink.Ref.Name, + Kind: pubSubSourceSpec.Sink.Ref.Kind, + Namespace: pubSubSourceSpec.Sink.Ref.Namespace, + Name: pubSubSourceSpec.Sink.Ref.Name, }, }, }, }, - Topic: pullSubscriptionSpec.Topic, + Topic: pubSubSourceSpec.Topic, }, allowed: true, }, "Sink.Kind changed": { - orig: &pullSubscriptionSpec, + orig: &pubSubSourceSpec, updated: CloudPubSubSourceSpec{ PubSubSpec: duckv1alpha1.PubSubSpec{ Secret: &corev1.SecretKeySelector{ LocalObjectReference: corev1.LocalObjectReference{ - Name: pullSubscriptionSpec.Secret.Name, + Name: pubSubSourceSpec.Secret.Name, }, - Key: pullSubscriptionSpec.Secret.Key, + Key: pubSubSourceSpec.Secret.Key, }, - Project: pullSubscriptionSpec.Project, + Project: pubSubSourceSpec.Project, SourceSpec: duckv1.SourceSpec{ Sink: duckv1.Destination{ Ref: &duckv1.KReference{ - APIVersion: pullSubscriptionSpec.Sink.Ref.APIVersion, + APIVersion: pubSubSourceSpec.Sink.Ref.APIVersion, Kind: "some-other-kind", - Namespace: pullSubscriptionSpec.Sink.Ref.Namespace, - Name: pullSubscriptionSpec.Sink.Ref.Name, + Namespace: pubSubSourceSpec.Sink.Ref.Namespace, + Name: pubSubSourceSpec.Sink.Ref.Name, }, }, }, }, - Topic: pullSubscriptionSpec.Topic, + Topic: pubSubSourceSpec.Topic, }, allowed: true, }, "Sink.Namespace changed": { - orig: &pullSubscriptionSpec, + orig: &pubSubSourceSpec, updated: CloudPubSubSourceSpec{ PubSubSpec: duckv1alpha1.PubSubSpec{ Secret: &corev1.SecretKeySelector{ LocalObjectReference: corev1.LocalObjectReference{ - Name: pullSubscriptionSpec.Secret.Name, + Name: pubSubSourceSpec.Secret.Name, }, - Key: pullSubscriptionSpec.Secret.Key, + Key: pubSubSourceSpec.Secret.Key, }, - Project: pullSubscriptionSpec.Project, + Project: pubSubSourceSpec.Project, SourceSpec: duckv1.SourceSpec{ Sink: duckv1.Destination{ Ref: &duckv1.KReference{ - APIVersion: pullSubscriptionSpec.Sink.Ref.APIVersion, - Kind: pullSubscriptionSpec.Sink.Ref.Kind, + APIVersion: pubSubSourceSpec.Sink.Ref.APIVersion, + Kind: pubSubSourceSpec.Sink.Ref.Kind, Namespace: "some-other-namespace", - Name: pullSubscriptionSpec.Sink.Ref.Name, + Name: pubSubSourceSpec.Sink.Ref.Name, }, }, }, }, - Topic: pullSubscriptionSpec.Topic, + Topic: pubSubSourceSpec.Topic, }, allowed: true, }, "Sink.Name changed": { - orig: &pullSubscriptionSpec, + orig: &pubSubSourceSpec, updated: CloudPubSubSourceSpec{ PubSubSpec: duckv1alpha1.PubSubSpec{ Secret: &corev1.SecretKeySelector{ LocalObjectReference: corev1.LocalObjectReference{ - Name: pullSubscriptionSpec.Secret.Name, + Name: pubSubSourceSpec.Secret.Name, }, - Key: pullSubscriptionSpec.Secret.Key, + Key: pubSubSourceSpec.Secret.Key, }, - Project: pullSubscriptionSpec.Project, + Project: pubSubSourceSpec.Project, SourceSpec: duckv1.SourceSpec{ Sink: duckv1.Destination{ Ref: &duckv1.KReference{ - APIVersion: pullSubscriptionSpec.Sink.Ref.APIVersion, - Kind: pullSubscriptionSpec.Sink.Ref.Kind, - Namespace: pullSubscriptionSpec.Sink.Ref.Namespace, + APIVersion: pubSubSourceSpec.Sink.Ref.APIVersion, + Kind: pubSubSourceSpec.Sink.Ref.Kind, + Namespace: pubSubSourceSpec.Sink.Ref.Namespace, Name: "some-other-name", }, }, }, }, - Topic: pullSubscriptionSpec.Topic, + Topic: pubSubSourceSpec.Topic, }, allowed: true, }, "no change": { - orig: &pullSubscriptionSpec, - updated: pullSubscriptionSpec, + orig: &pubSubSourceSpec, + updated: pubSubSourceSpec, allowed: true, }, "not spec": { orig: []string{"wrong"}, - updated: pullSubscriptionSpec, + updated: pubSubSourceSpec, allowed: true, }, } diff --git a/pkg/apis/events/v1alpha1/cloudschedulersource_validation.go b/pkg/apis/events/v1alpha1/cloudschedulersource_validation.go index 62ed633fe8..a6b5a1378e 100644 --- a/pkg/apis/events/v1alpha1/cloudschedulersource_validation.go +++ b/pkg/apis/events/v1alpha1/cloudschedulersource_validation.go @@ -67,15 +67,6 @@ func (current *CloudSchedulerSourceSpec) Validate(ctx context.Context) *apis.Fie } } - if current.PubSubSecret != nil { - if !equality.Semantic.DeepEqual(current.PubSubSecret, &corev1.SecretKeySelector{}) { - err := validateSecret(current.PubSubSecret) - if err != nil { - errs = errs.Also(err.ViaField("pubsubSecret")) - } - } - } - return errs } @@ -83,7 +74,7 @@ func (current *CloudSchedulerSource) CheckImmutableFields(ctx context.Context, o if original == nil { return nil } - // Modification of Location, Schedule, Data, Secret, PubSubSecret, Project are not allowed. Everything else is mutable. + // Modification of Location, Schedule, Data, Secret, Project are not allowed. Everything else is mutable. if diff := cmp.Diff(original.Spec, current.Spec, cmpopts.IgnoreFields(CloudSchedulerSourceSpec{}, "Sink", "CloudEventOverrides")); diff != "" { diff --git a/pkg/apis/events/v1alpha1/cloudschedulersource_validation_test.go b/pkg/apis/events/v1alpha1/cloudschedulersource_validation_test.go index dd09a599d8..8d8248b8ec 100644 --- a/pkg/apis/events/v1alpha1/cloudschedulersource_validation_test.go +++ b/pkg/apis/events/v1alpha1/cloudschedulersource_validation_test.go @@ -71,37 +71,6 @@ var ( }, }, } - - // Location, Schedule, Data, Sink, Secret, and PubSubSecret - schedulerWithPubSubSecret = CloudSchedulerSourceSpec{ - Location: "mylocation", - Schedule: "* * * * *", - Data: "mydata", - PubSubSpec: duckv1alpha1.PubSubSpec{ - SourceSpec: duckv1.SourceSpec{ - Sink: duckv1.Destination{ - Ref: &duckv1.KReference{ - APIVersion: "foo", - Kind: "bar", - Namespace: "baz", - Name: "qux", - }, - }, - }, - Secret: &corev1.SecretKeySelector{ - LocalObjectReference: corev1.LocalObjectReference{ - Name: "gcs-secret-name", - }, - Key: "gcs-secret-key", - }, - PubSubSecret: &corev1.SecretKeySelector{ - LocalObjectReference: corev1.LocalObjectReference{ - Name: "pullsubscription-secret-name", - }, - Key: "pullsubscription-secret-key", - }, - }, - } ) func TestCloudSchedulerSourceValidationFields(t *testing.T) { @@ -238,7 +207,7 @@ func TestCloudSchedulerSourceSpecValidationFields(t *testing.T) { return fe }(), }, { - name: "invalid gcs secret, missing key", + name: "invalid scheduler secret, missing key", spec: &CloudSchedulerSourceSpec{ Location: "my-test-location", Schedule: "* * * * *", @@ -263,59 +232,6 @@ func TestCloudSchedulerSourceSpecValidationFields(t *testing.T) { fe := apis.ErrMissingField("secret.key") return fe }(), - }, { - name: "invalid pubsub secret, missing name", - spec: &CloudSchedulerSourceSpec{ - Location: "my-test-location", - Schedule: "* * * * *", - Data: "data", - PubSubSpec: duckv1alpha1.PubSubSpec{ - SourceSpec: duckv1.SourceSpec{ - Sink: duckv1.Destination{ - Ref: &duckv1.KReference{ - APIVersion: "foo", - Kind: "bar", - Namespace: "baz", - Name: "qux", - }, - }, - }, - PubSubSecret: &corev1.SecretKeySelector{ - LocalObjectReference: corev1.LocalObjectReference{}, - Key: "secret-test-key", - }, - }, - }, - want: func() *apis.FieldError { - fe := apis.ErrMissingField("pubsubSecret.name") - return fe - }(), - }, { - name: "invalid secret, missing key", - spec: &CloudSchedulerSourceSpec{ - Location: "my-test-location", - Schedule: "* * * * *", - Data: "data", - PubSubSpec: duckv1alpha1.PubSubSpec{ - SourceSpec: duckv1.SourceSpec{ - Sink: duckv1.Destination{ - Ref: &duckv1.KReference{ - APIVersion: "foo", - Kind: "bar", - Namespace: "baz", - Name: "qux", - }, - }, - }, - PubSubSecret: &corev1.SecretKeySelector{ - LocalObjectReference: corev1.LocalObjectReference{Name: "gcs-test-secret"}, - }, - }, - }, - want: func() *apis.FieldError { - fe := apis.ErrMissingField("pubsubSecret.key") - return fe - }(), }} for _, test := range testCases { t.Run(test.name, func(t *testing.T) { @@ -335,90 +251,68 @@ func TestCloudSchedulerSourceSpecCheckImmutableFields(t *testing.T) { allowed bool }{ "nil orig": { - updated: schedulerWithPubSubSecret, + updated: schedulerWithSecret, allowed: true, }, "Location changed": { - orig: &schedulerWithPubSubSecret, + orig: &schedulerWithSecret, updated: CloudSchedulerSourceSpec{ Location: "some-other-location", - Schedule: schedulerWithPubSubSecret.Schedule, - Data: schedulerWithPubSubSecret.Data, - PubSubSpec: schedulerWithPubSubSecret.PubSubSpec, + Schedule: schedulerWithSecret.Schedule, + Data: schedulerWithSecret.Data, + PubSubSpec: schedulerWithSecret.PubSubSpec, }, allowed: false, }, "Schedule changed": { - orig: &schedulerWithPubSubSecret, + orig: &schedulerWithSecret, updated: CloudSchedulerSourceSpec{ - Location: schedulerWithPubSubSecret.Location, + Location: schedulerWithSecret.Location, Schedule: "* * * * 1", - Data: schedulerWithPubSubSecret.Data, - PubSubSpec: schedulerWithPubSubSecret.PubSubSpec, + Data: schedulerWithSecret.Data, + PubSubSpec: schedulerWithSecret.PubSubSpec, }, allowed: false, }, "Data changed": { - orig: &schedulerWithPubSubSecret, + orig: &schedulerWithSecret, updated: CloudSchedulerSourceSpec{ - Location: schedulerWithPubSubSecret.Location, - Schedule: schedulerWithPubSubSecret.Schedule, + Location: schedulerWithSecret.Location, + Schedule: schedulerWithSecret.Schedule, Data: "some-other-data", - PubSubSpec: schedulerWithPubSubSecret.PubSubSpec, + PubSubSpec: schedulerWithSecret.PubSubSpec, }, allowed: false, }, "Secret.Name changed": { - orig: &schedulerWithPubSubSecret, + orig: &schedulerWithSecret, updated: CloudSchedulerSourceSpec{ - Location: schedulerWithPubSubSecret.Location, - Schedule: schedulerWithPubSubSecret.Schedule, - Data: schedulerWithPubSubSecret.Data, + Location: schedulerWithSecret.Location, + Schedule: schedulerWithSecret.Schedule, + Data: schedulerWithSecret.Data, PubSubSpec: duckv1alpha1.PubSubSpec{ - SourceSpec: schedulerWithPubSubSecret.SourceSpec, + SourceSpec: schedulerWithSecret.SourceSpec, Secret: &corev1.SecretKeySelector{ LocalObjectReference: corev1.LocalObjectReference{ Name: "some-other-name", }, - Key: schedulerWithPubSubSecret.Secret.Key, - }, - Project: schedulerWithPubSubSecret.Project, - PubSubSecret: schedulerWithPubSubSecret.PubSubSecret, - }, - }, - allowed: false, - }, - "PubSubSecret.Name changed": { - orig: &schedulerWithPubSubSecret, - updated: CloudSchedulerSourceSpec{ - Location: schedulerWithPubSubSecret.Location, - Schedule: schedulerWithPubSubSecret.Schedule, - Data: schedulerWithPubSubSecret.Data, - PubSubSpec: duckv1alpha1.PubSubSpec{ - SourceSpec: schedulerWithPubSubSecret.SourceSpec, - Secret: schedulerWithPubSubSecret.Secret, - Project: schedulerWithPubSubSecret.Project, - PubSubSecret: &corev1.SecretKeySelector{ - LocalObjectReference: corev1.LocalObjectReference{ - Name: "some-other-pullsubscription-secret-name", - }, - Key: schedulerWithPubSubSecret.PubSubSecret.Key, + Key: schedulerWithSecret.Secret.Key, }, + Project: schedulerWithSecret.Project, }, }, allowed: false, }, "Project changed changed": { - orig: &schedulerWithPubSubSecret, + orig: &schedulerWithSecret, updated: CloudSchedulerSourceSpec{ - Location: schedulerWithPubSubSecret.Location, - Schedule: schedulerWithPubSubSecret.Schedule, - Data: schedulerWithPubSubSecret.Data, + Location: schedulerWithSecret.Location, + Schedule: schedulerWithSecret.Schedule, + Data: schedulerWithSecret.Data, PubSubSpec: duckv1alpha1.PubSubSpec{ - SourceSpec: schedulerWithPubSubSecret.SourceSpec, - Secret: schedulerWithPubSubSecret.Secret, + SourceSpec: schedulerWithSecret.SourceSpec, + Secret: schedulerWithSecret.Secret, Project: "some-other-project", - PubSubSecret: schedulerWithPubSubSecret.PubSubSecret, }, }, allowed: false, diff --git a/pkg/apis/events/v1alpha1/cloudstoragesource_validation.go b/pkg/apis/events/v1alpha1/cloudstoragesource_validation.go index 8d8797bfbb..89b23147c7 100644 --- a/pkg/apis/events/v1alpha1/cloudstoragesource_validation.go +++ b/pkg/apis/events/v1alpha1/cloudstoragesource_validation.go @@ -58,15 +58,6 @@ func (current *CloudStorageSourceSpec) Validate(ctx context.Context) *apis.Field } } - if current.PubSubSecret != nil { - if !equality.Semantic.DeepEqual(current.PubSubSecret, &corev1.SecretKeySelector{}) { - err := validateSecret(current.PubSubSecret) - if err != nil { - errs = errs.Also(err.ViaField("pubSubSecret")) - } - } - } - return errs } @@ -85,7 +76,7 @@ func (current *CloudStorageSource) CheckImmutableFields(ctx context.Context, ori if original == nil { return nil } - // Modification of EventType, Secret, PubSubSecret, Project, Bucket, ObjectNamePrefix and PayloadFormat are not allowed. Everything else is mutable. + // Modification of EventType, Secret, Project, Bucket, ObjectNamePrefix and PayloadFormat are not allowed. Everything else is mutable. if diff := cmp.Diff(original.Spec, current.Spec, cmpopts.IgnoreFields(CloudStorageSourceSpec{}, "Sink", "CloudEventOverrides", "ServiceAccountName")); diff != "" { diff --git a/pkg/apis/events/v1alpha1/cloudstoragesource_validation_test.go b/pkg/apis/events/v1alpha1/cloudstoragesource_validation_test.go index f3299356c4..9c33643498 100644 --- a/pkg/apis/events/v1alpha1/cloudstoragesource_validation_test.go +++ b/pkg/apis/events/v1alpha1/cloudstoragesource_validation_test.go @@ -70,35 +70,7 @@ var ( }, } - // Bucket, Sink, Secret, and PubSubSecret - withPubSubSecret = CloudStorageSourceSpec{ - Bucket: "my-test-bucket", - PubSubSpec: duckv1alpha1.PubSubSpec{ - SourceSpec: duckv1.SourceSpec{ - Sink: duckv1.Destination{ - Ref: &duckv1.KReference{ - APIVersion: "foo", - Kind: "bar", - Namespace: "baz", - Name: "qux", - }, - }, - }, - Secret: &corev1.SecretKeySelector{ - LocalObjectReference: corev1.LocalObjectReference{ - Name: "gcs-secret-name", - }, - Key: "gcs-secret-key", - }, - PubSubSecret: &corev1.SecretKeySelector{ - LocalObjectReference: corev1.LocalObjectReference{ - Name: "pullsubscription-secret-name", - }, - Key: "pullsubscription-secret-key", - }, - }, - } - // Bucket, Sink, Secret, PubSubSecret, Event Type and Project, ObjectNamePrefix and PayloadFormat + // Bucket, Sink, Secret, Event Type and Project, ObjectNamePrefix and PayloadFormat storageSourceSpec = CloudStorageSourceSpec{ Bucket: "my-test-bucket", EventTypes: []string{CloudStorageSourceFinalize, CloudStorageSourceDelete}, @@ -122,12 +94,6 @@ var ( Key: "gcs-secret-key", }, Project: "my-eventing-project", - PubSubSecret: &corev1.SecretKeySelector{ - LocalObjectReference: corev1.LocalObjectReference{ - Name: "pullsubscription-secret-name", - }, - Key: "pullsubscription-secret-key", - }, }, } ) @@ -250,55 +216,6 @@ func TestSpecValidationFields(t *testing.T) { fe := apis.ErrMissingField("secret.key") return fe }(), - }, { - name: "invalid pullsubscription secret, missing name", - spec: &CloudStorageSourceSpec{ - Bucket: "my-test-bucket", - PubSubSpec: duckv1alpha1.PubSubSpec{ - SourceSpec: duckv1.SourceSpec{ - Sink: duckv1.Destination{ - Ref: &duckv1.KReference{ - APIVersion: "foo", - Kind: "bar", - Namespace: "baz", - Name: "qux", - }, - }, - }, - PubSubSecret: &corev1.SecretKeySelector{ - LocalObjectReference: corev1.LocalObjectReference{}, - Key: "secret-test-key", - }, - }, - }, - want: func() *apis.FieldError { - fe := apis.ErrMissingField("pubSubSecret.name") - return fe - }(), - }, { - name: "invalid gcs secret, missing key", - spec: &CloudStorageSourceSpec{ - Bucket: "my-test-bucket", - PubSubSpec: duckv1alpha1.PubSubSpec{ - SourceSpec: duckv1.SourceSpec{ - Sink: duckv1.Destination{ - Ref: &duckv1.KReference{ - APIVersion: "foo", - Kind: "bar", - Namespace: "baz", - Name: "qux", - }, - }, - }, - PubSubSecret: &corev1.SecretKeySelector{ - LocalObjectReference: corev1.LocalObjectReference{Name: "gcs-test-secret"}, - }, - }, - }, - want: func() *apis.FieldError { - fe := apis.ErrMissingField("pubSubSecret.key") - return fe - }(), }} for _, test := range testCases { t.Run(test.name, func(t *testing.T) { @@ -380,28 +297,6 @@ func TestCheckImmutableFields(t *testing.T) { Key: storageSourceSpec.Secret.Key, }, Project: storageSourceSpec.Project, - PubSubSecret: storageSourceSpec.PubSubSecret, - }, - }, - allowed: false, - }, - "PubSubSecret.Name changed": { - orig: &storageSourceSpec, - updated: CloudStorageSourceSpec{ - Bucket: storageSourceSpec.Bucket, - EventTypes: storageSourceSpec.EventTypes, - ObjectNamePrefix: storageSourceSpec.ObjectNamePrefix, - PayloadFormat: storageSourceSpec.PayloadFormat, - PubSubSpec: duckv1alpha1.PubSubSpec{ - SourceSpec: storageSourceSpec.SourceSpec, - Secret: storageSourceSpec.Secret, - Project: storageSourceSpec.Project, - PubSubSecret: &corev1.SecretKeySelector{ - LocalObjectReference: corev1.LocalObjectReference{ - Name: "some-other-pullsubscription-secret-name", - }, - Key: storageSourceSpec.PubSubSecret.Key, - }, }, }, allowed: false, @@ -417,7 +312,6 @@ func TestCheckImmutableFields(t *testing.T) { SourceSpec: storageSourceSpec.SourceSpec, Secret: storageSourceSpec.Secret, Project: "some-other-project", - PubSubSecret: storageSourceSpec.PubSubSecret, }, }, allowed: false, diff --git a/pkg/apis/pubsub/v1alpha1/pullsubscription_validation.go b/pkg/apis/pubsub/v1alpha1/pullsubscription_validation.go index f50df37190..6d9b7c7905 100644 --- a/pkg/apis/pubsub/v1alpha1/pullsubscription_validation.go +++ b/pkg/apis/pubsub/v1alpha1/pullsubscription_validation.go @@ -22,6 +22,7 @@ import ( "github.com/google/go-cmp/cmp/cmpopts" duckv1alpha1 "github.com/google/knative-gcp/pkg/apis/duck/v1alpha1" + corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/equality" duckv1 "knative.dev/pkg/apis/duck/v1" @@ -89,6 +90,27 @@ func (current *PullSubscriptionSpec) Validate(ctx context.Context) *apis.FieldEr errs = errs.Also(apis.ErrInvalidValue(current.Mode, "mode")) } + if current.Secret != nil { + if !equality.Semantic.DeepEqual(current.Secret, &corev1.SecretKeySelector{}) { + err := validateSecret(current.Secret) + if err != nil { + errs = errs.Also(err.ViaField("secret")) + } + } + } + + return errs +} + +// TODO move this to a common place. +func validateSecret(secret *corev1.SecretKeySelector) *apis.FieldError { + var errs *apis.FieldError + if secret.Name == "" { + errs = errs.Also(apis.ErrMissingField("name")) + } + if secret.Key == "" { + errs = errs.Also(apis.ErrMissingField("key")) + } return errs } diff --git a/pkg/apis/pubsub/v1alpha1/pullsubscription_validation_test.go b/pkg/apis/pubsub/v1alpha1/pullsubscription_validation_test.go index 6699a9da2e..7d812f9f98 100644 --- a/pkg/apis/pubsub/v1alpha1/pullsubscription_validation_test.go +++ b/pkg/apis/pubsub/v1alpha1/pullsubscription_validation_test.go @@ -180,6 +180,18 @@ func TestPubSubCheckValidationFields(t *testing.T) { }(), error: true, }, + "bad secret, missing key": { + spec: func() PullSubscriptionSpec { + obj := pullSubscriptionSpec.DeepCopy() + obj.Secret = &corev1.SecretKeySelector{ + LocalObjectReference: corev1.LocalObjectReference{ + Name: "some-other-name", + }, + } + return *obj + }(), + error: true, + }, } for n, tc := range testCases { t.Run(n, func(t *testing.T) { diff --git a/pkg/reconciler/events/auditlogs/auditlogs_test.go b/pkg/reconciler/events/auditlogs/auditlogs_test.go index 665bf3f79a..bfffb6d743 100644 --- a/pkg/reconciler/events/auditlogs/auditlogs_test.go +++ b/pkg/reconciler/events/auditlogs/auditlogs_test.go @@ -142,6 +142,7 @@ func TestAllCases(t *testing.T) { Name: "topic created, not yet been reconciled", Objects: []runtime.Object{ NewCloudAuditLogsSource(sourceName, testNS, + WithCloudAuditLogsSourceSink(sinkGVK, sinkName), WithCloudAuditLogsSourceMethodName(testMethodName), WithCloudAuditLogsSourceServiceName(testServiceName)), }, @@ -150,6 +151,7 @@ func TestAllCases(t *testing.T) { WantStatusUpdates: []clientgotesting.UpdateActionImpl{{ Object: NewCloudAuditLogsSource(sourceName, testNS, WithInitCloudAuditLogsSourceConditions, + WithCloudAuditLogsSourceSink(sinkGVK, sinkName), WithCloudAuditLogsSourceMethodName(testMethodName), WithCloudAuditLogsSourceServiceName(testServiceName), WithCloudAuditLogsSourceTopicUnknown("TopicNotConfigured", failedToReconcileTopicMsg)), @@ -178,6 +180,7 @@ func TestAllCases(t *testing.T) { Name: "topic exists, topic has not yet been reconciled", Objects: []runtime.Object{ NewCloudAuditLogsSource(sourceName, testNS, + WithCloudAuditLogsSourceSink(sinkGVK, sinkName), WithCloudAuditLogsSourceMethodName(testMethodName), WithCloudAuditLogsSourceServiceName(testServiceName), WithCloudAuditLogsSourceFinalizers(finalizerName), @@ -190,6 +193,7 @@ func TestAllCases(t *testing.T) { WantErr: true, WantStatusUpdates: []clientgotesting.UpdateActionImpl{{ Object: NewCloudAuditLogsSource(sourceName, testNS, + WithCloudAuditLogsSourceSink(sinkGVK, sinkName), WithCloudAuditLogsSourceFinalizers(finalizerName), WithInitCloudAuditLogsSourceConditions, WithCloudAuditLogsSourceMethodName(testMethodName), @@ -203,6 +207,7 @@ func TestAllCases(t *testing.T) { Name: "topic exists and is ready, no projectid", Objects: []runtime.Object{ NewCloudAuditLogsSource(sourceName, testNS, + WithCloudAuditLogsSourceSink(sinkGVK, sinkName), WithCloudAuditLogsSourceMethodName(testMethodName), WithCloudAuditLogsSourceServiceName(testServiceName), WithCloudAuditLogsSourceFinalizers(finalizerName), @@ -216,6 +221,7 @@ func TestAllCases(t *testing.T) { WantErr: true, WantStatusUpdates: []clientgotesting.UpdateActionImpl{{ Object: NewCloudAuditLogsSource(sourceName, testNS, + WithCloudAuditLogsSourceSink(sinkGVK, sinkName), WithCloudAuditLogsSourceFinalizers(finalizerName), WithCloudAuditLogsSourceMethodName(testMethodName), WithCloudAuditLogsSourceServiceName(testServiceName), @@ -230,6 +236,7 @@ func TestAllCases(t *testing.T) { Name: "topic exists and is ready, no topicid", Objects: []runtime.Object{ NewCloudAuditLogsSource(sourceName, testNS, + WithCloudAuditLogsSourceSink(sinkGVK, sinkName), WithCloudAuditLogsSourceMethodName(testMethodName), WithCloudAuditLogsSourceServiceName(testServiceName), WithCloudAuditLogsSourceFinalizers(finalizerName), @@ -244,6 +251,7 @@ func TestAllCases(t *testing.T) { WantErr: true, WantStatusUpdates: []clientgotesting.UpdateActionImpl{{ Object: NewCloudAuditLogsSource(sourceName, testNS, + WithCloudAuditLogsSourceSink(sinkGVK, sinkName), WithCloudAuditLogsSourceFinalizers(finalizerName), WithCloudAuditLogsSourceMethodName(testMethodName), WithCloudAuditLogsSourceServiceName(testServiceName), @@ -258,6 +266,7 @@ func TestAllCases(t *testing.T) { Name: "topic exists and is ready, unexpected topicid", Objects: []runtime.Object{ NewCloudAuditLogsSource(sourceName, testNS, + WithCloudAuditLogsSourceSink(sinkGVK, sinkName), WithCloudAuditLogsSourceMethodName(testMethodName), WithCloudAuditLogsSourceServiceName(testServiceName), WithCloudAuditLogsSourceFinalizers(finalizerName), @@ -272,6 +281,7 @@ func TestAllCases(t *testing.T) { WantErr: true, WantStatusUpdates: []clientgotesting.UpdateActionImpl{{ Object: NewCloudAuditLogsSource(sourceName, testNS, + WithCloudAuditLogsSourceSink(sinkGVK, sinkName), WithCloudAuditLogsSourceFinalizers(finalizerName), WithCloudAuditLogsSourceMethodName(testMethodName), WithCloudAuditLogsSourceServiceName(testServiceName), @@ -286,6 +296,7 @@ func TestAllCases(t *testing.T) { Name: "topic exists and the status of topic is false", Objects: []runtime.Object{ NewCloudAuditLogsSource(sourceName, testNS, + WithCloudAuditLogsSourceSink(sinkGVK, sinkName), WithCloudAuditLogsSourceMethodName(testMethodName), WithCloudAuditLogsSourceServiceName(testServiceName), WithCloudAuditLogsSourceFinalizers(finalizerName), @@ -299,6 +310,7 @@ func TestAllCases(t *testing.T) { WantErr: true, WantStatusUpdates: []clientgotesting.UpdateActionImpl{{ Object: NewCloudAuditLogsSource(sourceName, testNS, + WithCloudAuditLogsSourceSink(sinkGVK, sinkName), WithCloudAuditLogsSourceFinalizers(finalizerName), WithCloudAuditLogsSourceMethodName(testMethodName), WithCloudAuditLogsSourceServiceName(testServiceName), @@ -312,6 +324,7 @@ func TestAllCases(t *testing.T) { Name: "topic exists and the status of topic is unknown", Objects: []runtime.Object{ NewCloudAuditLogsSource(sourceName, testNS, + WithCloudAuditLogsSourceSink(sinkGVK, sinkName), WithCloudAuditLogsSourceMethodName(testMethodName), WithCloudAuditLogsSourceServiceName(testServiceName), WithCloudAuditLogsSourceFinalizers(finalizerName), @@ -325,6 +338,7 @@ func TestAllCases(t *testing.T) { WantErr: true, WantStatusUpdates: []clientgotesting.UpdateActionImpl{{ Object: NewCloudAuditLogsSource(sourceName, testNS, + WithCloudAuditLogsSourceSink(sinkGVK, sinkName), WithCloudAuditLogsSourceFinalizers(finalizerName), WithCloudAuditLogsSourceMethodName(testMethodName), WithCloudAuditLogsSourceServiceName(testServiceName), diff --git a/pkg/reconciler/pubsub/resources/pullsubscription.go b/pkg/reconciler/pubsub/resources/pullsubscription.go index dc080981ce..b1ef66bddf 100644 --- a/pkg/reconciler/pubsub/resources/pullsubscription.go +++ b/pkg/reconciler/pubsub/resources/pullsubscription.go @@ -17,8 +17,6 @@ limitations under the License. package resources import ( - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/equality" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" duckv1 "knative.dev/pkg/apis/duck/v1" "knative.dev/pkg/kmeta" @@ -42,11 +40,6 @@ type PullSubscriptionArgs struct { // MakePullSubscription creates the spec for, but does not create, a GCP PullSubscription // for a given GCS. func MakePullSubscription(args *PullSubscriptionArgs) *pubsubv1alpha1.PullSubscription { - pubsubSecret := args.Spec.Secret - if args.Spec.PubSubSecret != nil && !equality.Semantic.DeepEqual(args.Spec.PubSubSecret, &corev1.SecretKeySelector{}) { - pubsubSecret = args.Spec.PubSubSecret - } - ps := &pubsubv1alpha1.PullSubscription{ ObjectMeta: metav1.ObjectMeta{ Name: args.Name, @@ -56,7 +49,7 @@ func MakePullSubscription(args *PullSubscriptionArgs) *pubsubv1alpha1.PullSubscr OwnerReferences: []metav1.OwnerReference{*kmeta.NewControllerRef(args.Owner)}, }, Spec: pubsubv1alpha1.PullSubscriptionSpec{ - Secret: pubsubSecret, + Secret: args.Spec.Secret, Project: args.Spec.Project, Topic: args.Topic, AdapterType: args.AdapterType, diff --git a/pkg/reconciler/pubsub/resources/topic.go b/pkg/reconciler/pubsub/resources/topic.go index 46b092dcdf..1bd9ab7570 100644 --- a/pkg/reconciler/pubsub/resources/topic.go +++ b/pkg/reconciler/pubsub/resources/topic.go @@ -17,8 +17,6 @@ limitations under the License. package resources import ( - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/equality" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "knative.dev/pkg/kmeta" @@ -38,12 +36,6 @@ type TopicArgs struct { // MakeTopic creates the spec for, but does not create, a GCP Topic // for a given GCS. func MakeTopic(args *TopicArgs) *pubsubv1alpha1.Topic { - - pubsubSecret := args.Spec.Secret - if args.Spec.PubSubSecret != nil && !equality.Semantic.DeepEqual(args.Spec.PubSubSecret, &corev1.SecretKeySelector{}) { - pubsubSecret = args.Spec.PubSubSecret - } - return &pubsubv1alpha1.Topic{ ObjectMeta: metav1.ObjectMeta{ Name: args.Name, @@ -52,7 +44,7 @@ func MakeTopic(args *TopicArgs) *pubsubv1alpha1.Topic { OwnerReferences: []metav1.OwnerReference{*kmeta.NewControllerRef(args.Owner)}, }, Spec: pubsubv1alpha1.TopicSpec{ - Secret: pubsubSecret, + Secret: args.Spec.Secret, Project: args.Spec.Project, Topic: args.Topic, PropagationPolicy: pubsubv1alpha1.TopicPolicyCreateDelete, diff --git a/pkg/reconciler/pubsub/resources/topic_test.go b/pkg/reconciler/pubsub/resources/topic_test.go index c629456adf..6a19907f2b 100644 --- a/pkg/reconciler/pubsub/resources/topic_test.go +++ b/pkg/reconciler/pubsub/resources/topic_test.go @@ -183,86 +183,3 @@ func TestMakeTopicWithCloudSchedulerSource(t *testing.T) { t.Errorf("unexpected (-want, +got) = %v", diff) } } - -func TestMakeTopicWithCloudSchedulerSourceWithPubSubSecret(t *testing.T) { - source := &v1alpha1.CloudSchedulerSource{ - ObjectMeta: metav1.ObjectMeta{ - Name: "scheduler-name", - Namespace: "scheduler-namespace", - UID: "scheduler-uid", - }, - Spec: v1alpha1.CloudSchedulerSourceSpec{ - PubSubSpec: duckv1alpha1.PubSubSpec{ - Project: "project-123", - Secret: &corev1.SecretKeySelector{ - LocalObjectReference: corev1.LocalObjectReference{ - Name: "eventing-secret-name", - }, - Key: "eventing-secret-key", - }, - PubSubSecret: &corev1.SecretKeySelector{ - LocalObjectReference: corev1.LocalObjectReference{ - Name: "pubsub-secret-name", - }, - Key: "pubsub-secret-key", - }, - SourceSpec: duckv1.SourceSpec{ - Sink: duckv1.Destination{ - Ref: &duckv1.KReference{ - APIVersion: "v1", - Kind: "Kitchen", - Name: "sink", - }, - }, - }, - }, - }, - } - args := &TopicArgs{ - Namespace: source.Namespace, - Name: source.Name, - Spec: &source.Spec.PubSubSpec, - Owner: source, - Topic: "topic-abc", - Labels: map[string]string{ - "receive-adapter": "scheduler.events.cloud.google.com", - "source": source.Name, - }, - } - got := MakeTopic(args) - - yes := true - want := &pubsubv1alpha1.Topic{ - ObjectMeta: metav1.ObjectMeta{ - Namespace: "scheduler-namespace", - Name: "scheduler-name", - Labels: map[string]string{ - "receive-adapter": "scheduler.events.cloud.google.com", - "source": "scheduler-name", - }, - OwnerReferences: []metav1.OwnerReference{{ - APIVersion: "events.cloud.google.com/v1alpha1", - Kind: "CloudSchedulerSource", - Name: "scheduler-name", - UID: "scheduler-uid", - Controller: &yes, - BlockOwnerDeletion: &yes, - }}, - }, - Spec: pubsubv1alpha1.TopicSpec{ - Secret: &corev1.SecretKeySelector{ - LocalObjectReference: corev1.LocalObjectReference{ - Name: "pubsub-secret-name", - }, - Key: "pubsub-secret-key", - }, - Project: "project-123", - Topic: "topic-abc", - PropagationPolicy: pubsubv1alpha1.TopicPolicyCreateDelete, - }, - } - - if diff := cmp.Diff(want, got); diff != "" { - t.Errorf("unexpected (-want, +got) = %v", diff) - } -}