This is an automated email from the ASF dual-hosted git repository.

astefanutti pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 9ba0d0410ef8ddbc35e5ce20e5fcbd46fe5a3dc2
Author: Antonin Stefanutti <[email protected]>
AuthorDate: Thu Jun 11 17:17:18 2020 +0200

    chore(crd): Stop serving v1alpha1 version
---
 deploy/crd-build.yaml                |  3 ---
 deploy/crd-camel-catalog.yaml        |  3 ---
 deploy/crd-integration-kit.yaml      |  3 ---
 deploy/crd-integration-platform.yaml |  3 ---
 deploy/crd-integration.yaml          |  3 ---
 e2e/common/backward_compat_test.go   | 41 ------------------------------------
 6 files changed, 56 deletions(-)

diff --git a/deploy/crd-build.yaml b/deploy/crd-build.yaml
index b07f530..10dcd13 100644
--- a/deploy/crd-build.yaml
+++ b/deploy/crd-build.yaml
@@ -4702,6 +4702,3 @@ spec:
       storage: true
       subresources:
         status: {}
-    - name: v1alpha1
-      served: true
-      storage: false
diff --git a/deploy/crd-camel-catalog.yaml b/deploy/crd-camel-catalog.yaml
index d28ac66..a5b4661 100644
--- a/deploy/crd-camel-catalog.yaml
+++ b/deploy/crd-camel-catalog.yaml
@@ -255,6 +255,3 @@ spec:
       storage: true
       subresources:
         status: {}
-    - name: v1alpha1
-      served: true
-      storage: false
diff --git a/deploy/crd-integration-kit.yaml b/deploy/crd-integration-kit.yaml
index a237b46..1258761 100644
--- a/deploy/crd-integration-kit.yaml
+++ b/deploy/crd-integration-kit.yaml
@@ -206,6 +206,3 @@ spec:
       storage: true
       subresources:
         status: {}
-    - name: v1alpha1
-      served: true
-      storage: false
diff --git a/deploy/crd-integration-platform.yaml 
b/deploy/crd-integration-platform.yaml
index 6311ee2..f53043c 100644
--- a/deploy/crd-integration-platform.yaml
+++ b/deploy/crd-integration-platform.yaml
@@ -375,6 +375,3 @@ spec:
       storage: true
       subresources:
         status: {}
-    - name: v1alpha1
-      served: true
-      storage: false
diff --git a/deploy/crd-integration.yaml b/deploy/crd-integration.yaml
index 24d9815..208204b 100644
--- a/deploy/crd-integration.yaml
+++ b/deploy/crd-integration.yaml
@@ -332,6 +332,3 @@ spec:
           specReplicasPath: .spec.replicas
           statusReplicasPath: .status.replicas
         status: {}
-    - name: v1alpha1
-      served: true
-      storage: false
diff --git a/e2e/common/backward_compat_test.go 
b/e2e/common/backward_compat_test.go
index 35b4819..be72772 100644
--- a/e2e/common/backward_compat_test.go
+++ b/e2e/common/backward_compat_test.go
@@ -28,10 +28,7 @@ import (
        "github.com/apache/camel-k/pkg/apis/camel/v1"
        "github.com/apache/camel-k/pkg/util/kubernetes"
        "github.com/stretchr/testify/assert"
-       metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
        "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
-       "k8s.io/apimachinery/pkg/runtime/schema"
-       "k8s.io/client-go/dynamic"
        "sigs.k8s.io/controller-runtime/pkg/client"
 )
 
@@ -81,41 +78,3 @@ status:
                assert.Equal(t, "hello.groovy", 
integration.Spec.Sources[0].Name)
        })
 }
-
-func TestV1Alpha1Compatibility(t *testing.T) {
-       WithNewTestNamespace(t, func(ns string) {
-
-               data := `
-apiVersion: camel.apache.org/v1alpha1
-kind: Integration
-metadata:
-  name: example
-  namespace: ` + ns + `
-spec:
-  sources:
-  - name: hello.groovy
-`
-
-               obj, err := kubernetes.LoadRawResourceFromYaml(data)
-               assert.Nil(t, err)
-               dynClient, err := dynamic.NewForConfig(TestClient.GetConfig())
-               assert.Nil(t, err)
-
-               obj, err = dynClient.Resource(schema.GroupVersionResource{
-                       Group: "camel.apache.org",
-                       // Using old v1alpha1 version for testing
-                       Version:  "v1alpha1",
-                       Resource: "integrations",
-               }).Namespace(ns).Create(obj.(*unstructured.Unstructured), 
metav1.CreateOptions{})
-               assert.Nil(t, err)
-
-               integration := v1.NewIntegration(ns, "example")
-               key, err := client.ObjectKeyFromObject(&integration)
-               assert.Nil(t, err)
-
-               err = TestClient.Get(TestContext, key, &integration)
-               assert.Nil(t, err)
-               assert.Equal(t, 1, len(integration.Spec.Sources))
-               assert.Equal(t, "hello.groovy", 
integration.Spec.Sources[0].Name)
-       })
-}

Reply via email to