From ffe385a34e60e9022f547ce1a1b72a66a120aa41 Mon Sep 17 00:00:00 2001 From: David Simansky Date: Thu, 4 Mar 2021 11:23:15 +0100 Subject: [PATCH] chore: Update CRDs API version to v1 (#1248) * chore: Update CRDs API version to v1 * fix: Fix e2e test * chore: Add changelog entry --- CHANGELOG.adoc | 11 +++++++++++ pkg/dynamic/client.go | 2 +- pkg/kn/commands/channel/list_types_test.go | 2 +- pkg/kn/commands/source/list_test.go | 2 +- test/e2e/source_list_test.go | 2 +- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 5e36c203c..b36b5295e 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -12,6 +12,17 @@ | https://github.com/knative/client/pull/[#] //// +## (Unreleased) +[cols="1,10,3", options="header", width="100%"] +|=== +| | Description | PR + +| ✨ +| Update CRDs API version to `v1` +| https://github.com/knative/client/issues/1248[#1248] + +|=== + ## v0.21.0 (2021-02-23) [cols="1,10,3", options="header", width="100%"] |=== diff --git a/pkg/dynamic/client.go b/pkg/dynamic/client.go index d7b6789e7..c5bb80c31 100644 --- a/pkg/dynamic/client.go +++ b/pkg/dynamic/client.go @@ -31,7 +31,7 @@ import ( const ( crdGroup = "apiextensions.k8s.io" - crdVersion = "v1beta1" + crdVersion = "v1" crdKind = "CustomResourceDefinition" crdKinds = "customresourcedefinitions" sourcesLabelKey = "duck.knative.dev/source" diff --git a/pkg/kn/commands/channel/list_types_test.go b/pkg/kn/commands/channel/list_types_test.go index 7726855fd..32e5b4622 100644 --- a/pkg/kn/commands/channel/list_types_test.go +++ b/pkg/kn/commands/channel/list_types_test.go @@ -36,7 +36,7 @@ import ( const ( crdGroup = "apiextensions.k8s.io" - crdVersion = "v1beta1" + crdVersion = "v1" crdKind = "CustomResourceDefinition" testNamespace = "current" channelLabelValue = "true" diff --git a/pkg/kn/commands/source/list_test.go b/pkg/kn/commands/source/list_test.go index daec22600..3cf09dde4 100644 --- a/pkg/kn/commands/source/list_test.go +++ b/pkg/kn/commands/source/list_test.go @@ -31,7 +31,7 @@ import ( const ( crdGroup = "apiextensions.k8s.io" - crdVersion = "v1beta1" + crdVersion = "v1" crdKind = "CustomResourceDefinition" sourcesLabelKey = "duck.knative.dev/source" sourcesLabelValue = "true" diff --git a/test/e2e/source_list_test.go b/test/e2e/source_list_test.go index 322244939..af8c00d21 100644 --- a/test/e2e/source_list_test.go +++ b/test/e2e/source_list_test.go @@ -44,7 +44,7 @@ func TestSourceListTypes(t *testing.T) { t.Log("List available source types in YAML format") output = sourceListTypes(r, "-oyaml") - assert.Check(t, util.ContainsAll(output, "apiextensions.k8s.io/v1beta1", "CustomResourceDefinition", "Ping", "ApiServer")) + assert.Check(t, util.ContainsAll(output, "apiextensions.k8s.io/v1", "CustomResourceDefinition", "Ping", "ApiServer")) } func TestSourceList(t *testing.T) {