You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2019/12/19 09:50:00 UTC
[camel-k] 01/10: Fix #921: initial migration to v1 API
This is an automated email from the ASF dual-hosted git repository.
lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 187cda2a624e92cd6df1df3418af54b75fb7cb4a
Author: Nicola Ferraro <ni...@gmail.com>
AuthorDate: Wed Dec 18 16:42:55 2019 +0100
Fix #921: initial migration to v1 API
---
assets/json-schema/CamelCatalog.json | 141 +-------------------
assets/json-schema/Integration.json | 144 ++-------------------
assets/json-schema/IntegrationKit.json | 141 +-------------------
cmd/util/doc-gen/generators/traitdocgen.go | 4 +-
cmd/util/json-schema-gen/jsonschemagen.go | 10 +-
deploy/camel-catalog-3.0.0-1.0.8.yaml | 2 +-
deploy/camel-catalog-quarkus-1.0.0-M1-1.0.8.yaml | 2 +-
deploy/cr-example.yaml | 2 +-
deploy/crd-build.yaml | 8 +-
deploy/crd-camel-catalog.yaml | 8 +-
deploy/crd-integration-kit.yaml | 8 +-
deploy/crd-integration-platform.yaml | 8 +-
deploy/crd-integration.yaml | 10 +-
deploy/platform-cr.yaml | 2 +-
deploy/platform-integration-kit-groovy.yaml | 2 +-
deploy/platform-integration-kit-java.yaml | 2 +-
deploy/platform-integration-kit-js.yaml | 2 +-
deploy/platform-integration-kit-knative.yaml | 2 +-
deploy/platform-integration-kit-kotlin.yaml | 2 +-
deploy/platform-integration-kit-main.yaml | 2 +-
deploy/platform-integration-kit-xml.yaml | 2 +-
deploy/platform-integration-kit-yaml.yaml | 2 +-
deploy/resources.go | 58 ++++++---
e2e/backward_compat_test.go | 8 +-
e2e/build_test.go | 6 +-
e2e/client_test.go | 10 +-
e2e/knative_platform_test.go | 26 ++--
e2e/platformless_run_test.go | 8 +-
e2e/test_support.go | 92 ++++++-------
go.sum | 1 +
...e_camel_v1alpha1.go => addtoscheme_camel_v1.go} | 4 +-
pkg/apis/camel/{v1alpha1 => v1}/build_types.go | 11 +-
.../camel/{v1alpha1 => v1}/build_types_support.go | 2 +-
.../camel/{v1alpha1 => v1}/camelcatalog_types.go | 2 +-
.../{v1alpha1 => v1}/camelcatalog_types_support.go | 2 +-
pkg/apis/camel/{v1alpha1 => v1}/common_types.go | 2 +-
.../camel/{v1alpha1 => v1}/common_types_support.go | 2 +-
pkg/apis/camel/{v1alpha1 => v1}/doc.go | 4 +-
.../camel/{v1alpha1 => v1}/integration_types.go | 2 +-
.../{v1alpha1 => v1}/integration_types_support.go | 2 +-
.../integration_types_support_test.go | 2 +-
.../camel/{v1alpha1 => v1}/integrationkit_types.go | 2 +-
.../integrationkit_types_support.go | 2 +-
.../{v1alpha1 => v1}/integrationplatform_types.go | 2 +-
.../integrationplatform_types_support.go | 2 +-
pkg/apis/camel/{v1alpha1 => v1}/knative/types.go | 0
.../{v1alpha1 => v1}/knative/types_support.go | 0
pkg/apis/camel/{v1alpha1 => v1}/register.go | 6 +-
.../{v1alpha1 => v1}/zz_generated.deepcopy.go | 16 +--
.../{v1alpha1 => v1}/zz_generated.defaults.go | 2 +-
pkg/builder/builder.go | 22 ++--
pkg/builder/builder_steps.go | 14 +-
pkg/builder/builder_steps_test.go | 38 +++---
pkg/builder/builder_test.go | 6 +-
pkg/builder/builder_types.go | 12 +-
pkg/builder/builder_utils.go | 4 +-
pkg/builder/runtime/main.go | 6 +-
pkg/builder/runtime/main_test.go | 10 +-
pkg/builder/runtime/quarkus.go | 8 +-
pkg/client/clientset/versioned/clientset.go | 25 ++--
.../versioned/fake/clientset_generated.go | 10 +-
pkg/client/clientset/versioned/fake/register.go | 4 +-
pkg/client/clientset/versioned/scheme/register.go | 4 +-
.../typed/camel/{v1alpha1 => v1}/build.go | 56 ++++----
.../typed/camel/{v1alpha1 => v1}/camel_client.go | 38 +++---
.../versioned/typed/camel/{v1alpha1 => v1}/doc.go | 2 +-
.../typed/camel/{v1alpha1 => v1}/fake/doc.go | 0
.../camel/{v1alpha1 => v1}/fake/fake_build.go | 50 +++----
.../{v1alpha1 => v1}/fake/fake_camel_client.go | 14 +-
.../{v1alpha1 => v1}/fake/fake_integration.go | 50 +++----
.../{v1alpha1 => v1}/fake/fake_integrationkit.go | 50 +++----
.../fake/fake_integrationplatform.go | 50 +++----
.../camel/{v1alpha1 => v1}/generated_expansion.go | 2 +-
.../typed/camel/{v1alpha1 => v1}/integration.go | 56 ++++----
.../typed/camel/{v1alpha1 => v1}/integrationkit.go | 56 ++++----
.../camel/{v1alpha1 => v1}/integrationplatform.go | 56 ++++----
.../informers/externalversions/camel/interface.go | 12 +-
.../camel/{v1alpha1 => v1}/build.go | 26 ++--
.../camel/{v1alpha1 => v1}/integration.go | 26 ++--
.../camel/{v1alpha1 => v1}/integrationkit.go | 26 ++--
.../camel/{v1alpha1 => v1}/integrationplatform.go | 26 ++--
.../camel/{v1alpha1 => v1}/interface.go | 2 +-
pkg/client/informers/externalversions/generic.go | 20 +--
pkg/client/listers/camel/{v1alpha1 => v1}/build.go | 24 ++--
.../camel/{v1alpha1 => v1}/expansion_generated.go | 2 +-
.../listers/camel/{v1alpha1 => v1}/integration.go | 24 ++--
.../camel/{v1alpha1 => v1}/integrationkit.go | 24 ++--
.../camel/{v1alpha1 => v1}/integrationplatform.go | 24 ++--
pkg/cmd/builder/builder.go | 10 +-
pkg/cmd/completion_bash.go | 4 +-
pkg/cmd/delete.go | 8 +-
pkg/cmd/describe.go | 4 +-
pkg/cmd/describe_integration.go | 6 +-
pkg/cmd/describe_kit.go | 6 +-
pkg/cmd/describe_platform.go | 14 +-
pkg/cmd/get.go | 6 +-
pkg/cmd/install.go | 38 +++---
pkg/cmd/install_test.go | 4 +-
pkg/cmd/kit_create.go | 28 ++--
pkg/cmd/kit_delete.go | 10 +-
pkg/cmd/kit_get.go | 16 +--
pkg/cmd/log.go | 8 +-
pkg/cmd/rebuild.go | 18 +--
pkg/cmd/reset.go | 10 +-
pkg/cmd/run.go | 50 +++----
pkg/cmd/util.go | 8 +-
pkg/controller/build/action.go | 6 +-
pkg/controller/build/build_controller.go | 30 ++---
pkg/controller/build/error.go | 8 +-
pkg/controller/build/initialize_pod.go | 18 +--
pkg/controller/build/initialize_routine.go | 10 +-
pkg/controller/build/monitor_pod.go | 16 +--
pkg/controller/build/monitor_routine.go | 12 +-
pkg/controller/build/recovery.go | 16 +--
pkg/controller/build/schedule_pod.go | 22 ++--
pkg/controller/build/schedule_routine.go | 30 ++---
pkg/controller/integration/action.go | 6 +-
pkg/controller/integration/build_kit.go | 32 ++---
pkg/controller/integration/deploy.go | 10 +-
pkg/controller/integration/error.go | 10 +-
pkg/controller/integration/initialize.go | 16 +--
.../integration/integration_controller.go | 32 ++---
pkg/controller/integration/monitor.go | 12 +-
pkg/controller/integration/platform_setup.go | 10 +-
pkg/controller/integration/util.go | 14 +-
pkg/controller/integration/util_test.go | 114 ++++++++--------
pkg/controller/integrationkit/action.go | 6 +-
pkg/controller/integrationkit/build.go | 58 ++++-----
pkg/controller/integrationkit/error.go | 10 +-
pkg/controller/integrationkit/initialize.go | 12 +-
.../integrationkit/integrationkit_controller.go | 40 +++---
pkg/controller/integrationkit/monitor.go | 10 +-
pkg/controller/integrationplatform/action.go | 6 +-
pkg/controller/integrationplatform/create.go | 10 +-
pkg/controller/integrationplatform/create_test.go | 10 +-
pkg/controller/integrationplatform/initialize.go | 24 ++--
.../integrationplatform/initialize_test.go | 26 ++--
.../integrationplatform_controller.go | 14 +-
pkg/controller/integrationplatform/kaniko_cache.go | 4 +-
pkg/controller/integrationplatform/monitor.go | 8 +-
pkg/controller/integrationplatform/warm.go | 10 +-
pkg/controller/integrationplatform/warm_test.go | 20 +--
pkg/install/cluster.go | 2 +-
pkg/install/common.go | 12 +-
pkg/install/operator.go | 14 +-
pkg/metadata/http.go | 14 +-
pkg/metadata/metadata.go | 10 +-
pkg/metadata/metadata_dependencies_test.go | 122 ++++++++---------
pkg/metadata/metadata_http_test.go | 70 +++++-----
pkg/metadata/metadata_uri_test.go | 50 +++----
pkg/platform/defaults.go | 40 +++---
pkg/platform/platform.go | 40 +++---
pkg/trait/affinity.go | 4 +-
pkg/trait/affinity_test.go | 8 +-
pkg/trait/builder.go | 22 ++--
pkg/trait/builder_test.go | 38 +++---
pkg/trait/camel.go | 4 +-
pkg/trait/camel_test.go | 10 +-
pkg/trait/classpath.go | 10 +-
pkg/trait/classpath_test.go | 30 ++---
pkg/trait/container.go | 10 +-
pkg/trait/container_test.go | 60 ++++-----
pkg/trait/debug.go | 4 +-
pkg/trait/debug_test.go | 24 ++--
pkg/trait/dependencies.go | 16 +--
pkg/trait/dependencies_test.go | 70 +++++-----
pkg/trait/deployer.go | 16 +--
pkg/trait/deployment.go | 36 +++---
pkg/trait/deployment_test.go | 42 +++---
pkg/trait/environment.go | 4 +-
pkg/trait/environment_test.go | 72 +++++------
pkg/trait/gc.go | 10 +-
pkg/trait/gc_test.go | 10 +-
pkg/trait/ingress.go | 20 +--
pkg/trait/ingress_test.go | 12 +-
pkg/trait/istio.go | 4 +-
pkg/trait/istio_test.go | 20 +--
pkg/trait/jolokia.go | 14 +-
pkg/trait/jolokia_test.go | 24 ++--
pkg/trait/knative.go | 26 ++--
pkg/trait/knative_service.go | 34 ++---
pkg/trait/knative_service_test.go | 76 +++++------
pkg/trait/knative_test.go | 80 ++++++------
pkg/trait/owner.go | 4 +-
pkg/trait/owner_test.go | 6 +-
pkg/trait/platform.go | 16 +--
pkg/trait/platform_test.go | 48 +++----
pkg/trait/probes.go | 22 ++--
pkg/trait/probes_test.go | 20 +--
pkg/trait/prometheus.go | 16 +--
pkg/trait/prometheus_test.go | 18 +--
pkg/trait/pull_secret.go | 14 +-
pkg/trait/pull_secret_test.go | 28 ++--
pkg/trait/quarkus.go | 20 +--
pkg/trait/rest-dsl.go | 20 +--
pkg/trait/rest-dsl_test.go | 14 +-
pkg/trait/route.go | 16 +--
pkg/trait/route_test.go | 36 +++---
pkg/trait/service.go | 16 +--
pkg/trait/service_test.go | 104 +++++++--------
pkg/trait/trait.go | 6 +-
pkg/trait/trait_catalog.go | 12 +-
pkg/trait/trait_test.go | 84 ++++++------
pkg/trait/trait_types.go | 28 ++--
pkg/trait/util.go | 12 +-
pkg/trait/util_test.go | 38 +++---
pkg/util/camel/camel_runtime.go | 6 +-
pkg/util/camel/camel_runtime_catalog.go | 18 +--
pkg/util/camel/camel_types.go | 4 +-
pkg/util/camel/camel_util.go | 10 +-
pkg/util/camel/camel_util_test.go | 100 +++++++-------
pkg/util/camel/catalog.go | 14 +-
pkg/util/digest/digest.go | 8 +-
pkg/util/knative/apis.go | 2 +-
pkg/util/knative/apis_test.go | 2 +-
pkg/util/knative/uri.go | 2 +-
pkg/util/knative/uri_test.go | 2 +-
pkg/util/kubernetes/collection.go | 10 +-
pkg/util/kubernetes/customclient/customclient.go | 6 +-
pkg/util/kubernetes/log/util.go | 4 +-
pkg/util/kubernetes/resolver.go | 16 +--
pkg/util/kubernetes/util.go | 20 +--
pkg/util/log/log.go | 16 +--
pkg/util/source/inspector.go | 22 ++--
pkg/util/source/inspector_groovy.go | 4 +-
pkg/util/source/inspector_java_script.go | 4 +-
pkg/util/source/inspector_java_source.go | 4 +-
pkg/util/source/inspector_kotlin.go | 4 +-
pkg/util/source/inspector_xml.go | 4 +-
pkg/util/source/inspector_yaml.go | 4 +-
pkg/util/watch/watch.go | 20 +--
script/gen_client.sh | 6 +-
232 files changed, 2187 insertions(+), 2508 deletions(-)
diff --git a/assets/json-schema/CamelCatalog.json b/assets/json-schema/CamelCatalog.json
index 56b0b5a..87aab60 100644
--- a/assets/json-schema/CamelCatalog.json
+++ b/assets/json-schema/CamelCatalog.json
@@ -107,10 +107,6 @@
"generation": {
"type": "integer"
},
- "initializers": {
- "$schema": "http://json-schema.org/draft-04/schema#",
- "$ref": "#/definitions/Initializers"
- },
"kind": {
"type": "string"
},
@@ -217,52 +213,7 @@
"additionalProperties": false,
"type": "object"
},
- "Fields": {
- "required": [
- "Map"
- ],
- "properties": {
- "Map": {
- "patternProperties": {
- ".*": {
- "$ref": "#/definitions/Fields"
- }
- },
- "type": "object"
- }
- },
- "additionalProperties": false,
- "type": "object"
- },
- "Initializer": {
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "type": "object"
- },
- "Initializers": {
- "required": [
- "pending"
- ],
- "properties": {
- "pending": {
- "items": {
- "$schema": "http://json-schema.org/draft-04/schema#",
- "$ref": "#/definitions/Initializer"
- },
- "type": "array"
- },
- "result": {
- "$schema": "http://json-schema.org/draft-04/schema#",
- "$ref": "#/definitions/Status"
- }
- },
+ "FieldsV1": {
"additionalProperties": false,
"type": "object"
},
@@ -271,9 +222,12 @@
"apiVersion": {
"type": "string"
},
- "fields": {
+ "fieldsType": {
+ "type": "string"
+ },
+ "fieldsV1": {
"$schema": "http://json-schema.org/draft-04/schema#",
- "$ref": "#/definitions/Fields"
+ "$ref": "#/definitions/FieldsV1"
},
"manager": {
"type": "string"
@@ -340,89 +294,6 @@
"additionalProperties": false,
"type": "object"
},
- "Status": {
- "properties": {
- "apiVersion": {
- "type": "string"
- },
- "code": {
- "type": "integer"
- },
- "continue": {
- "type": "string"
- },
- "details": {
- "$schema": "http://json-schema.org/draft-04/schema#",
- "$ref": "#/definitions/StatusDetails"
- },
- "kind": {
- "type": "string"
- },
- "message": {
- "type": "string"
- },
- "reason": {
- "type": "string"
- },
- "remainingItemCount": {
- "type": "integer"
- },
- "resourceVersion": {
- "type": "string"
- },
- "selfLink": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "type": "object"
- },
- "StatusCause": {
- "properties": {
- "field": {
- "type": "string"
- },
- "message": {
- "type": "string"
- },
- "reason": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "type": "object"
- },
- "StatusDetails": {
- "properties": {
- "causes": {
- "items": {
- "$schema": "http://json-schema.org/draft-04/schema#",
- "$ref": "#/definitions/StatusCause"
- },
- "type": "array"
- },
- "group": {
- "type": "string"
- },
- "kind": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "retryAfterSeconds": {
- "type": "integer"
- },
- "uid": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "type": "object"
- },
"Time": {
"additionalProperties": false,
"type": "object"
diff --git a/assets/json-schema/Integration.json b/assets/json-schema/Integration.json
index 0df80fe..399f4a5 100644
--- a/assets/json-schema/Integration.json
+++ b/assets/json-schema/Integration.json
@@ -59,52 +59,7 @@
"additionalProperties": false,
"type": "object"
},
- "Fields": {
- "required": [
- "Map"
- ],
- "properties": {
- "Map": {
- "patternProperties": {
- ".*": {
- "$ref": "#/definitions/Fields"
- }
- },
- "type": "object"
- }
- },
- "additionalProperties": false,
- "type": "object"
- },
- "Initializer": {
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "type": "object"
- },
- "Initializers": {
- "required": [
- "pending"
- ],
- "properties": {
- "pending": {
- "items": {
- "$schema": "http://json-schema.org/draft-04/schema#",
- "$ref": "#/definitions/Initializer"
- },
- "type": "array"
- },
- "result": {
- "$schema": "http://json-schema.org/draft-04/schema#",
- "$ref": "#/definitions/Status"
- }
- },
+ "FieldsV1": {
"additionalProperties": false,
"type": "object"
},
@@ -146,10 +101,6 @@
"generation": {
"type": "integer"
},
- "initializers": {
- "$schema": "http://json-schema.org/draft-04/schema#",
- "$ref": "#/definitions/Initializers"
- },
"kind": {
"type": "string"
},
@@ -339,6 +290,9 @@
"platform": {
"type": "string"
},
+ "profile": {
+ "type": "string"
+ },
"replicas": {
"type": "integer"
},
@@ -361,9 +315,12 @@
"apiVersion": {
"type": "string"
},
- "fields": {
+ "fieldsType": {
+ "type": "string"
+ },
+ "fieldsV1": {
"$schema": "http://json-schema.org/draft-04/schema#",
- "$ref": "#/definitions/Fields"
+ "$ref": "#/definitions/FieldsV1"
},
"manager": {
"type": "string"
@@ -484,89 +441,6 @@
"additionalProperties": false,
"type": "object"
},
- "Status": {
- "properties": {
- "apiVersion": {
- "type": "string"
- },
- "code": {
- "type": "integer"
- },
- "continue": {
- "type": "string"
- },
- "details": {
- "$schema": "http://json-schema.org/draft-04/schema#",
- "$ref": "#/definitions/StatusDetails"
- },
- "kind": {
- "type": "string"
- },
- "message": {
- "type": "string"
- },
- "reason": {
- "type": "string"
- },
- "remainingItemCount": {
- "type": "integer"
- },
- "resourceVersion": {
- "type": "string"
- },
- "selfLink": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "type": "object"
- },
- "StatusCause": {
- "properties": {
- "field": {
- "type": "string"
- },
- "message": {
- "type": "string"
- },
- "reason": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "type": "object"
- },
- "StatusDetails": {
- "properties": {
- "causes": {
- "items": {
- "$schema": "http://json-schema.org/draft-04/schema#",
- "$ref": "#/definitions/StatusCause"
- },
- "type": "array"
- },
- "group": {
- "type": "string"
- },
- "kind": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "retryAfterSeconds": {
- "type": "integer"
- },
- "uid": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "type": "object"
- },
"Time": {
"additionalProperties": false,
"type": "object"
diff --git a/assets/json-schema/IntegrationKit.json b/assets/json-schema/IntegrationKit.json
index 576b537..73306b9 100644
--- a/assets/json-schema/IntegrationKit.json
+++ b/assets/json-schema/IntegrationKit.json
@@ -77,52 +77,7 @@
"additionalProperties": false,
"type": "object"
},
- "Fields": {
- "required": [
- "Map"
- ],
- "properties": {
- "Map": {
- "patternProperties": {
- ".*": {
- "$ref": "#/definitions/Fields"
- }
- },
- "type": "object"
- }
- },
- "additionalProperties": false,
- "type": "object"
- },
- "Initializer": {
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "type": "object"
- },
- "Initializers": {
- "required": [
- "pending"
- ],
- "properties": {
- "pending": {
- "items": {
- "$schema": "http://json-schema.org/draft-04/schema#",
- "$ref": "#/definitions/Initializer"
- },
- "type": "array"
- },
- "result": {
- "$schema": "http://json-schema.org/draft-04/schema#",
- "$ref": "#/definitions/Status"
- }
- },
+ "FieldsV1": {
"additionalProperties": false,
"type": "object"
},
@@ -164,10 +119,6 @@
"generation": {
"type": "integer"
},
- "initializers": {
- "$schema": "http://json-schema.org/draft-04/schema#",
- "$ref": "#/definitions/Initializers"
- },
"kind": {
"type": "string"
},
@@ -345,9 +296,12 @@
"apiVersion": {
"type": "string"
},
- "fields": {
+ "fieldsType": {
+ "type": "string"
+ },
+ "fieldsV1": {
"$schema": "http://json-schema.org/draft-04/schema#",
- "$ref": "#/definitions/Fields"
+ "$ref": "#/definitions/FieldsV1"
},
"manager": {
"type": "string"
@@ -414,89 +368,6 @@
"additionalProperties": false,
"type": "object"
},
- "Status": {
- "properties": {
- "apiVersion": {
- "type": "string"
- },
- "code": {
- "type": "integer"
- },
- "continue": {
- "type": "string"
- },
- "details": {
- "$schema": "http://json-schema.org/draft-04/schema#",
- "$ref": "#/definitions/StatusDetails"
- },
- "kind": {
- "type": "string"
- },
- "message": {
- "type": "string"
- },
- "reason": {
- "type": "string"
- },
- "remainingItemCount": {
- "type": "integer"
- },
- "resourceVersion": {
- "type": "string"
- },
- "selfLink": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "type": "object"
- },
- "StatusCause": {
- "properties": {
- "field": {
- "type": "string"
- },
- "message": {
- "type": "string"
- },
- "reason": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "type": "object"
- },
- "StatusDetails": {
- "properties": {
- "causes": {
- "items": {
- "$schema": "http://json-schema.org/draft-04/schema#",
- "$ref": "#/definitions/StatusCause"
- },
- "type": "array"
- },
- "group": {
- "type": "string"
- },
- "kind": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "retryAfterSeconds": {
- "type": "integer"
- },
- "uid": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "type": "object"
- },
"Time": {
"additionalProperties": false,
"type": "object"
diff --git a/cmd/util/doc-gen/generators/traitdocgen.go b/cmd/util/doc-gen/generators/traitdocgen.go
index c113dd7..498f00b 100644
--- a/cmd/util/doc-gen/generators/traitdocgen.go
+++ b/cmd/util/doc-gen/generators/traitdocgen.go
@@ -29,7 +29,7 @@ import (
"sort"
"strings"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/trait"
"k8s.io/gengo/args"
"k8s.io/gengo/generator"
@@ -343,7 +343,7 @@ func determineProfiles(traitID string) (profiles []string) {
defer cancel()
catalog := trait.NewCatalog(ctx, nil)
- for _, p := range v1alpha1.AllTraitProfiles {
+ for _, p := range v1.AllTraitProfiles {
traits := catalog.TraitsForProfile(p)
for _, t := range traits {
if string(t.ID()) == traitID {
diff --git a/cmd/util/json-schema-gen/jsonschemagen.go b/cmd/util/json-schema-gen/jsonschemagen.go
index 7a10089..e8713d6 100644
--- a/cmd/util/json-schema-gen/jsonschemagen.go
+++ b/cmd/util/json-schema-gen/jsonschemagen.go
@@ -26,16 +26,16 @@ import (
"reflect"
"github.com/alecthomas/jsonschema"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/spf13/cobra"
)
func main() {
sources := []interface{}{
- v1alpha1.Integration{},
- v1alpha1.IntegrationKit{},
- //v1alpha1.IntegrationPlatform{},
- v1alpha1.CamelCatalog{},
+ v1.Integration{},
+ v1.IntegrationKit{},
+ //v1.IntegrationPlatform{},
+ v1.CamelCatalog{},
}
var out string
diff --git a/deploy/camel-catalog-3.0.0-1.0.8.yaml b/deploy/camel-catalog-3.0.0-1.0.8.yaml
index 907c00f..963f485 100644
--- a/deploy/camel-catalog-3.0.0-1.0.8.yaml
+++ b/deploy/camel-catalog-3.0.0-1.0.8.yaml
@@ -15,7 +15,7 @@
# limitations under the License.
# ---------------------------------------------------------------------------
-apiVersion: camel.apache.org/v1alpha1
+apiVersion: camel.apache.org/v1
kind: CamelCatalog
metadata:
name: camel-catalog-3.0.0-1.0.8
diff --git a/deploy/camel-catalog-quarkus-1.0.0-M1-1.0.8.yaml b/deploy/camel-catalog-quarkus-1.0.0-M1-1.0.8.yaml
index 5bb4396..d77a638 100644
--- a/deploy/camel-catalog-quarkus-1.0.0-M1-1.0.8.yaml
+++ b/deploy/camel-catalog-quarkus-1.0.0-M1-1.0.8.yaml
@@ -15,7 +15,7 @@
# limitations under the License.
# ---------------------------------------------------------------------------
-apiVersion: camel.apache.org/v1alpha1
+apiVersion: camel.apache.org/v1
kind: CamelCatalog
metadata:
name: camel-catalog-quarkus-1.0.0-m1-1.0.8
diff --git a/deploy/cr-example.yaml b/deploy/cr-example.yaml
index 775734d..da01fde 100644
--- a/deploy/cr-example.yaml
+++ b/deploy/cr-example.yaml
@@ -15,7 +15,7 @@
# limitations under the License.
# ---------------------------------------------------------------------------
-apiVersion: camel.apache.org/v1alpha1
+apiVersion: camel.apache.org/v1
kind: Integration
metadata:
name: example
diff --git a/deploy/crd-build.yaml b/deploy/crd-build.yaml
index 9f89296..73404d3 100644
--- a/deploy/crd-build.yaml
+++ b/deploy/crd-build.yaml
@@ -24,7 +24,13 @@ metadata:
spec:
group: camel.apache.org
scope: Namespaced
- version: v1alpha1
+ versions:
+ - name: v1alpha1
+ served: true
+ storage: false
+ - name: v1
+ served: true
+ storage: true
names:
kind: Build
listKind: BuildList
diff --git a/deploy/crd-camel-catalog.yaml b/deploy/crd-camel-catalog.yaml
index b57a08f..512042c 100644
--- a/deploy/crd-camel-catalog.yaml
+++ b/deploy/crd-camel-catalog.yaml
@@ -31,7 +31,13 @@ spec:
shortNames:
- cc
scope: Namespaced
- version: v1alpha1
+ versions:
+ - name: v1alpha1
+ served: true
+ storage: false
+ - name: v1
+ served: true
+ storage: true
subresources:
status: {}
additionalPrinterColumns:
diff --git a/deploy/crd-integration-kit.yaml b/deploy/crd-integration-kit.yaml
index 04f3e81..c8ccac5 100644
--- a/deploy/crd-integration-kit.yaml
+++ b/deploy/crd-integration-kit.yaml
@@ -24,7 +24,13 @@ metadata:
spec:
group: camel.apache.org
scope: Namespaced
- version: v1alpha1
+ versions:
+ - name: v1alpha1
+ served: true
+ storage: false
+ - name: v1
+ served: true
+ storage: true
subresources:
status: {}
names:
diff --git a/deploy/crd-integration-platform.yaml b/deploy/crd-integration-platform.yaml
index 532ad86..8f8e30b 100644
--- a/deploy/crd-integration-platform.yaml
+++ b/deploy/crd-integration-platform.yaml
@@ -24,7 +24,13 @@ metadata:
spec:
group: camel.apache.org
scope: Namespaced
- version: v1alpha1
+ versions:
+ - name: v1alpha1
+ served: true
+ storage: false
+ - name: v1
+ served: true
+ storage: true
subresources:
status: {}
names:
diff --git a/deploy/crd-integration.yaml b/deploy/crd-integration.yaml
index be9f64f..c22703c 100644
--- a/deploy/crd-integration.yaml
+++ b/deploy/crd-integration.yaml
@@ -24,7 +24,13 @@ metadata:
spec:
group: camel.apache.org
scope: Namespaced
- version: v1alpha1
+ versions:
+ - name: v1alpha1
+ served: true
+ storage: false
+ - name: v1
+ served: true
+ storage: true
subresources:
status: {}
scale:
@@ -36,7 +42,7 @@ spec:
plural: integrations
singular: integration
shortNames:
- - it
+ - it
additionalPrinterColumns:
- name: Phase
type: string
diff --git a/deploy/platform-cr.yaml b/deploy/platform-cr.yaml
index 911fa8f..e5e793a 100644
--- a/deploy/platform-cr.yaml
+++ b/deploy/platform-cr.yaml
@@ -15,7 +15,7 @@
# limitations under the License.
# ---------------------------------------------------------------------------
-apiVersion: camel.apache.org/v1alpha1
+apiVersion: camel.apache.org/v1
kind: IntegrationPlatform
metadata:
name: camel-k
diff --git a/deploy/platform-integration-kit-groovy.yaml b/deploy/platform-integration-kit-groovy.yaml
index 534520d..f8e40f3 100644
--- a/deploy/platform-integration-kit-groovy.yaml
+++ b/deploy/platform-integration-kit-groovy.yaml
@@ -15,7 +15,7 @@
# limitations under the License.
# ---------------------------------------------------------------------------
-apiVersion: camel.apache.org/v1alpha1
+apiVersion: camel.apache.org/v1
kind: IntegrationKit
metadata:
name: groovy
diff --git a/deploy/platform-integration-kit-java.yaml b/deploy/platform-integration-kit-java.yaml
index 8c16690..c9f9752 100644
--- a/deploy/platform-integration-kit-java.yaml
+++ b/deploy/platform-integration-kit-java.yaml
@@ -15,7 +15,7 @@
# limitations under the License.
# ---------------------------------------------------------------------------
-apiVersion: camel.apache.org/v1alpha1
+apiVersion: camel.apache.org/v1
kind: IntegrationKit
metadata:
name: java
diff --git a/deploy/platform-integration-kit-js.yaml b/deploy/platform-integration-kit-js.yaml
index 73f6035..e8dbef2 100644
--- a/deploy/platform-integration-kit-js.yaml
+++ b/deploy/platform-integration-kit-js.yaml
@@ -15,7 +15,7 @@
# limitations under the License.
# ---------------------------------------------------------------------------
-apiVersion: camel.apache.org/v1alpha1
+apiVersion: camel.apache.org/v1
kind: IntegrationKit
metadata:
name: js
diff --git a/deploy/platform-integration-kit-knative.yaml b/deploy/platform-integration-kit-knative.yaml
index f24afe6..972fc8f 100644
--- a/deploy/platform-integration-kit-knative.yaml
+++ b/deploy/platform-integration-kit-knative.yaml
@@ -15,7 +15,7 @@
# limitations under the License.
# ---------------------------------------------------------------------------
-apiVersion: camel.apache.org/v1alpha1
+apiVersion: camel.apache.org/v1
kind: IntegrationKit
metadata:
name: knative
diff --git a/deploy/platform-integration-kit-kotlin.yaml b/deploy/platform-integration-kit-kotlin.yaml
index 6941b10..1be76e4 100644
--- a/deploy/platform-integration-kit-kotlin.yaml
+++ b/deploy/platform-integration-kit-kotlin.yaml
@@ -15,7 +15,7 @@
# limitations under the License.
# ---------------------------------------------------------------------------
-apiVersion: camel.apache.org/v1alpha1
+apiVersion: camel.apache.org/v1
kind: IntegrationKit
metadata:
name: kotlin
diff --git a/deploy/platform-integration-kit-main.yaml b/deploy/platform-integration-kit-main.yaml
index e8e9a46..7a3a6cf 100644
--- a/deploy/platform-integration-kit-main.yaml
+++ b/deploy/platform-integration-kit-main.yaml
@@ -15,7 +15,7 @@
# limitations under the License.
# ---------------------------------------------------------------------------
-apiVersion: camel.apache.org/v1alpha1
+apiVersion: camel.apache.org/v1
kind: IntegrationKit
metadata:
name: main
diff --git a/deploy/platform-integration-kit-xml.yaml b/deploy/platform-integration-kit-xml.yaml
index e9690d4..7e31773 100644
--- a/deploy/platform-integration-kit-xml.yaml
+++ b/deploy/platform-integration-kit-xml.yaml
@@ -15,7 +15,7 @@
# limitations under the License.
# ---------------------------------------------------------------------------
-apiVersion: camel.apache.org/v1alpha1
+apiVersion: camel.apache.org/v1
kind: IntegrationKit
metadata:
name: xml
diff --git a/deploy/platform-integration-kit-yaml.yaml b/deploy/platform-integration-kit-yaml.yaml
index ba4a411..bf223a9 100644
--- a/deploy/platform-integration-kit-yaml.yaml
+++ b/deploy/platform-integration-kit-yaml.yaml
@@ -15,7 +15,7 @@
# limitations under the License.
# ---------------------------------------------------------------------------
-apiVersion: camel.apache.org/v1alpha1
+apiVersion: camel.apache.org/v1
kind: IntegrationKit
metadata:
name: yaml
diff --git a/deploy/resources.go b/deploy/resources.go
index 6fc7c0c..de26ccf 100644
--- a/deploy/resources.go
+++ b/deploy/resources.go
@@ -262,7 +262,7 @@ metadata:
# limitations under the License.
# ---------------------------------------------------------------------------
-apiVersion: camel.apache.org/v1alpha1
+apiVersion: camel.apache.org/v1
kind: CamelCatalog
metadata:
name: camel-catalog-3.0.0-1.0.8
@@ -3185,7 +3185,7 @@ spec:
# limitations under the License.
# ---------------------------------------------------------------------------
-apiVersion: camel.apache.org/v1alpha1
+apiVersion: camel.apache.org/v1
kind: CamelCatalog
metadata:
name: camel-catalog-quarkus-1.0.0-m1-1.0.8
@@ -3883,7 +3883,13 @@ spec:
shortNames:
- cc
scope: Namespaced
- version: v1alpha1
+ versions:
+ - name: v1alpha1
+ served: true
+ storage: false
+ - name: v1
+ served: true
+ storage: true
subresources:
status: {}
additionalPrinterColumns:
@@ -3926,7 +3932,13 @@ metadata:
spec:
group: camel.apache.org
scope: Namespaced
- version: v1alpha1
+ versions:
+ - name: v1alpha1
+ served: true
+ storage: false
+ - name: v1
+ served: true
+ storage: true
subresources:
status: {}
names:
@@ -3979,7 +3991,13 @@ metadata:
spec:
group: camel.apache.org
scope: Namespaced
- version: v1alpha1
+ versions:
+ - name: v1alpha1
+ served: true
+ storage: false
+ - name: v1
+ served: true
+ storage: true
subresources:
status: {}
names:
@@ -4024,7 +4042,13 @@ metadata:
spec:
group: camel.apache.org
scope: Namespaced
- version: v1alpha1
+ versions:
+ - name: v1alpha1
+ served: true
+ storage: false
+ - name: v1
+ served: true
+ storage: true
subresources:
status: {}
scale:
@@ -4036,7 +4060,7 @@ spec:
plural: integrations
singular: integration
shortNames:
- - it
+ - it
additionalPrinterColumns:
- name: Phase
type: string
@@ -4071,7 +4095,7 @@ spec:
# limitations under the License.
# ---------------------------------------------------------------------------
-apiVersion: camel.apache.org/v1alpha1
+apiVersion: camel.apache.org/v1
kind: Integration
metadata:
name: example
@@ -4808,7 +4832,7 @@ metadata:
# limitations under the License.
# ---------------------------------------------------------------------------
-apiVersion: camel.apache.org/v1alpha1
+apiVersion: camel.apache.org/v1
kind: IntegrationPlatform
metadata:
name: camel-k
@@ -4835,7 +4859,7 @@ metadata:
# limitations under the License.
# ---------------------------------------------------------------------------
-apiVersion: camel.apache.org/v1alpha1
+apiVersion: camel.apache.org/v1
kind: IntegrationKit
metadata:
name: groovy
@@ -4868,7 +4892,7 @@ spec:
# limitations under the License.
# ---------------------------------------------------------------------------
-apiVersion: camel.apache.org/v1alpha1
+apiVersion: camel.apache.org/v1
kind: IntegrationKit
metadata:
name: java
@@ -4901,7 +4925,7 @@ spec:
# limitations under the License.
# ---------------------------------------------------------------------------
-apiVersion: camel.apache.org/v1alpha1
+apiVersion: camel.apache.org/v1
kind: IntegrationKit
metadata:
name: js
@@ -4934,7 +4958,7 @@ spec:
# limitations under the License.
# ---------------------------------------------------------------------------
-apiVersion: camel.apache.org/v1alpha1
+apiVersion: camel.apache.org/v1
kind: IntegrationKit
metadata:
name: knative
@@ -4967,7 +4991,7 @@ spec:
# limitations under the License.
# ---------------------------------------------------------------------------
-apiVersion: camel.apache.org/v1alpha1
+apiVersion: camel.apache.org/v1
kind: IntegrationKit
metadata:
name: kotlin
@@ -5000,7 +5024,7 @@ spec:
# limitations under the License.
# ---------------------------------------------------------------------------
-apiVersion: camel.apache.org/v1alpha1
+apiVersion: camel.apache.org/v1
kind: IntegrationKit
metadata:
name: main
@@ -5032,7 +5056,7 @@ spec:
# limitations under the License.
# ---------------------------------------------------------------------------
-apiVersion: camel.apache.org/v1alpha1
+apiVersion: camel.apache.org/v1
kind: IntegrationKit
metadata:
name: xml
@@ -5065,7 +5089,7 @@ spec:
# limitations under the License.
# ---------------------------------------------------------------------------
-apiVersion: camel.apache.org/v1alpha1
+apiVersion: camel.apache.org/v1
kind: IntegrationKit
metadata:
name: yaml
diff --git a/e2e/backward_compat_test.go b/e2e/backward_compat_test.go
index 2cd35c6..dc38bec 100644
--- a/e2e/backward_compat_test.go
+++ b/e2e/backward_compat_test.go
@@ -24,7 +24,7 @@ package e2e
import (
"testing"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/util/kubernetes"
"github.com/stretchr/testify/assert"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
@@ -35,7 +35,7 @@ func TestBackwardCompatibility(t *testing.T) {
withNewTestNamespace(t, func(ns string) {
data := `
-apiVersion: ` + v1alpha1.SchemeGroupVersion.String() + `
+apiVersion: ` + v1.SchemeGroupVersion.String() + `
kind: Integration
metadata:
name: example
@@ -54,14 +54,14 @@ status:
err = testClient.Create(testContext, obj)
assert.Nil(t, err)
- integration := v1alpha1.NewIntegration(ns, "example")
+ integration := v1.NewIntegration(ns, "example")
key, err := client.ObjectKeyFromObject(&integration)
assert.Nil(t, err)
unstr := unstructured.Unstructured{
Object: map[string]interface{}{
"kind": "Integration",
- "apiVersion": v1alpha1.SchemeGroupVersion.String(),
+ "apiVersion": v1.SchemeGroupVersion.String(),
},
}
err = testClient.Get(testContext, key, &unstr)
diff --git a/e2e/build_test.go b/e2e/build_test.go
index 1e8fd54..0c10ba7 100644
--- a/e2e/build_test.go
+++ b/e2e/build_test.go
@@ -25,7 +25,7 @@ import (
"testing"
"time"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
. "github.com/onsi/gomega"
)
@@ -65,8 +65,8 @@ func doNamedKitFullBuild(t *testing.T, name string) {
withNewTestNamespace(t, func(ns string) {
Expect(kamel("install", "-n", ns, "--kit", name).Execute()).Should(BeNil())
Eventually(build(ns, name)).ShouldNot(BeNil())
- Eventually(func() v1alpha1.BuildPhase {
+ Eventually(func() v1.BuildPhase {
return build(ns, name)().Status.Phase
- }, 5*time.Minute).Should(Equal(v1alpha1.BuildPhaseSucceeded))
+ }, 5*time.Minute).Should(Equal(v1.BuildPhaseSucceeded))
})
}
diff --git a/e2e/client_test.go b/e2e/client_test.go
index 912233b..239507c 100644
--- a/e2e/client_test.go
+++ b/e2e/client_test.go
@@ -24,7 +24,7 @@ package e2e
import (
"testing"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/client/clientset/versioned"
"github.com/stretchr/testify/assert"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -38,23 +38,23 @@ func TestClientFunctionalities(t *testing.T) {
camel, err := versioned.NewForConfig(cfg)
assert.Nil(t, err)
- lst, err := camel.CamelV1alpha1().Integrations(ns).List(metav1.ListOptions{})
+ lst, err := camel.CamelV1().Integrations(ns).List(metav1.ListOptions{})
assert.Nil(t, err)
assert.Empty(t, lst.Items)
- integration, err := camel.CamelV1alpha1().Integrations(ns).Create(&v1alpha1.Integration{
+ integration, err := camel.CamelV1().Integrations(ns).Create(&v1.Integration{
ObjectMeta: metav1.ObjectMeta{
Name: "dummy",
},
})
assert.Nil(t, err)
- lst, err = camel.CamelV1alpha1().Integrations(ns).List(metav1.ListOptions{})
+ lst, err = camel.CamelV1().Integrations(ns).List(metav1.ListOptions{})
assert.Nil(t, err)
assert.NotEmpty(t, lst.Items)
assert.Equal(t, lst.Items[0].Name, integration.Name)
- err = camel.CamelV1alpha1().Integrations(ns).Delete("dummy", nil)
+ err = camel.CamelV1().Integrations(ns).Delete("dummy", nil)
assert.Nil(t, err)
})
}
diff --git a/e2e/knative_platform_test.go b/e2e/knative_platform_test.go
index 94fa691..8b90522 100644
--- a/e2e/knative_platform_test.go
+++ b/e2e/knative_platform_test.go
@@ -26,10 +26,10 @@ import (
"testing"
"time"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/util/knative"
. "github.com/onsi/gomega"
- v1 "k8s.io/api/core/v1"
+ corev1 "k8s.io/api/core/v1"
)
func TestKnativePlatformTest(t *testing.T) {
@@ -40,28 +40,28 @@ func TestKnativePlatformTest(t *testing.T) {
}
Expect(kamel("install", "-n", ns).Execute()).Should(BeNil())
- Eventually(platformPhase(ns), 5*time.Minute).Should(Equal(v1alpha1.IntegrationPlatformPhaseReady))
- Eventually(platformProfile(ns), 1*time.Minute).Should(Equal(v1alpha1.TraitProfile("")))
+ Eventually(platformPhase(ns), 5*time.Minute).Should(Equal(v1.IntegrationPlatformPhaseReady))
+ Eventually(platformProfile(ns), 1*time.Minute).Should(Equal(v1.TraitProfile("")))
cluster := platform(ns)().Status.Cluster
t.Run("run yaml on cluster profile", func(t *testing.T) {
RegisterTestingT(t)
Expect(kamel("run", "-n", ns, "files/yaml.yaml", "--profile", string(cluster)).Execute()).Should(BeNil())
- Eventually(integrationPodPhase(ns, "yaml"), 5*time.Minute).Should(Equal(v1.PodRunning))
+ Eventually(integrationPodPhase(ns, "yaml"), 5*time.Minute).Should(Equal(corev1.PodRunning))
Eventually(integrationLogs(ns, "yaml"), 1*time.Minute).Should(ContainSubstring("Magicstring!"))
- Eventually(integrationProfile(ns, "yaml"), 1*time.Minute).Should(Equal(v1alpha1.TraitProfile(string(cluster))))
+ Eventually(integrationProfile(ns, "yaml"), 1*time.Minute).Should(Equal(v1.TraitProfile(string(cluster))))
// Change something in the integration to produce a redeploy
- Expect(updateIntegration(ns, "yaml", func(it *v1alpha1.Integration) {
- it.Spec.Profile = v1alpha1.TraitProfile("")
+ Expect(updateIntegration(ns, "yaml", func(it *v1.Integration) {
+ it.Spec.Profile = v1.TraitProfile("")
it.Spec.Sources[0].Content = strings.ReplaceAll(it.Spec.Sources[0].Content, "string!", "string!!!")
})).To(BeNil())
// Spec profile should be reset by "kamel run"
- Eventually(integrationSpecProfile(ns, "yaml")).Should(Equal(v1alpha1.TraitProfile("")))
+ Eventually(integrationSpecProfile(ns, "yaml")).Should(Equal(v1.TraitProfile("")))
// When integration is running again ...
- Eventually(integrationPhase(ns, "yaml")).Should(Equal(v1alpha1.IntegrationPhaseRunning))
+ Eventually(integrationPhase(ns, "yaml")).Should(Equal(v1.IntegrationPhaseRunning))
Eventually(integrationLogs(ns, "yaml"), 1*time.Minute).Should(ContainSubstring("Magicstring!!!"))
// It should keep the old profile saved in status
- Eventually(integrationProfile(ns, "yaml"), 5*time.Minute).Should(Equal(v1alpha1.TraitProfile(string(cluster))))
+ Eventually(integrationProfile(ns, "yaml"), 5*time.Minute).Should(Equal(v1.TraitProfile(string(cluster))))
Expect(kamel("delete", "--all", "-n", ns).Execute()).Should(BeNil())
})
@@ -69,8 +69,8 @@ func TestKnativePlatformTest(t *testing.T) {
t.Run("run yaml on automatic profile", func(t *testing.T) {
RegisterTestingT(t)
Expect(kamel("run", "-n", ns, "files/yaml.yaml").Execute()).Should(BeNil())
- Eventually(integrationPodPhase(ns, "yaml"), 5*time.Minute).Should(Equal(v1.PodRunning))
- Eventually(integrationProfile(ns, "yaml"), 1*time.Minute).Should(Equal(v1alpha1.TraitProfileKnative))
+ Eventually(integrationPodPhase(ns, "yaml"), 5*time.Minute).Should(Equal(corev1.PodRunning))
+ Eventually(integrationProfile(ns, "yaml"), 1*time.Minute).Should(Equal(v1.TraitProfileKnative))
Expect(kamel("delete", "--all", "-n", ns).Execute()).Should(BeNil())
})
diff --git a/e2e/platformless_run_test.go b/e2e/platformless_run_test.go
index 605d9fa..28213b9 100644
--- a/e2e/platformless_run_test.go
+++ b/e2e/platformless_run_test.go
@@ -26,11 +26,11 @@ import (
"testing"
"time"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/util/openshift"
. "github.com/onsi/gomega"
"github.com/stretchr/testify/assert"
- v1 "k8s.io/api/core/v1"
+ corev1 "k8s.io/api/core/v1"
)
func TestPlatformlessRun(t *testing.T) {
@@ -49,12 +49,12 @@ func TestPlatformlessRun(t *testing.T) {
Eventually(deletePlatform(ns)).Should(BeTrue())
Expect(kamel("run", "-n", ns, "files/yaml.yaml").Execute()).Should(BeNil())
- Eventually(integrationPodPhase(ns, "yaml"), 5*time.Minute).Should(Equal(v1.PodRunning))
+ Eventually(integrationPodPhase(ns, "yaml"), 5*time.Minute).Should(Equal(corev1.PodRunning))
Eventually(integrationLogs(ns, "yaml"), 1*time.Minute).Should(ContainSubstring("Magicstring!"))
// Platform should be recreated
Eventually(platform(ns)).ShouldNot(BeNil())
- Eventually(platformProfile(ns)).Should(Equal(v1alpha1.TraitProfile("")))
+ Eventually(platformProfile(ns)).Should(Equal(v1.TraitProfile("")))
Expect(kamel("delete", "--all", "-n", ns).Execute()).Should(BeNil())
})
}
diff --git a/e2e/test_support.go b/e2e/test_support.go
index 0426b3c..b8852bd 100644
--- a/e2e/test_support.go
+++ b/e2e/test_support.go
@@ -33,7 +33,7 @@ import (
"time"
"github.com/apache/camel-k/e2e/util"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/client"
"github.com/apache/camel-k/pkg/cmd"
"github.com/apache/camel-k/pkg/install"
@@ -46,7 +46,7 @@ import (
"github.com/operator-framework/operator-sdk/pkg/k8sutil"
"github.com/spf13/cobra"
appsv1 "k8s.io/api/apps/v1"
- v1 "k8s.io/api/core/v1"
+ corev1 "k8s.io/api/core/v1"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
@@ -152,7 +152,7 @@ func integrationLogs(ns string, name string) func() string {
containerName = pod.Spec.Containers[0].Name
}
tail := int64(100)
- logOptions := v1.PodLogOptions{
+ logOptions := corev1.PodLogOptions{
Follow: false,
Container: containerName,
TailLines: &tail,
@@ -177,8 +177,8 @@ func integrationLogs(ns string, name string) func() string {
}
}
-func integrationPodPhase(ns string, name string) func() v1.PodPhase {
- return func() v1.PodPhase {
+func integrationPodPhase(ns string, name string) func() corev1.PodPhase {
+ return func() corev1.PodPhase {
pod := integrationPod(ns, name)()
if pod == nil {
return ""
@@ -197,9 +197,9 @@ func integrationPodImage(ns string, name string) func() string {
}
}
-func integrationPod(ns string, name string) func() *v1.Pod {
- return func() *v1.Pod {
- lst := v1.PodList{
+func integrationPod(ns string, name string) func() *corev1.Pod {
+ return func() *corev1.Pod {
+ lst := corev1.PodList{
TypeMeta: metav1.TypeMeta{
Kind: "Pod",
APIVersion: v1.SchemeGroupVersion.String(),
@@ -220,9 +220,9 @@ func integrationPod(ns string, name string) func() *v1.Pod {
}
}
-func integration(ns string, name string) func() *v1alpha1.Integration {
- return func() *v1alpha1.Integration {
- it := v1alpha1.NewIntegration(ns, name)
+func integration(ns string, name string) func() *v1.Integration {
+ return func() *v1.Integration {
+ it := v1.NewIntegration(ns, name)
key := k8sclient.ObjectKey{
Namespace: ns,
Name: name,
@@ -246,8 +246,8 @@ func integrationVersion(ns string, name string) func() string {
}
}
-func integrationProfile(ns string, name string) func() v1alpha1.TraitProfile {
- return func() v1alpha1.TraitProfile {
+func integrationProfile(ns string, name string) func() v1.TraitProfile {
+ return func() v1.TraitProfile {
it := integration(ns, name)()
if it == nil {
return ""
@@ -256,8 +256,8 @@ func integrationProfile(ns string, name string) func() v1alpha1.TraitProfile {
}
}
-func integrationPhase(ns string, name string) func() v1alpha1.IntegrationPhase {
- return func() v1alpha1.IntegrationPhase {
+func integrationPhase(ns string, name string) func() v1.IntegrationPhase {
+ return func() v1.IntegrationPhase {
it := integration(ns, name)()
if it == nil {
return ""
@@ -266,8 +266,8 @@ func integrationPhase(ns string, name string) func() v1alpha1.IntegrationPhase {
}
}
-func integrationSpecProfile(ns string, name string) func() v1alpha1.TraitProfile {
- return func() v1alpha1.TraitProfile {
+func integrationSpecProfile(ns string, name string) func() v1.TraitProfile {
+ return func() v1.TraitProfile {
it := integration(ns, name)()
if it == nil {
return ""
@@ -285,7 +285,7 @@ func setIntegrationVersion(ns string, name string, version string) error {
return testClient.Status().Update(testContext, it)
}
-func updateIntegration(ns string, name string, upd func(it *v1alpha1.Integration)) error {
+func updateIntegration(ns string, name string, upd func(it *v1.Integration)) error {
it := integration(ns, name)()
if it == nil {
return fmt.Errorf("no integration named %s found", name)
@@ -294,9 +294,9 @@ func updateIntegration(ns string, name string, upd func(it *v1alpha1.Integration
return testClient.Update(testContext, it)
}
-func kits(ns string) func() []v1alpha1.IntegrationKit {
- return func() []v1alpha1.IntegrationKit {
- lst := v1alpha1.NewIntegrationKitList()
+func kits(ns string) func() []v1.IntegrationKit {
+ return func() []v1.IntegrationKit {
+ lst := v1.NewIntegrationKitList()
if err := testClient.List(testContext, &lst, k8sclient.InNamespace(ns)); err != nil {
panic(err)
}
@@ -339,8 +339,8 @@ func operatorImage(ns string) func() string {
}
}
-func operatorPodPhase(ns string) func() v1.PodPhase {
- return func() v1.PodPhase {
+func operatorPodPhase(ns string) func() corev1.PodPhase {
+ return func() corev1.PodPhase {
pod := operatorPod(ns)()
if pod == nil {
return ""
@@ -349,9 +349,9 @@ func operatorPodPhase(ns string) func() v1.PodPhase {
}
}
-func configmap(ns string, name string) func() *v1.ConfigMap {
- return func() *v1.ConfigMap {
- cm := v1.ConfigMap{
+func configmap(ns string, name string) func() *corev1.ConfigMap {
+ return func() *corev1.ConfigMap {
+ cm := corev1.ConfigMap{
TypeMeta: metav1.TypeMeta{
Kind: "ConfigMap",
APIVersion: metav1.SchemeGroupVersion.String(),
@@ -375,9 +375,9 @@ func configmap(ns string, name string) func() *v1.ConfigMap {
}
}
-func build(ns string, name string) func() *v1alpha1.Build {
- return func() *v1alpha1.Build {
- build := v1alpha1.NewBuild(ns, name)
+func build(ns string, name string) func() *v1.Build {
+ return func() *v1.Build {
+ build := v1.NewBuild(ns, name)
key := k8sclient.ObjectKey{
Namespace: ns,
Name: name,
@@ -392,9 +392,9 @@ func build(ns string, name string) func() *v1alpha1.Build {
}
}
-func platform(ns string) func() *v1alpha1.IntegrationPlatform {
- return func() *v1alpha1.IntegrationPlatform {
- lst := v1alpha1.NewIntegrationPlatformList()
+func platform(ns string) func() *v1.IntegrationPlatform {
+ return func() *v1.IntegrationPlatform {
+ lst := v1.NewIntegrationPlatformList()
if err := testClient.List(testContext, &lst, k8sclient.InNamespace(ns)); err != nil {
panic(err)
}
@@ -441,8 +441,8 @@ func platformVersion(ns string) func() string {
}
}
-func platformPhase(ns string) func() v1alpha1.IntegrationPlatformPhase {
- return func() v1alpha1.IntegrationPlatformPhase {
+func platformPhase(ns string) func() v1.IntegrationPlatformPhase {
+ return func() v1.IntegrationPlatformPhase {
p := platform(ns)()
if p == nil {
return ""
@@ -451,8 +451,8 @@ func platformPhase(ns string) func() v1alpha1.IntegrationPlatformPhase {
}
}
-func platformProfile(ns string) func() v1alpha1.TraitProfile {
- return func() v1alpha1.TraitProfile {
+func platformProfile(ns string) func() v1.TraitProfile {
+ return func() v1.TraitProfile {
p := platform(ns)()
if p == nil {
return ""
@@ -461,9 +461,9 @@ func platformProfile(ns string) func() v1alpha1.TraitProfile {
}
}
-func operatorPod(ns string) func() *v1.Pod {
- return func() *v1.Pod {
- lst := v1.PodList{
+func operatorPod(ns string) func() *corev1.Pod {
+ return func() *corev1.Pod {
+ lst := corev1.PodList{
TypeMeta: metav1.TypeMeta{
Kind: "Pod",
APIVersion: v1.SchemeGroupVersion.String(),
@@ -558,7 +558,7 @@ func createKamelPod(ns string, name string, command ...string) error {
for _, hook := range kamelHooks {
args = hook(args)
}
- pod := v1.Pod{
+ pod := corev1.Pod{
TypeMeta: metav1.TypeMeta{
Kind: "Pod",
APIVersion: v1.SchemeGroupVersion.String(),
@@ -567,10 +567,10 @@ func createKamelPod(ns string, name string, command ...string) error {
Namespace: ns,
Name: name,
},
- Spec: v1.PodSpec{
+ Spec: corev1.PodSpec{
ServiceAccountName: "camel-k-operator",
- RestartPolicy: v1.RestartPolicyNever,
- Containers: []v1.Container{
+ RestartPolicy: corev1.RestartPolicyNever,
+ Containers: []corev1.Container{
{
Name: "kamel-runner",
Image: testImageName + ":" + testImageVersion,
@@ -608,7 +608,7 @@ func createKnativeChannel(ns string, name string) func() error {
func numPods(ns string) func() int {
return func() int {
- lst := v1.PodList{
+ lst := corev1.PodList{
TypeMeta: metav1.TypeMeta{
Kind: "Pod",
APIVersion: v1.SchemeGroupVersion.String(),
@@ -654,7 +654,7 @@ func invokeUserTestCode(t *testing.T, ns string, doRun func(string)) {
}
func deleteKnativeBroker(ns metav1.Object) {
- nsRef := v1.Namespace{
+ nsRef := corev1.Namespace{
TypeMeta: metav1.TypeMeta{
APIVersion: v1.SchemeGroupVersion.String(),
Kind: "Namespace",
@@ -738,7 +738,7 @@ func newTestNamespace(injectKnativeBroker bool) metav1.Object {
},
}
} else {
- obj = &v1.Namespace{
+ obj = &corev1.Namespace{
TypeMeta: metav1.TypeMeta{
APIVersion: "v1",
Kind: "Namespace",
diff --git a/go.sum b/go.sum
index 3e3c0a6..ba7786f 100644
--- a/go.sum
+++ b/go.sum
@@ -880,6 +880,7 @@ k8s.io/client-go v0.0.0-20191016111102-bec269661e48 h1:C2XVy2z0dV94q9hSSoCuTPp1K
k8s.io/client-go v0.0.0-20191016111102-bec269661e48/go.mod h1:hrwktSwYGI4JK+TJA3dMaFyyvHVi/aLarVHpbs8bgCU=
k8s.io/cloud-provider v0.0.0-20191016115326-20453efc2458/go.mod h1:O5SO5xcgxrjJV9EC9R/47RuBpbk5YX9URDBlg++FA5o=
k8s.io/cluster-bootstrap v0.0.0-20191016115129-c07a134afb42/go.mod h1:MzCL6kLExQuHruGaqibd8cugC8nw8QRxm3+lzR5l8SI=
+k8s.io/code-generator v0.0.0-20191004115455-8e001e5d1894 h1:NMYlxaF7rYQJk2E2IyrUhaX81zX24+dmoZdkPw0gJqI=
k8s.io/code-generator v0.0.0-20191004115455-8e001e5d1894/go.mod h1:mJUgkl06XV4kstAnLHAIzJPVCOzVR+ZcfPIv4fUsFCY=
k8s.io/component-base v0.0.0-20191016111319-039242c015a9/go.mod h1:SuWowIgd/dtU/m/iv8OD9eOxp3QZBBhTIiWMsBQvKjI=
k8s.io/cri-api v0.0.0-20190828162817-608eb1dad4ac/go.mod h1:BvtUaNBr0fEpzb11OfrQiJLsLPtqbmulpo1fPwcpP6Q=
diff --git a/pkg/apis/addtoscheme_camel_v1alpha1.go b/pkg/apis/addtoscheme_camel_v1.go
similarity index 87%
rename from pkg/apis/addtoscheme_camel_v1alpha1.go
rename to pkg/apis/addtoscheme_camel_v1.go
index 001d778..3e0afbb 100644
--- a/pkg/apis/addtoscheme_camel_v1alpha1.go
+++ b/pkg/apis/addtoscheme_camel_v1.go
@@ -18,10 +18,10 @@ limitations under the License.
package apis
import (
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
)
func init() {
// Register the types with the Scheme so the components can map objects to GroupVersionKinds and back
- AddToSchemes = append(AddToSchemes, v1alpha1.SchemeBuilder.AddToScheme)
+ AddToSchemes = append(AddToSchemes, v1.SchemeBuilder.AddToScheme)
}
diff --git a/pkg/apis/camel/v1alpha1/build_types.go b/pkg/apis/camel/v1/build_types.go
similarity index 98%
rename from pkg/apis/camel/v1alpha1/build_types.go
rename to pkg/apis/camel/v1/build_types.go
index b721036..c2d2756 100644
--- a/pkg/apis/camel/v1alpha1/build_types.go
+++ b/pkg/apis/camel/v1/build_types.go
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package v1alpha1
+package v1
import (
corev1 "k8s.io/api/core/v1"
@@ -32,12 +32,13 @@ type BuildSpec struct {
Tasks []Task `json:"tasks,omitempty"`
}
+// Task --
type Task struct {
Builder *BuilderTask `json:"builder,omitempty"`
Kaniko *KanikoTask `json:"kaniko,omitempty"`
}
-// BaseTask
+// BaseTask --
type BaseTask struct {
Name string `json:"name,omitempty"`
Affinity *corev1.Affinity `json:"affinity,omitempty"`
@@ -45,7 +46,7 @@ type BaseTask struct {
VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
}
-// ImageTask
+// ImageTask --
type ImageTask struct {
BaseTask `json:",inline"`
Image string `json:"image,omitempty"`
@@ -53,13 +54,13 @@ type ImageTask struct {
Env []corev1.EnvVar `json:"env,omitempty"`
}
-// KanikoTask
+// KanikoTask --
type KanikoTask struct {
ImageTask `json:",inline"`
BuiltImage string `json:"builtImage,omitempty"`
}
-// BuilderTask
+// BuilderTask --
type BuilderTask struct {
BaseTask `json:",inline"`
Meta metav1.ObjectMeta `json:"meta,omitempty"`
diff --git a/pkg/apis/camel/v1alpha1/build_types_support.go b/pkg/apis/camel/v1/build_types_support.go
similarity index 99%
rename from pkg/apis/camel/v1alpha1/build_types_support.go
rename to pkg/apis/camel/v1/build_types_support.go
index 4fb40b7..85bc405 100644
--- a/pkg/apis/camel/v1alpha1/build_types_support.go
+++ b/pkg/apis/camel/v1/build_types_support.go
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package v1alpha1
+package v1
import (
corev1 "k8s.io/api/core/v1"
diff --git a/pkg/apis/camel/v1alpha1/camelcatalog_types.go b/pkg/apis/camel/v1/camelcatalog_types.go
similarity index 99%
rename from pkg/apis/camel/v1alpha1/camelcatalog_types.go
rename to pkg/apis/camel/v1/camelcatalog_types.go
index 3ae6999..1c5556e 100644
--- a/pkg/apis/camel/v1alpha1/camelcatalog_types.go
+++ b/pkg/apis/camel/v1/camelcatalog_types.go
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package v1alpha1
+package v1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
diff --git a/pkg/apis/camel/v1alpha1/camelcatalog_types_support.go b/pkg/apis/camel/v1/camelcatalog_types_support.go
similarity index 99%
rename from pkg/apis/camel/v1alpha1/camelcatalog_types_support.go
rename to pkg/apis/camel/v1/camelcatalog_types_support.go
index d30986f..7ee6ee8 100644
--- a/pkg/apis/camel/v1alpha1/camelcatalog_types_support.go
+++ b/pkg/apis/camel/v1/camelcatalog_types_support.go
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package v1alpha1
+package v1
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
diff --git a/pkg/apis/camel/v1alpha1/common_types.go b/pkg/apis/camel/v1/common_types.go
similarity index 99%
rename from pkg/apis/camel/v1alpha1/common_types.go
rename to pkg/apis/camel/v1/common_types.go
index c3472f6..661a57f 100644
--- a/pkg/apis/camel/v1alpha1/common_types.go
+++ b/pkg/apis/camel/v1/common_types.go
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package v1alpha1
+package v1
import (
corev1 "k8s.io/api/core/v1"
diff --git a/pkg/apis/camel/v1alpha1/common_types_support.go b/pkg/apis/camel/v1/common_types_support.go
similarity index 98%
rename from pkg/apis/camel/v1alpha1/common_types_support.go
rename to pkg/apis/camel/v1/common_types_support.go
index b09ee3f..05db9e5 100644
--- a/pkg/apis/camel/v1alpha1/common_types_support.go
+++ b/pkg/apis/camel/v1/common_types_support.go
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package v1alpha1
+package v1
import (
"fmt"
diff --git a/pkg/apis/camel/v1alpha1/doc.go b/pkg/apis/camel/v1/doc.go
similarity index 89%
rename from pkg/apis/camel/v1alpha1/doc.go
rename to pkg/apis/camel/v1/doc.go
index c9e1c78..452afb3 100644
--- a/pkg/apis/camel/v1alpha1/doc.go
+++ b/pkg/apis/camel/v1/doc.go
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-// Package v1alpha1 contains API Schema definitions for the camel v1alpha1 API group
+// Package v1 contains API Schema definitions for the camel v1 API group
// +k8s:deepcopy-gen=package,register
// +groupName=camel.apache.org
-package v1alpha1
+package v1
diff --git a/pkg/apis/camel/v1alpha1/integration_types.go b/pkg/apis/camel/v1/integration_types.go
similarity index 99%
rename from pkg/apis/camel/v1alpha1/integration_types.go
rename to pkg/apis/camel/v1/integration_types.go
index 42fa045..dcb2739 100644
--- a/pkg/apis/camel/v1alpha1/integration_types.go
+++ b/pkg/apis/camel/v1/integration_types.go
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package v1alpha1
+package v1
import (
corev1 "k8s.io/api/core/v1"
diff --git a/pkg/apis/camel/v1alpha1/integration_types_support.go b/pkg/apis/camel/v1/integration_types_support.go
similarity index 99%
rename from pkg/apis/camel/v1alpha1/integration_types_support.go
rename to pkg/apis/camel/v1/integration_types_support.go
index 0f4891e..f723884 100644
--- a/pkg/apis/camel/v1alpha1/integration_types_support.go
+++ b/pkg/apis/camel/v1/integration_types_support.go
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package v1alpha1
+package v1
import (
"strings"
diff --git a/pkg/apis/camel/v1alpha1/integration_types_support_test.go b/pkg/apis/camel/v1/integration_types_support_test.go
similarity index 99%
rename from pkg/apis/camel/v1alpha1/integration_types_support_test.go
rename to pkg/apis/camel/v1/integration_types_support_test.go
index 101012f..82320a0 100644
--- a/pkg/apis/camel/v1alpha1/integration_types_support_test.go
+++ b/pkg/apis/camel/v1/integration_types_support_test.go
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package v1alpha1
+package v1
import (
"fmt"
diff --git a/pkg/apis/camel/v1alpha1/integrationkit_types.go b/pkg/apis/camel/v1/integrationkit_types.go
similarity index 99%
rename from pkg/apis/camel/v1alpha1/integrationkit_types.go
rename to pkg/apis/camel/v1/integrationkit_types.go
index 3e2e11e..5f3c046 100644
--- a/pkg/apis/camel/v1alpha1/integrationkit_types.go
+++ b/pkg/apis/camel/v1/integrationkit_types.go
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package v1alpha1
+package v1
import (
corev1 "k8s.io/api/core/v1"
diff --git a/pkg/apis/camel/v1alpha1/integrationkit_types_support.go b/pkg/apis/camel/v1/integrationkit_types_support.go
similarity index 99%
rename from pkg/apis/camel/v1alpha1/integrationkit_types_support.go
rename to pkg/apis/camel/v1/integrationkit_types_support.go
index 770e086..9c78649 100644
--- a/pkg/apis/camel/v1alpha1/integrationkit_types_support.go
+++ b/pkg/apis/camel/v1/integrationkit_types_support.go
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package v1alpha1
+package v1
import (
corev1 "k8s.io/api/core/v1"
diff --git a/pkg/apis/camel/v1alpha1/integrationplatform_types.go b/pkg/apis/camel/v1/integrationplatform_types.go
similarity index 99%
rename from pkg/apis/camel/v1alpha1/integrationplatform_types.go
rename to pkg/apis/camel/v1/integrationplatform_types.go
index e739e58..f0e0212 100644
--- a/pkg/apis/camel/v1alpha1/integrationplatform_types.go
+++ b/pkg/apis/camel/v1/integrationplatform_types.go
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package v1alpha1
+package v1
import (
corev1 "k8s.io/api/core/v1"
diff --git a/pkg/apis/camel/v1alpha1/integrationplatform_types_support.go b/pkg/apis/camel/v1/integrationplatform_types_support.go
similarity index 99%
rename from pkg/apis/camel/v1alpha1/integrationplatform_types_support.go
rename to pkg/apis/camel/v1/integrationplatform_types_support.go
index 64f8209..8a2a806 100644
--- a/pkg/apis/camel/v1alpha1/integrationplatform_types_support.go
+++ b/pkg/apis/camel/v1/integrationplatform_types_support.go
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package v1alpha1
+package v1
import (
"strings"
diff --git a/pkg/apis/camel/v1alpha1/knative/types.go b/pkg/apis/camel/v1/knative/types.go
similarity index 100%
rename from pkg/apis/camel/v1alpha1/knative/types.go
rename to pkg/apis/camel/v1/knative/types.go
diff --git a/pkg/apis/camel/v1alpha1/knative/types_support.go b/pkg/apis/camel/v1/knative/types_support.go
similarity index 100%
rename from pkg/apis/camel/v1alpha1/knative/types_support.go
rename to pkg/apis/camel/v1/knative/types_support.go
diff --git a/pkg/apis/camel/v1alpha1/register.go b/pkg/apis/camel/v1/register.go
similarity index 92%
rename from pkg/apis/camel/v1alpha1/register.go
rename to pkg/apis/camel/v1/register.go
index bd58570..46c8eb6 100644
--- a/pkg/apis/camel/v1alpha1/register.go
+++ b/pkg/apis/camel/v1/register.go
@@ -17,10 +17,10 @@ limitations under the License.
// NOTE: Boilerplate only. Ignore this file.
-// Package v1alpha1 contains API Schema definitions for the camel v1alpha1 API group
+// Package v1 contains API Schema definitions for the camel v1 API group
// +k8s:deepcopy-gen=package,register
// +groupName=camel.apache.org
-package v1alpha1
+package v1
import (
"k8s.io/apimachinery/pkg/runtime/schema"
@@ -29,7 +29,7 @@ import (
var (
// SchemeGroupVersion is group version used to register these objects
- SchemeGroupVersion = schema.GroupVersion{Group: "camel.apache.org", Version: "v1alpha1"}
+ SchemeGroupVersion = schema.GroupVersion{Group: "camel.apache.org", Version: "v1"}
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
diff --git a/pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/camel/v1/zz_generated.deepcopy.go
similarity index 99%
rename from pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go
rename to pkg/apis/camel/v1/zz_generated.deepcopy.go
index 1ecf9f0..9f80a6a 100644
--- a/pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go
+++ b/pkg/apis/camel/v1/zz_generated.deepcopy.go
@@ -2,10 +2,10 @@
// Code generated by operator-sdk. DO NOT EDIT.
-package v1alpha1
+package v1
import (
- v1 "k8s.io/api/core/v1"
+ corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
@@ -31,19 +31,19 @@ func (in *BaseTask) DeepCopyInto(out *BaseTask) {
*out = *in
if in.Affinity != nil {
in, out := &in.Affinity, &out.Affinity
- *out = new(v1.Affinity)
+ *out = new(corev1.Affinity)
(*in).DeepCopyInto(*out)
}
if in.Volumes != nil {
in, out := &in.Volumes, &out.Volumes
- *out = make([]v1.Volume, len(*in))
+ *out = make([]corev1.Volume, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.VolumeMounts != nil {
in, out := &in.VolumeMounts, &out.VolumeMounts
- *out = make([]v1.VolumeMount, len(*in))
+ *out = make([]corev1.VolumeMount, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@@ -524,7 +524,7 @@ func (in *ImageTask) DeepCopyInto(out *ImageTask) {
}
if in.Env != nil {
in, out := &in.Env, &out.Env
- *out = make([]v1.EnvVar, len(*in))
+ *out = make([]corev1.EnvVar, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@@ -1256,12 +1256,12 @@ func (in *ValueSource) DeepCopyInto(out *ValueSource) {
*out = *in
if in.ConfigMapKeyRef != nil {
in, out := &in.ConfigMapKeyRef, &out.ConfigMapKeyRef
- *out = new(v1.ConfigMapKeySelector)
+ *out = new(corev1.ConfigMapKeySelector)
(*in).DeepCopyInto(*out)
}
if in.SecretKeyRef != nil {
in, out := &in.SecretKeyRef, &out.SecretKeyRef
- *out = new(v1.SecretKeySelector)
+ *out = new(corev1.SecretKeySelector)
(*in).DeepCopyInto(*out)
}
return
diff --git a/pkg/apis/camel/v1alpha1/zz_generated.defaults.go b/pkg/apis/camel/v1/zz_generated.defaults.go
similarity index 95%
rename from pkg/apis/camel/v1alpha1/zz_generated.defaults.go
rename to pkg/apis/camel/v1/zz_generated.defaults.go
index 7985166..0b0c84e 100644
--- a/pkg/apis/camel/v1alpha1/zz_generated.defaults.go
+++ b/pkg/apis/camel/v1/zz_generated.defaults.go
@@ -2,7 +2,7 @@
// Code generated by defaulter-gen. DO NOT EDIT.
-package v1alpha1
+package v1
import (
runtime "k8s.io/apimachinery/pkg/runtime"
diff --git a/pkg/builder/builder.go b/pkg/builder/builder.go
index b98173a..debb0d4 100644
--- a/pkg/builder/builder.go
+++ b/pkg/builder/builder.go
@@ -24,7 +24,7 @@ import (
"sort"
"time"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/client"
"github.com/apache/camel-k/pkg/util/cancellable"
"github.com/apache/camel-k/pkg/util/log"
@@ -48,8 +48,8 @@ func New(c client.Client) Builder {
}
// Run --
-func (b *defaultBuilder) Run(build v1alpha1.BuilderTask) v1alpha1.BuildStatus {
- result := v1alpha1.BuildStatus{}
+func (b *defaultBuilder) Run(build v1.BuilderTask) v1.BuildStatus {
+ result := v1.BuildStatus{}
var buildDir string
if build.BuildDir == "" {
@@ -57,7 +57,7 @@ func (b *defaultBuilder) Run(build v1alpha1.BuilderTask) v1alpha1.BuildStatus {
if err != nil {
log.Error(err, "Unexpected error while creating a temporary dir")
- result.Phase = v1alpha1.BuildPhaseFailed
+ result.Phase = v1.BuildPhaseFailed
result.Error = err.Error()
}
buildDir = tmpDir
@@ -80,7 +80,7 @@ func (b *defaultBuilder) Run(build v1alpha1.BuilderTask) v1alpha1.BuildStatus {
// base image is mandatory
if c.BaseImage == "" {
- result.Phase = v1alpha1.BuildPhaseFailed
+ result.Phase = v1.BuildPhaseFailed
result.Image = ""
result.Error = "no base image defined"
}
@@ -107,7 +107,7 @@ func (b *defaultBuilder) Run(build v1alpha1.BuilderTask) v1alpha1.BuildStatus {
})
}
- if result.Phase == v1alpha1.BuildPhaseFailed {
+ if result.Phase == v1.BuildPhaseFailed {
return result
}
@@ -127,13 +127,13 @@ func (b *defaultBuilder) Run(build v1alpha1.BuilderTask) v1alpha1.BuildStatus {
b.log.Infof("steps: %v", steps)
for _, step := range steps {
- if c.Error != nil || result.Phase == v1alpha1.BuildPhaseInterrupted {
+ if c.Error != nil || result.Phase == v1.BuildPhaseInterrupted {
break
}
select {
case <-b.ctx.Done():
- result.Phase = v1alpha1.BuildPhaseInterrupted
+ result.Phase = v1.BuildPhaseInterrupted
default:
l := b.log.WithValues(
"step", step.ID(),
@@ -155,16 +155,16 @@ func (b *defaultBuilder) Run(build v1alpha1.BuilderTask) v1alpha1.BuildStatus {
}
}
- if result.Phase != v1alpha1.BuildPhaseInterrupted {
+ if result.Phase != v1.BuildPhaseInterrupted {
result.BaseImage = c.BaseImage
result.Image = c.Image
if c.Error != nil {
result.Error = c.Error.Error()
- result.Phase = v1alpha1.BuildPhaseFailed
+ result.Phase = v1.BuildPhaseFailed
}
- result.Artifacts = make([]v1alpha1.Artifact, 0, len(c.Artifacts))
+ result.Artifacts = make([]v1.Artifact, 0, len(c.Artifacts))
result.Artifacts = append(result.Artifacts, c.Artifacts...)
b.log.Infof("dependencies: %s", build.Dependencies)
diff --git a/pkg/builder/builder_steps.go b/pkg/builder/builder_steps.go
index fdee0f9..d79adad 100644
--- a/pkg/builder/builder_steps.go
+++ b/pkg/builder/builder_steps.go
@@ -29,7 +29,7 @@ import (
k8sclient "sigs.k8s.io/controller-runtime/pkg/client"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/util/controller"
"github.com/apache/camel-k/pkg/util/kubernetes"
"github.com/apache/camel-k/pkg/util/maven"
@@ -289,7 +289,7 @@ func incrementalPackager(ctx *Context) error {
bestImage, commonLibs := findBestImage(images, ctx.Artifacts)
if bestImage.Image != "" {
- selectedArtifacts := make([]v1alpha1.Artifact, 0)
+ selectedArtifacts := make([]v1.Artifact, 0)
for _, entry := range ctx.Artifacts {
if _, isCommon := commonLibs[entry.ID]; !isCommon {
selectedArtifacts = append(selectedArtifacts, entry)
@@ -360,7 +360,7 @@ func listPublishedImages(context *Context) ([]publishedImage, error) {
options = append(options, controller.MatchingSelector{Selector: selector})
}
- list := v1alpha1.NewIntegrationKitList()
+ list := v1.NewIntegrationKitList()
err := context.Client.List(context.C, &list, options...)
if err != nil {
return nil, err
@@ -370,7 +370,7 @@ func listPublishedImages(context *Context) ([]publishedImage, error) {
for _, item := range list.Items {
kit := item
- if kit.Status.Phase != v1alpha1.IntegrationKitPhaseReady {
+ if kit.Status.Phase != v1.IntegrationKitPhaseReady {
continue
}
if kit.Status.CamelVersion != context.Catalog.Version {
@@ -390,10 +390,10 @@ func listPublishedImages(context *Context) ([]publishedImage, error) {
continue
}
- if kit.Status.Phase != v1alpha1.IntegrationKitPhaseReady || kit.Labels == nil {
+ if kit.Status.Phase != v1.IntegrationKitPhaseReady || kit.Labels == nil {
continue
}
- if kitType, present := kit.Labels["camel.apache.org/kit.type"]; !present || kitType != v1alpha1.IntegrationKitTypePlatform {
+ if kitType, present := kit.Labels["camel.apache.org/kit.type"]; !present || kitType != v1.IntegrationKitTypePlatform {
continue
}
@@ -406,7 +406,7 @@ func listPublishedImages(context *Context) ([]publishedImage, error) {
return images, nil
}
-func findBestImage(images []publishedImage, artifacts []v1alpha1.Artifact) (publishedImage, map[string]bool) {
+func findBestImage(images []publishedImage, artifacts []v1.Artifact) (publishedImage, map[string]bool) {
var bestImage publishedImage
if len(images) == 0 {
diff --git a/pkg/builder/builder_steps_test.go b/pkg/builder/builder_steps_test.go
index b7f6dff..0d6d8b8 100644
--- a/pkg/builder/builder_steps_test.go
+++ b/pkg/builder/builder_steps_test.go
@@ -25,7 +25,7 @@ import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/util/camel"
"github.com/apache/camel-k/pkg/util/cancellable"
"github.com/apache/camel-k/pkg/util/test"
@@ -76,11 +76,11 @@ func TestMavenSettingsFromConfigMap(t *testing.T) {
Catalog: catalog,
Client: c,
Namespace: "ns",
- Build: v1alpha1.BuilderTask{
+ Build: v1.BuilderTask{
RuntimeVersion: catalog.RuntimeVersion,
CamelVersion: catalog.Version,
- Maven: v1alpha1.MavenSpec{
- Settings: v1alpha1.ValueSource{
+ Maven: v1.MavenSpec{
+ Settings: v1.ValueSource{
ConfigMapKeyRef: &corev1.ConfigMapKeySelector{
LocalObjectReference: corev1.LocalObjectReference{
Name: "maven-settings",
@@ -124,11 +124,11 @@ func TestMavenSettingsFromSecret(t *testing.T) {
Catalog: catalog,
Client: c,
Namespace: "ns",
- Build: v1alpha1.BuilderTask{
+ Build: v1.BuilderTask{
RuntimeVersion: catalog.RuntimeVersion,
CamelVersion: catalog.Version,
- Maven: v1alpha1.MavenSpec{
- Settings: v1alpha1.ValueSource{
+ Maven: v1.MavenSpec{
+ Settings: v1.ValueSource{
SecretKeyRef: &corev1.SecretKeySelector{
LocalObjectReference: corev1.LocalObjectReference{
Name: "maven-settings",
@@ -151,39 +151,39 @@ func TestListPublishedImages(t *testing.T) {
assert.Nil(t, err)
c, err := test.NewFakeClient(
- &v1alpha1.IntegrationKit{
+ &v1.IntegrationKit{
TypeMeta: metav1.TypeMeta{
- APIVersion: v1alpha1.SchemeGroupVersion.String(),
- Kind: v1alpha1.IntegrationKindKind,
+ APIVersion: v1.SchemeGroupVersion.String(),
+ Kind: v1.IntegrationKindKind,
},
ObjectMeta: metav1.ObjectMeta{
Namespace: "ns",
Name: "my-kit-1",
Labels: map[string]string{
- "camel.apache.org/kit.type": v1alpha1.IntegrationKitTypePlatform,
+ "camel.apache.org/kit.type": v1.IntegrationKitTypePlatform,
},
},
- Status: v1alpha1.IntegrationKitStatus{
- Phase: v1alpha1.IntegrationKitPhaseError,
+ Status: v1.IntegrationKitStatus{
+ Phase: v1.IntegrationKitPhaseError,
Image: "image-1",
CamelVersion: catalog.Version,
RuntimeVersion: catalog.RuntimeVersion,
},
},
- &v1alpha1.IntegrationKit{
+ &v1.IntegrationKit{
TypeMeta: metav1.TypeMeta{
- APIVersion: v1alpha1.SchemeGroupVersion.String(),
- Kind: v1alpha1.IntegrationKindKind,
+ APIVersion: v1.SchemeGroupVersion.String(),
+ Kind: v1.IntegrationKindKind,
},
ObjectMeta: metav1.ObjectMeta{
Namespace: "ns",
Name: "my-kit-2",
Labels: map[string]string{
- "camel.apache.org/kit.type": v1alpha1.IntegrationKitTypePlatform,
+ "camel.apache.org/kit.type": v1.IntegrationKitTypePlatform,
},
},
- Status: v1alpha1.IntegrationKitStatus{
- Phase: v1alpha1.IntegrationKitPhaseReady,
+ Status: v1.IntegrationKitStatus{
+ Phase: v1.IntegrationKitPhaseReady,
Image: "image-2",
CamelVersion: catalog.Version,
RuntimeVersion: catalog.RuntimeVersion,
diff --git a/pkg/builder/builder_test.go b/pkg/builder/builder_test.go
index f1f90c1..8d85196 100644
--- a/pkg/builder/builder_test.go
+++ b/pkg/builder/builder_test.go
@@ -23,7 +23,7 @@ import (
"github.com/stretchr/testify/assert"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/util/camel"
"github.com/apache/camel-k/pkg/util/test"
)
@@ -53,7 +53,7 @@ func TestFailure(t *testing.T) {
RegisterSteps(steps)
- r := v1alpha1.BuilderTask{
+ r := v1.BuilderTask{
Steps: StepIDsFor(
steps.Step1,
steps.Step2,
@@ -63,5 +63,5 @@ func TestFailure(t *testing.T) {
}
status := b.Run(r)
- assert.Equal(t, v1alpha1.BuildPhaseFailed, status.Phase)
+ assert.Equal(t, v1.BuildPhaseFailed, status.Phase)
}
diff --git a/pkg/builder/builder_types.go b/pkg/builder/builder_types.go
index a497d79..4b58e93 100644
--- a/pkg/builder/builder_types.go
+++ b/pkg/builder/builder_types.go
@@ -21,7 +21,7 @@ import (
"fmt"
"math"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/client"
"github.com/apache/camel-k/pkg/util/camel"
"github.com/apache/camel-k/pkg/util/cancellable"
@@ -45,7 +45,7 @@ const (
// Builder --
type Builder interface {
- Run(build v1alpha1.BuilderTask) v1alpha1.BuildStatus
+ Run(build v1.BuilderTask) v1.BuildStatus
}
// Step --
@@ -101,14 +101,14 @@ type Context struct {
client.Client
C cancellable.Context
Catalog *camel.RuntimeCatalog
- Build v1alpha1.BuilderTask
+ Build v1.BuilderTask
BaseImage string
Image string
Error error
Namespace string
Path string
- Artifacts []v1alpha1.Artifact
- SelectedArtifacts []v1alpha1.Artifact
+ Artifacts []v1.Artifact
+ SelectedArtifacts []v1.Artifact
Archive string
Resources []Resource
@@ -125,6 +125,6 @@ func (c *Context) HasRequiredImage() bool {
type publishedImage struct {
Image string
- Artifacts []v1alpha1.Artifact
+ Artifacts []v1.Artifact
Dependencies []string
}
diff --git a/pkg/builder/builder_utils.go b/pkg/builder/builder_utils.go
index 5098e5a..7583709 100644
--- a/pkg/builder/builder_utils.go
+++ b/pkg/builder/builder_utils.go
@@ -18,7 +18,7 @@ limitations under the License.
package builder
import (
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
)
// StepIDsFor --
@@ -30,7 +30,7 @@ func StepIDsFor(steps ...Step) []string {
return IDs
}
-func artifactIDs(artifacts []v1alpha1.Artifact) []string {
+func artifactIDs(artifacts []v1.Artifact) []string {
result := make([]string, 0, len(artifacts))
for _, a := range artifacts {
diff --git a/pkg/builder/runtime/main.go b/pkg/builder/runtime/main.go
index c210819..104e46c 100644
--- a/pkg/builder/runtime/main.go
+++ b/pkg/builder/runtime/main.go
@@ -26,7 +26,7 @@ import (
yaml2 "gopkg.in/yaml.v2"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/builder"
"github.com/apache/camel-k/pkg/util/camel"
"github.com/apache/camel-k/pkg/util/defaults"
@@ -100,7 +100,7 @@ func computeDependencies(ctx *builder.Context) error {
return err
}
- cp := make(map[string][]v1alpha1.Artifact)
+ cp := make(map[string][]v1.Artifact)
err = yaml2.Unmarshal(content, &cp)
if err != nil {
return err
@@ -114,7 +114,7 @@ func computeDependencies(ctx *builder.Context) error {
return nil
}
- ctx.Artifacts = append(ctx.Artifacts, v1alpha1.Artifact{
+ ctx.Artifacts = append(ctx.Artifacts, v1.Artifact{
ID: e.ID,
Location: e.Location,
Target: path.Join("dependencies", gav.GroupID+"."+fileName),
diff --git a/pkg/builder/runtime/main_test.go b/pkg/builder/runtime/main_test.go
index 4c26360..5a5ca6e 100644
--- a/pkg/builder/runtime/main_test.go
+++ b/pkg/builder/runtime/main_test.go
@@ -22,7 +22,7 @@ import (
"github.com/stretchr/testify/assert"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/builder"
"github.com/apache/camel-k/pkg/util/camel"
"github.com/apache/camel-k/pkg/util/maven"
@@ -34,7 +34,7 @@ func TestNewProject(t *testing.T) {
ctx := builder.Context{
Catalog: catalog,
- Build: v1alpha1.BuilderTask{
+ Build: v1.BuilderTask{
CamelVersion: catalog.Version,
RuntimeVersion: catalog.RuntimeVersion,
Dependencies: []string{
@@ -92,7 +92,7 @@ func TestGenerateJvmProject(t *testing.T) {
ctx := builder.Context{
Catalog: catalog,
- Build: v1alpha1.BuilderTask{
+ Build: v1.BuilderTask{
CamelVersion: catalog.Version,
RuntimeVersion: catalog.RuntimeVersion,
Dependencies: []string{
@@ -144,7 +144,7 @@ func TestGenerateGroovyProject(t *testing.T) {
ctx := builder.Context{
Catalog: catalog,
- Build: v1alpha1.BuilderTask{
+ Build: v1.BuilderTask{
CamelVersion: catalog.Version,
RuntimeVersion: catalog.RuntimeVersion,
Dependencies: []string{
@@ -200,7 +200,7 @@ func TestSanitizeDependencies(t *testing.T) {
ctx := builder.Context{
Catalog: catalog,
- Build: v1alpha1.BuilderTask{
+ Build: v1.BuilderTask{
CamelVersion: catalog.Version,
RuntimeVersion: catalog.RuntimeVersion,
Dependencies: []string{
diff --git a/pkg/builder/runtime/quarkus.go b/pkg/builder/runtime/quarkus.go
index 5e94ba4..f521836 100644
--- a/pkg/builder/runtime/quarkus.go
+++ b/pkg/builder/runtime/quarkus.go
@@ -27,7 +27,7 @@ import (
"github.com/pkg/errors"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/builder"
"github.com/apache/camel-k/pkg/util/camel"
"github.com/apache/camel-k/pkg/util/defaults"
@@ -138,7 +138,7 @@ func computeQuarkusDependencies(ctx *builder.Context) error {
return err
}
- cp := make(map[string][]v1alpha1.Artifact)
+ cp := make(map[string][]v1.Artifact)
err = yaml2.Unmarshal(content, &cp)
if err != nil {
return err
@@ -158,7 +158,7 @@ func computeQuarkusDependencies(ctx *builder.Context) error {
continue
}
- ctx.Artifacts = append(ctx.Artifacts, v1alpha1.Artifact{
+ ctx.Artifacts = append(ctx.Artifacts, v1.Artifact{
ID: gav.GroupID + ":" + gav.ArtifactID + ":" + gav.Type + ":" + gav.Version,
Location: location,
Target: path.Join("lib", fileName),
@@ -166,7 +166,7 @@ func computeQuarkusDependencies(ctx *builder.Context) error {
}
runner := "camel-k-integration-" + defaults.Version + "-runner.jar"
- ctx.Artifacts = append(ctx.Artifacts, v1alpha1.Artifact{
+ ctx.Artifacts = append(ctx.Artifacts, v1.Artifact{
ID: runner,
Location: path.Join(mc.Path, "target", runner),
Target: runner,
diff --git a/pkg/client/clientset/versioned/clientset.go b/pkg/client/clientset/versioned/clientset.go
index c93d6d1..93adac4 100644
--- a/pkg/client/clientset/versioned/clientset.go
+++ b/pkg/client/clientset/versioned/clientset.go
@@ -20,7 +20,9 @@ limitations under the License.
package versioned
import (
- camelv1alpha1 "github.com/apache/camel-k/pkg/client/clientset/versioned/typed/camel/v1alpha1"
+ "fmt"
+
+ camelv1 "github.com/apache/camel-k/pkg/client/clientset/versioned/typed/camel/v1"
discovery "k8s.io/client-go/discovery"
rest "k8s.io/client-go/rest"
flowcontrol "k8s.io/client-go/util/flowcontrol"
@@ -28,19 +30,19 @@ import (
type Interface interface {
Discovery() discovery.DiscoveryInterface
- CamelV1alpha1() camelv1alpha1.CamelV1alpha1Interface
+ CamelV1() camelv1.CamelV1Interface
}
// Clientset contains the clients for groups. Each group has exactly one
// version included in a Clientset.
type Clientset struct {
*discovery.DiscoveryClient
- camelV1alpha1 *camelv1alpha1.CamelV1alpha1Client
+ camelV1 *camelv1.CamelV1Client
}
-// CamelV1alpha1 retrieves the CamelV1alpha1Client
-func (c *Clientset) CamelV1alpha1() camelv1alpha1.CamelV1alpha1Interface {
- return c.camelV1alpha1
+// CamelV1 retrieves the CamelV1Client
+func (c *Clientset) CamelV1() camelv1.CamelV1Interface {
+ return c.camelV1
}
// Discovery retrieves the DiscoveryClient
@@ -52,14 +54,19 @@ 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
var err error
- cs.camelV1alpha1, err = camelv1alpha1.NewForConfig(&configShallowCopy)
+ cs.camelV1, err = camelv1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
@@ -75,7 +82,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *Clientset {
var cs Clientset
- cs.camelV1alpha1 = camelv1alpha1.NewForConfigOrDie(c)
+ cs.camelV1 = camelv1.NewForConfigOrDie(c)
cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
return &cs
@@ -84,7 +91,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
// New creates a new Clientset for the given RESTClient.
func New(c rest.Interface) *Clientset {
var cs Clientset
- cs.camelV1alpha1 = camelv1alpha1.New(c)
+ cs.camelV1 = camelv1.New(c)
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
return &cs
diff --git a/pkg/client/clientset/versioned/fake/clientset_generated.go b/pkg/client/clientset/versioned/fake/clientset_generated.go
index 388c13d..8745de8 100644
--- a/pkg/client/clientset/versioned/fake/clientset_generated.go
+++ b/pkg/client/clientset/versioned/fake/clientset_generated.go
@@ -21,8 +21,8 @@ package fake
import (
clientset "github.com/apache/camel-k/pkg/client/clientset/versioned"
- camelv1alpha1 "github.com/apache/camel-k/pkg/client/clientset/versioned/typed/camel/v1alpha1"
- fakecamelv1alpha1 "github.com/apache/camel-k/pkg/client/clientset/versioned/typed/camel/v1alpha1/fake"
+ camelv1 "github.com/apache/camel-k/pkg/client/clientset/versioned/typed/camel/v1"
+ fakecamelv1 "github.com/apache/camel-k/pkg/client/clientset/versioned/typed/camel/v1/fake"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/client-go/discovery"
@@ -77,7 +77,7 @@ func (c *Clientset) Tracker() testing.ObjectTracker {
var _ clientset.Interface = &Clientset{}
-// CamelV1alpha1 retrieves the CamelV1alpha1Client
-func (c *Clientset) CamelV1alpha1() camelv1alpha1.CamelV1alpha1Interface {
- return &fakecamelv1alpha1.FakeCamelV1alpha1{Fake: &c.Fake}
+// CamelV1 retrieves the CamelV1Client
+func (c *Clientset) CamelV1() camelv1.CamelV1Interface {
+ return &fakecamelv1.FakeCamelV1{Fake: &c.Fake}
}
diff --git a/pkg/client/clientset/versioned/fake/register.go b/pkg/client/clientset/versioned/fake/register.go
index 96d01d3..cea6d0a 100644
--- a/pkg/client/clientset/versioned/fake/register.go
+++ b/pkg/client/clientset/versioned/fake/register.go
@@ -20,7 +20,7 @@ limitations under the License.
package fake
import (
- camelv1alpha1 "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -32,7 +32,7 @@ var scheme = runtime.NewScheme()
var codecs = serializer.NewCodecFactory(scheme)
var parameterCodec = runtime.NewParameterCodec(scheme)
var localSchemeBuilder = runtime.SchemeBuilder{
- camelv1alpha1.AddToScheme,
+ camelv1.AddToScheme,
}
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
diff --git a/pkg/client/clientset/versioned/scheme/register.go b/pkg/client/clientset/versioned/scheme/register.go
index fb6453a..dca9dcf 100644
--- a/pkg/client/clientset/versioned/scheme/register.go
+++ b/pkg/client/clientset/versioned/scheme/register.go
@@ -20,7 +20,7 @@ limitations under the License.
package scheme
import (
- camelv1alpha1 "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -32,7 +32,7 @@ var Scheme = runtime.NewScheme()
var Codecs = serializer.NewCodecFactory(Scheme)
var ParameterCodec = runtime.NewParameterCodec(Scheme)
var localSchemeBuilder = runtime.SchemeBuilder{
- camelv1alpha1.AddToScheme,
+ camelv1.AddToScheme,
}
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
diff --git a/pkg/client/clientset/versioned/typed/camel/v1alpha1/build.go b/pkg/client/clientset/versioned/typed/camel/v1/build.go
similarity index 72%
rename from pkg/client/clientset/versioned/typed/camel/v1alpha1/build.go
rename to pkg/client/clientset/versioned/typed/camel/v1/build.go
index 65eacbf..a40c5ce 100644
--- a/pkg/client/clientset/versioned/typed/camel/v1alpha1/build.go
+++ b/pkg/client/clientset/versioned/typed/camel/v1/build.go
@@ -17,14 +17,14 @@ limitations under the License.
// Code generated by client-gen. DO NOT EDIT.
-package v1alpha1
+package v1
import (
"time"
- v1alpha1 "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
scheme "github.com/apache/camel-k/pkg/client/clientset/versioned/scheme"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
@@ -38,15 +38,15 @@ type BuildsGetter interface {
// BuildInterface has methods to work with Build resources.
type BuildInterface interface {
- Create(*v1alpha1.Build) (*v1alpha1.Build, error)
- Update(*v1alpha1.Build) (*v1alpha1.Build, error)
- UpdateStatus(*v1alpha1.Build) (*v1alpha1.Build, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1alpha1.Build, error)
- List(opts v1.ListOptions) (*v1alpha1.BuildList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Build, err error)
+ Create(*v1.Build) (*v1.Build, error)
+ Update(*v1.Build) (*v1.Build, error)
+ UpdateStatus(*v1.Build) (*v1.Build, error)
+ Delete(name string, options *metav1.DeleteOptions) error
+ DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
+ Get(name string, options metav1.GetOptions) (*v1.Build, error)
+ List(opts metav1.ListOptions) (*v1.BuildList, error)
+ Watch(opts metav1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Build, err error)
BuildExpansion
}
@@ -57,7 +57,7 @@ type builds struct {
}
// newBuilds returns a Builds
-func newBuilds(c *CamelV1alpha1Client, namespace string) *builds {
+func newBuilds(c *CamelV1Client, namespace string) *builds {
return &builds{
client: c.RESTClient(),
ns: namespace,
@@ -65,8 +65,8 @@ func newBuilds(c *CamelV1alpha1Client, namespace string) *builds {
}
// Get takes name of the build, and returns the corresponding build object, and an error if there is any.
-func (c *builds) Get(name string, options v1.GetOptions) (result *v1alpha1.Build, err error) {
- result = &v1alpha1.Build{}
+func (c *builds) Get(name string, options metav1.GetOptions) (result *v1.Build, err error) {
+ result = &v1.Build{}
err = c.client.Get().
Namespace(c.ns).
Resource("builds").
@@ -78,12 +78,12 @@ func (c *builds) Get(name string, options v1.GetOptions) (result *v1alpha1.Build
}
// List takes label and field selectors, and returns the list of Builds that match those selectors.
-func (c *builds) List(opts v1.ListOptions) (result *v1alpha1.BuildList, err error) {
+func (c *builds) List(opts metav1.ListOptions) (result *v1.BuildList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
- result = &v1alpha1.BuildList{}
+ result = &v1.BuildList{}
err = c.client.Get().
Namespace(c.ns).
Resource("builds").
@@ -95,7 +95,7 @@ func (c *builds) List(opts v1.ListOptions) (result *v1alpha1.BuildList, err erro
}
// Watch returns a watch.Interface that watches the requested builds.
-func (c *builds) Watch(opts v1.ListOptions) (watch.Interface, error) {
+func (c *builds) Watch(opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -110,8 +110,8 @@ func (c *builds) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Create takes the representation of a build and creates it. Returns the server's representation of the build, and an error, if there is any.
-func (c *builds) Create(build *v1alpha1.Build) (result *v1alpha1.Build, err error) {
- result = &v1alpha1.Build{}
+func (c *builds) Create(build *v1.Build) (result *v1.Build, err error) {
+ result = &v1.Build{}
err = c.client.Post().
Namespace(c.ns).
Resource("builds").
@@ -122,8 +122,8 @@ func (c *builds) Create(build *v1alpha1.Build) (result *v1alpha1.Build, err erro
}
// Update takes the representation of a build and updates it. Returns the server's representation of the build, and an error, if there is any.
-func (c *builds) Update(build *v1alpha1.Build) (result *v1alpha1.Build, err error) {
- result = &v1alpha1.Build{}
+func (c *builds) Update(build *v1.Build) (result *v1.Build, err error) {
+ result = &v1.Build{}
err = c.client.Put().
Namespace(c.ns).
Resource("builds").
@@ -137,8 +137,8 @@ func (c *builds) Update(build *v1alpha1.Build) (result *v1alpha1.Build, err erro
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *builds) UpdateStatus(build *v1alpha1.Build) (result *v1alpha1.Build, err error) {
- result = &v1alpha1.Build{}
+func (c *builds) UpdateStatus(build *v1.Build) (result *v1.Build, err error) {
+ result = &v1.Build{}
err = c.client.Put().
Namespace(c.ns).
Resource("builds").
@@ -151,7 +151,7 @@ func (c *builds) UpdateStatus(build *v1alpha1.Build) (result *v1alpha1.Build, er
}
// Delete takes name of the build and deletes it. Returns an error if one occurs.
-func (c *builds) Delete(name string, options *v1.DeleteOptions) error {
+func (c *builds) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("builds").
@@ -162,7 +162,7 @@ func (c *builds) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
-func (c *builds) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+func (c *builds) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -178,8 +178,8 @@ func (c *builds) DeleteCollection(options *v1.DeleteOptions, listOptions v1.List
}
// Patch applies the patch and returns the patched build.
-func (c *builds) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Build, err error) {
- result = &v1alpha1.Build{}
+func (c *builds) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Build, err error) {
+ result = &v1.Build{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("builds").
diff --git a/pkg/client/clientset/versioned/typed/camel/v1alpha1/camel_client.go b/pkg/client/clientset/versioned/typed/camel/v1/camel_client.go
similarity index 63%
rename from pkg/client/clientset/versioned/typed/camel/v1alpha1/camel_client.go
rename to pkg/client/clientset/versioned/typed/camel/v1/camel_client.go
index 389abb5..657d3b5 100644
--- a/pkg/client/clientset/versioned/typed/camel/v1alpha1/camel_client.go
+++ b/pkg/client/clientset/versioned/typed/camel/v1/camel_client.go
@@ -17,15 +17,15 @@ limitations under the License.
// Code generated by client-gen. DO NOT EDIT.
-package v1alpha1
+package v1
import (
- v1alpha1 "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/client/clientset/versioned/scheme"
rest "k8s.io/client-go/rest"
)
-type CamelV1alpha1Interface interface {
+type CamelV1Interface interface {
RESTClient() rest.Interface
BuildsGetter
IntegrationsGetter
@@ -33,29 +33,29 @@ type CamelV1alpha1Interface interface {
IntegrationPlatformsGetter
}
-// CamelV1alpha1Client is used to interact with features provided by the camel.apache.org group.
-type CamelV1alpha1Client struct {
+// CamelV1Client is used to interact with features provided by the camel.apache.org group.
+type CamelV1Client struct {
restClient rest.Interface
}
-func (c *CamelV1alpha1Client) Builds(namespace string) BuildInterface {
+func (c *CamelV1Client) Builds(namespace string) BuildInterface {
return newBuilds(c, namespace)
}
-func (c *CamelV1alpha1Client) Integrations(namespace string) IntegrationInterface {
+func (c *CamelV1Client) Integrations(namespace string) IntegrationInterface {
return newIntegrations(c, namespace)
}
-func (c *CamelV1alpha1Client) IntegrationKits(namespace string) IntegrationKitInterface {
+func (c *CamelV1Client) IntegrationKits(namespace string) IntegrationKitInterface {
return newIntegrationKits(c, namespace)
}
-func (c *CamelV1alpha1Client) IntegrationPlatforms(namespace string) IntegrationPlatformInterface {
+func (c *CamelV1Client) IntegrationPlatforms(namespace string) IntegrationPlatformInterface {
return newIntegrationPlatforms(c, namespace)
}
-// NewForConfig creates a new CamelV1alpha1Client for the given config.
-func NewForConfig(c *rest.Config) (*CamelV1alpha1Client, error) {
+// NewForConfig creates a new CamelV1Client for the given config.
+func NewForConfig(c *rest.Config) (*CamelV1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
@@ -64,12 +64,12 @@ func NewForConfig(c *rest.Config) (*CamelV1alpha1Client, error) {
if err != nil {
return nil, err
}
- return &CamelV1alpha1Client{client}, nil
+ return &CamelV1Client{client}, nil
}
-// NewForConfigOrDie creates a new CamelV1alpha1Client for the given config and
+// NewForConfigOrDie creates a new CamelV1Client for the given config and
// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *CamelV1alpha1Client {
+func NewForConfigOrDie(c *rest.Config) *CamelV1Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
@@ -77,13 +77,13 @@ func NewForConfigOrDie(c *rest.Config) *CamelV1alpha1Client {
return client
}
-// New creates a new CamelV1alpha1Client for the given RESTClient.
-func New(c rest.Interface) *CamelV1alpha1Client {
- return &CamelV1alpha1Client{c}
+// New creates a new CamelV1Client for the given RESTClient.
+func New(c rest.Interface) *CamelV1Client {
+ return &CamelV1Client{c}
}
func setConfigDefaults(config *rest.Config) error {
- gv := v1alpha1.SchemeGroupVersion
+ gv := v1.SchemeGroupVersion
config.GroupVersion = &gv
config.APIPath = "/apis"
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
@@ -97,7 +97,7 @@ func setConfigDefaults(config *rest.Config) error {
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
-func (c *CamelV1alpha1Client) RESTClient() rest.Interface {
+func (c *CamelV1Client) RESTClient() rest.Interface {
if c == nil {
return nil
}
diff --git a/pkg/client/clientset/versioned/typed/camel/v1alpha1/doc.go b/pkg/client/clientset/versioned/typed/camel/v1/doc.go
similarity index 98%
rename from pkg/client/clientset/versioned/typed/camel/v1alpha1/doc.go
rename to pkg/client/clientset/versioned/typed/camel/v1/doc.go
index 9f77d24..cbd710d 100644
--- a/pkg/client/clientset/versioned/typed/camel/v1alpha1/doc.go
+++ b/pkg/client/clientset/versioned/typed/camel/v1/doc.go
@@ -18,4 +18,4 @@ limitations under the License.
// Code generated by client-gen. DO NOT EDIT.
// This package has the automatically generated typed clients.
-package v1alpha1
+package v1
diff --git a/pkg/client/clientset/versioned/typed/camel/v1alpha1/fake/doc.go b/pkg/client/clientset/versioned/typed/camel/v1/fake/doc.go
similarity index 100%
rename from pkg/client/clientset/versioned/typed/camel/v1alpha1/fake/doc.go
rename to pkg/client/clientset/versioned/typed/camel/v1/fake/doc.go
diff --git a/pkg/client/clientset/versioned/typed/camel/v1alpha1/fake/fake_build.go b/pkg/client/clientset/versioned/typed/camel/v1/fake/fake_build.go
similarity index 75%
rename from pkg/client/clientset/versioned/typed/camel/v1alpha1/fake/fake_build.go
rename to pkg/client/clientset/versioned/typed/camel/v1/fake/fake_build.go
index 8a0e414..f459f5c 100644
--- a/pkg/client/clientset/versioned/typed/camel/v1alpha1/fake/fake_build.go
+++ b/pkg/client/clientset/versioned/typed/camel/v1/fake/fake_build.go
@@ -20,7 +20,7 @@ limitations under the License.
package fake
import (
- v1alpha1 "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -31,29 +31,29 @@ import (
// FakeBuilds implements BuildInterface
type FakeBuilds struct {
- Fake *FakeCamelV1alpha1
+ Fake *FakeCamelV1
ns string
}
-var buildsResource = schema.GroupVersionResource{Group: "camel.apache.org", Version: "v1alpha1", Resource: "builds"}
+var buildsResource = schema.GroupVersionResource{Group: "camel.apache.org", Version: "v1", Resource: "builds"}
-var buildsKind = schema.GroupVersionKind{Group: "camel.apache.org", Version: "v1alpha1", Kind: "Build"}
+var buildsKind = schema.GroupVersionKind{Group: "camel.apache.org", Version: "v1", Kind: "Build"}
// Get takes name of the build, and returns the corresponding build object, and an error if there is any.
-func (c *FakeBuilds) Get(name string, options v1.GetOptions) (result *v1alpha1.Build, err error) {
+func (c *FakeBuilds) Get(name string, options v1.GetOptions) (result *camelv1.Build, err error) {
obj, err := c.Fake.
- Invokes(testing.NewGetAction(buildsResource, c.ns, name), &v1alpha1.Build{})
+ Invokes(testing.NewGetAction(buildsResource, c.ns, name), &camelv1.Build{})
if obj == nil {
return nil, err
}
- return obj.(*v1alpha1.Build), err
+ return obj.(*camelv1.Build), err
}
// List takes label and field selectors, and returns the list of Builds that match those selectors.
-func (c *FakeBuilds) List(opts v1.ListOptions) (result *v1alpha1.BuildList, err error) {
+func (c *FakeBuilds) List(opts v1.ListOptions) (result *camelv1.BuildList, err error) {
obj, err := c.Fake.
- Invokes(testing.NewListAction(buildsResource, buildsKind, c.ns, opts), &v1alpha1.BuildList{})
+ Invokes(testing.NewListAction(buildsResource, buildsKind, c.ns, opts), &camelv1.BuildList{})
if obj == nil {
return nil, err
@@ -63,8 +63,8 @@ func (c *FakeBuilds) List(opts v1.ListOptions) (result *v1alpha1.BuildList, err
if label == nil {
label = labels.Everything()
}
- list := &v1alpha1.BuildList{ListMeta: obj.(*v1alpha1.BuildList).ListMeta}
- for _, item := range obj.(*v1alpha1.BuildList).Items {
+ list := &camelv1.BuildList{ListMeta: obj.(*camelv1.BuildList).ListMeta}
+ for _, item := range obj.(*camelv1.BuildList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -80,43 +80,43 @@ func (c *FakeBuilds) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Create takes the representation of a build and creates it. Returns the server's representation of the build, and an error, if there is any.
-func (c *FakeBuilds) Create(build *v1alpha1.Build) (result *v1alpha1.Build, err error) {
+func (c *FakeBuilds) Create(build *camelv1.Build) (result *camelv1.Build, err error) {
obj, err := c.Fake.
- Invokes(testing.NewCreateAction(buildsResource, c.ns, build), &v1alpha1.Build{})
+ Invokes(testing.NewCreateAction(buildsResource, c.ns, build), &camelv1.Build{})
if obj == nil {
return nil, err
}
- return obj.(*v1alpha1.Build), err
+ return obj.(*camelv1.Build), err
}
// Update takes the representation of a build and updates it. Returns the server's representation of the build, and an error, if there is any.
-func (c *FakeBuilds) Update(build *v1alpha1.Build) (result *v1alpha1.Build, err error) {
+func (c *FakeBuilds) Update(build *camelv1.Build) (result *camelv1.Build, err error) {
obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(buildsResource, c.ns, build), &v1alpha1.Build{})
+ Invokes(testing.NewUpdateAction(buildsResource, c.ns, build), &camelv1.Build{})
if obj == nil {
return nil, err
}
- return obj.(*v1alpha1.Build), err
+ return obj.(*camelv1.Build), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *FakeBuilds) UpdateStatus(build *v1alpha1.Build) (*v1alpha1.Build, error) {
+func (c *FakeBuilds) UpdateStatus(build *camelv1.Build) (*camelv1.Build, error) {
obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(buildsResource, "status", c.ns, build), &v1alpha1.Build{})
+ Invokes(testing.NewUpdateSubresourceAction(buildsResource, "status", c.ns, build), &camelv1.Build{})
if obj == nil {
return nil, err
}
- return obj.(*v1alpha1.Build), err
+ return obj.(*camelv1.Build), err
}
// Delete takes name of the build and deletes it. Returns an error if one occurs.
func (c *FakeBuilds) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
- Invokes(testing.NewDeleteAction(buildsResource, c.ns, name), &v1alpha1.Build{})
+ Invokes(testing.NewDeleteAction(buildsResource, c.ns, name), &camelv1.Build{})
return err
}
@@ -125,17 +125,17 @@ func (c *FakeBuilds) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeBuilds) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(buildsResource, c.ns, listOptions)
- _, err := c.Fake.Invokes(action, &v1alpha1.BuildList{})
+ _, err := c.Fake.Invokes(action, &camelv1.BuildList{})
return err
}
// Patch applies the patch and returns the patched build.
-func (c *FakeBuilds) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Build, err error) {
+func (c *FakeBuilds) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *camelv1.Build, err error) {
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(buildsResource, c.ns, name, pt, data, subresources...), &v1alpha1.Build{})
+ Invokes(testing.NewPatchSubresourceAction(buildsResource, c.ns, name, pt, data, subresources...), &camelv1.Build{})
if obj == nil {
return nil, err
}
- return obj.(*v1alpha1.Build), err
+ return obj.(*camelv1.Build), err
}
diff --git a/pkg/client/clientset/versioned/typed/camel/v1alpha1/fake/fake_camel_client.go b/pkg/client/clientset/versioned/typed/camel/v1/fake/fake_camel_client.go
similarity index 69%
rename from pkg/client/clientset/versioned/typed/camel/v1alpha1/fake/fake_camel_client.go
rename to pkg/client/clientset/versioned/typed/camel/v1/fake/fake_camel_client.go
index 6596ec7..e53095d 100644
--- a/pkg/client/clientset/versioned/typed/camel/v1alpha1/fake/fake_camel_client.go
+++ b/pkg/client/clientset/versioned/typed/camel/v1/fake/fake_camel_client.go
@@ -20,34 +20,34 @@ limitations under the License.
package fake
import (
- v1alpha1 "github.com/apache/camel-k/pkg/client/clientset/versioned/typed/camel/v1alpha1"
+ v1 "github.com/apache/camel-k/pkg/client/clientset/versioned/typed/camel/v1"
rest "k8s.io/client-go/rest"
testing "k8s.io/client-go/testing"
)
-type FakeCamelV1alpha1 struct {
+type FakeCamelV1 struct {
*testing.Fake
}
-func (c *FakeCamelV1alpha1) Builds(namespace string) v1alpha1.BuildInterface {
+func (c *FakeCamelV1) Builds(namespace string) v1.BuildInterface {
return &FakeBuilds{c, namespace}
}
-func (c *FakeCamelV1alpha1) Integrations(namespace string) v1alpha1.IntegrationInterface {
+func (c *FakeCamelV1) Integrations(namespace string) v1.IntegrationInterface {
return &FakeIntegrations{c, namespace}
}
-func (c *FakeCamelV1alpha1) IntegrationKits(namespace string) v1alpha1.IntegrationKitInterface {
+func (c *FakeCamelV1) IntegrationKits(namespace string) v1.IntegrationKitInterface {
return &FakeIntegrationKits{c, namespace}
}
-func (c *FakeCamelV1alpha1) IntegrationPlatforms(namespace string) v1alpha1.IntegrationPlatformInterface {
+func (c *FakeCamelV1) IntegrationPlatforms(namespace string) v1.IntegrationPlatformInterface {
return &FakeIntegrationPlatforms{c, namespace}
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
-func (c *FakeCamelV1alpha1) RESTClient() rest.Interface {
+func (c *FakeCamelV1) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}
diff --git a/pkg/client/clientset/versioned/typed/camel/v1alpha1/fake/fake_integration.go b/pkg/client/clientset/versioned/typed/camel/v1/fake/fake_integration.go
similarity index 72%
rename from pkg/client/clientset/versioned/typed/camel/v1alpha1/fake/fake_integration.go
rename to pkg/client/clientset/versioned/typed/camel/v1/fake/fake_integration.go
index d44859f..327576b 100644
--- a/pkg/client/clientset/versioned/typed/camel/v1alpha1/fake/fake_integration.go
+++ b/pkg/client/clientset/versioned/typed/camel/v1/fake/fake_integration.go
@@ -20,7 +20,7 @@ limitations under the License.
package fake
import (
- v1alpha1 "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -31,29 +31,29 @@ import (
// FakeIntegrations implements IntegrationInterface
type FakeIntegrations struct {
- Fake *FakeCamelV1alpha1
+ Fake *FakeCamelV1
ns string
}
-var integrationsResource = schema.GroupVersionResource{Group: "camel.apache.org", Version: "v1alpha1", Resource: "integrations"}
+var integrationsResource = schema.GroupVersionResource{Group: "camel.apache.org", Version: "v1", Resource: "integrations"}
-var integrationsKind = schema.GroupVersionKind{Group: "camel.apache.org", Version: "v1alpha1", Kind: "Integration"}
+var integrationsKind = schema.GroupVersionKind{Group: "camel.apache.org", Version: "v1", Kind: "Integration"}
// Get takes name of the integration, and returns the corresponding integration object, and an error if there is any.
-func (c *FakeIntegrations) Get(name string, options v1.GetOptions) (result *v1alpha1.Integration, err error) {
+func (c *FakeIntegrations) Get(name string, options v1.GetOptions) (result *camelv1.Integration, err error) {
obj, err := c.Fake.
- Invokes(testing.NewGetAction(integrationsResource, c.ns, name), &v1alpha1.Integration{})
+ Invokes(testing.NewGetAction(integrationsResource, c.ns, name), &camelv1.Integration{})
if obj == nil {
return nil, err
}
- return obj.(*v1alpha1.Integration), err
+ return obj.(*camelv1.Integration), err
}
// List takes label and field selectors, and returns the list of Integrations that match those selectors.
-func (c *FakeIntegrations) List(opts v1.ListOptions) (result *v1alpha1.IntegrationList, err error) {
+func (c *FakeIntegrations) List(opts v1.ListOptions) (result *camelv1.IntegrationList, err error) {
obj, err := c.Fake.
- Invokes(testing.NewListAction(integrationsResource, integrationsKind, c.ns, opts), &v1alpha1.IntegrationList{})
+ Invokes(testing.NewListAction(integrationsResource, integrationsKind, c.ns, opts), &camelv1.IntegrationList{})
if obj == nil {
return nil, err
@@ -63,8 +63,8 @@ func (c *FakeIntegrations) List(opts v1.ListOptions) (result *v1alpha1.Integrati
if label == nil {
label = labels.Everything()
}
- list := &v1alpha1.IntegrationList{ListMeta: obj.(*v1alpha1.IntegrationList).ListMeta}
- for _, item := range obj.(*v1alpha1.IntegrationList).Items {
+ list := &camelv1.IntegrationList{ListMeta: obj.(*camelv1.IntegrationList).ListMeta}
+ for _, item := range obj.(*camelv1.IntegrationList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -80,43 +80,43 @@ func (c *FakeIntegrations) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Create takes the representation of a integration and creates it. Returns the server's representation of the integration, and an error, if there is any.
-func (c *FakeIntegrations) Create(integration *v1alpha1.Integration) (result *v1alpha1.Integration, err error) {
+func (c *FakeIntegrations) Create(integration *camelv1.Integration) (result *camelv1.Integration, err error) {
obj, err := c.Fake.
- Invokes(testing.NewCreateAction(integrationsResource, c.ns, integration), &v1alpha1.Integration{})
+ Invokes(testing.NewCreateAction(integrationsResource, c.ns, integration), &camelv1.Integration{})
if obj == nil {
return nil, err
}
- return obj.(*v1alpha1.Integration), err
+ return obj.(*camelv1.Integration), err
}
// Update takes the representation of a integration and updates it. Returns the server's representation of the integration, and an error, if there is any.
-func (c *FakeIntegrations) Update(integration *v1alpha1.Integration) (result *v1alpha1.Integration, err error) {
+func (c *FakeIntegrations) Update(integration *camelv1.Integration) (result *camelv1.Integration, err error) {
obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(integrationsResource, c.ns, integration), &v1alpha1.Integration{})
+ Invokes(testing.NewUpdateAction(integrationsResource, c.ns, integration), &camelv1.Integration{})
if obj == nil {
return nil, err
}
- return obj.(*v1alpha1.Integration), err
+ return obj.(*camelv1.Integration), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *FakeIntegrations) UpdateStatus(integration *v1alpha1.Integration) (*v1alpha1.Integration, error) {
+func (c *FakeIntegrations) UpdateStatus(integration *camelv1.Integration) (*camelv1.Integration, error) {
obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(integrationsResource, "status", c.ns, integration), &v1alpha1.Integration{})
+ Invokes(testing.NewUpdateSubresourceAction(integrationsResource, "status", c.ns, integration), &camelv1.Integration{})
if obj == nil {
return nil, err
}
- return obj.(*v1alpha1.Integration), err
+ return obj.(*camelv1.Integration), err
}
// Delete takes name of the integration and deletes it. Returns an error if one occurs.
func (c *FakeIntegrations) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
- Invokes(testing.NewDeleteAction(integrationsResource, c.ns, name), &v1alpha1.Integration{})
+ Invokes(testing.NewDeleteAction(integrationsResource, c.ns, name), &camelv1.Integration{})
return err
}
@@ -125,17 +125,17 @@ func (c *FakeIntegrations) Delete(name string, options *v1.DeleteOptions) error
func (c *FakeIntegrations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(integrationsResource, c.ns, listOptions)
- _, err := c.Fake.Invokes(action, &v1alpha1.IntegrationList{})
+ _, err := c.Fake.Invokes(action, &camelv1.IntegrationList{})
return err
}
// Patch applies the patch and returns the patched integration.
-func (c *FakeIntegrations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Integration, err error) {
+func (c *FakeIntegrations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *camelv1.Integration, err error) {
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(integrationsResource, c.ns, name, pt, data, subresources...), &v1alpha1.Integration{})
+ Invokes(testing.NewPatchSubresourceAction(integrationsResource, c.ns, name, pt, data, subresources...), &camelv1.Integration{})
if obj == nil {
return nil, err
}
- return obj.(*v1alpha1.Integration), err
+ return obj.(*camelv1.Integration), err
}
diff --git a/pkg/client/clientset/versioned/typed/camel/v1alpha1/fake/fake_integrationkit.go b/pkg/client/clientset/versioned/typed/camel/v1/fake/fake_integrationkit.go
similarity index 72%
rename from pkg/client/clientset/versioned/typed/camel/v1alpha1/fake/fake_integrationkit.go
rename to pkg/client/clientset/versioned/typed/camel/v1/fake/fake_integrationkit.go
index 4fbc8c6..094da07 100644
--- a/pkg/client/clientset/versioned/typed/camel/v1alpha1/fake/fake_integrationkit.go
+++ b/pkg/client/clientset/versioned/typed/camel/v1/fake/fake_integrationkit.go
@@ -20,7 +20,7 @@ limitations under the License.
package fake
import (
- v1alpha1 "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -31,29 +31,29 @@ import (
// FakeIntegrationKits implements IntegrationKitInterface
type FakeIntegrationKits struct {
- Fake *FakeCamelV1alpha1
+ Fake *FakeCamelV1
ns string
}
-var integrationkitsResource = schema.GroupVersionResource{Group: "camel.apache.org", Version: "v1alpha1", Resource: "integrationkits"}
+var integrationkitsResource = schema.GroupVersionResource{Group: "camel.apache.org", Version: "v1", Resource: "integrationkits"}
-var integrationkitsKind = schema.GroupVersionKind{Group: "camel.apache.org", Version: "v1alpha1", Kind: "IntegrationKit"}
+var integrationkitsKind = schema.GroupVersionKind{Group: "camel.apache.org", Version: "v1", Kind: "IntegrationKit"}
// Get takes name of the integrationKit, and returns the corresponding integrationKit object, and an error if there is any.
-func (c *FakeIntegrationKits) Get(name string, options v1.GetOptions) (result *v1alpha1.IntegrationKit, err error) {
+func (c *FakeIntegrationKits) Get(name string, options v1.GetOptions) (result *camelv1.IntegrationKit, err error) {
obj, err := c.Fake.
- Invokes(testing.NewGetAction(integrationkitsResource, c.ns, name), &v1alpha1.IntegrationKit{})
+ Invokes(testing.NewGetAction(integrationkitsResource, c.ns, name), &camelv1.IntegrationKit{})
if obj == nil {
return nil, err
}
- return obj.(*v1alpha1.IntegrationKit), err
+ return obj.(*camelv1.IntegrationKit), err
}
// List takes label and field selectors, and returns the list of IntegrationKits that match those selectors.
-func (c *FakeIntegrationKits) List(opts v1.ListOptions) (result *v1alpha1.IntegrationKitList, err error) {
+func (c *FakeIntegrationKits) List(opts v1.ListOptions) (result *camelv1.IntegrationKitList, err error) {
obj, err := c.Fake.
- Invokes(testing.NewListAction(integrationkitsResource, integrationkitsKind, c.ns, opts), &v1alpha1.IntegrationKitList{})
+ Invokes(testing.NewListAction(integrationkitsResource, integrationkitsKind, c.ns, opts), &camelv1.IntegrationKitList{})
if obj == nil {
return nil, err
@@ -63,8 +63,8 @@ func (c *FakeIntegrationKits) List(opts v1.ListOptions) (result *v1alpha1.Integr
if label == nil {
label = labels.Everything()
}
- list := &v1alpha1.IntegrationKitList{ListMeta: obj.(*v1alpha1.IntegrationKitList).ListMeta}
- for _, item := range obj.(*v1alpha1.IntegrationKitList).Items {
+ list := &camelv1.IntegrationKitList{ListMeta: obj.(*camelv1.IntegrationKitList).ListMeta}
+ for _, item := range obj.(*camelv1.IntegrationKitList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -80,43 +80,43 @@ func (c *FakeIntegrationKits) Watch(opts v1.ListOptions) (watch.Interface, error
}
// Create takes the representation of a integrationKit and creates it. Returns the server's representation of the integrationKit, and an error, if there is any.
-func (c *FakeIntegrationKits) Create(integrationKit *v1alpha1.IntegrationKit) (result *v1alpha1.IntegrationKit, err error) {
+func (c *FakeIntegrationKits) Create(integrationKit *camelv1.IntegrationKit) (result *camelv1.IntegrationKit, err error) {
obj, err := c.Fake.
- Invokes(testing.NewCreateAction(integrationkitsResource, c.ns, integrationKit), &v1alpha1.IntegrationKit{})
+ Invokes(testing.NewCreateAction(integrationkitsResource, c.ns, integrationKit), &camelv1.IntegrationKit{})
if obj == nil {
return nil, err
}
- return obj.(*v1alpha1.IntegrationKit), err
+ return obj.(*camelv1.IntegrationKit), err
}
// Update takes the representation of a integrationKit and updates it. Returns the server's representation of the integrationKit, and an error, if there is any.
-func (c *FakeIntegrationKits) Update(integrationKit *v1alpha1.IntegrationKit) (result *v1alpha1.IntegrationKit, err error) {
+func (c *FakeIntegrationKits) Update(integrationKit *camelv1.IntegrationKit) (result *camelv1.IntegrationKit, err error) {
obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(integrationkitsResource, c.ns, integrationKit), &v1alpha1.IntegrationKit{})
+ Invokes(testing.NewUpdateAction(integrationkitsResource, c.ns, integrationKit), &camelv1.IntegrationKit{})
if obj == nil {
return nil, err
}
- return obj.(*v1alpha1.IntegrationKit), err
+ return obj.(*camelv1.IntegrationKit), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *FakeIntegrationKits) UpdateStatus(integrationKit *v1alpha1.IntegrationKit) (*v1alpha1.IntegrationKit, error) {
+func (c *FakeIntegrationKits) UpdateStatus(integrationKit *camelv1.IntegrationKit) (*camelv1.IntegrationKit, error) {
obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(integrationkitsResource, "status", c.ns, integrationKit), &v1alpha1.IntegrationKit{})
+ Invokes(testing.NewUpdateSubresourceAction(integrationkitsResource, "status", c.ns, integrationKit), &camelv1.IntegrationKit{})
if obj == nil {
return nil, err
}
- return obj.(*v1alpha1.IntegrationKit), err
+ return obj.(*camelv1.IntegrationKit), err
}
// Delete takes name of the integrationKit and deletes it. Returns an error if one occurs.
func (c *FakeIntegrationKits) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
- Invokes(testing.NewDeleteAction(integrationkitsResource, c.ns, name), &v1alpha1.IntegrationKit{})
+ Invokes(testing.NewDeleteAction(integrationkitsResource, c.ns, name), &camelv1.IntegrationKit{})
return err
}
@@ -125,17 +125,17 @@ func (c *FakeIntegrationKits) Delete(name string, options *v1.DeleteOptions) err
func (c *FakeIntegrationKits) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(integrationkitsResource, c.ns, listOptions)
- _, err := c.Fake.Invokes(action, &v1alpha1.IntegrationKitList{})
+ _, err := c.Fake.Invokes(action, &camelv1.IntegrationKitList{})
return err
}
// Patch applies the patch and returns the patched integrationKit.
-func (c *FakeIntegrationKits) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.IntegrationKit, err error) {
+func (c *FakeIntegrationKits) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *camelv1.IntegrationKit, err error) {
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(integrationkitsResource, c.ns, name, pt, data, subresources...), &v1alpha1.IntegrationKit{})
+ Invokes(testing.NewPatchSubresourceAction(integrationkitsResource, c.ns, name, pt, data, subresources...), &camelv1.IntegrationKit{})
if obj == nil {
return nil, err
}
- return obj.(*v1alpha1.IntegrationKit), err
+ return obj.(*camelv1.IntegrationKit), err
}
diff --git a/pkg/client/clientset/versioned/typed/camel/v1alpha1/fake/fake_integrationplatform.go b/pkg/client/clientset/versioned/typed/camel/v1/fake/fake_integrationplatform.go
similarity index 70%
rename from pkg/client/clientset/versioned/typed/camel/v1alpha1/fake/fake_integrationplatform.go
rename to pkg/client/clientset/versioned/typed/camel/v1/fake/fake_integrationplatform.go
index 3fdae46..4847b9e 100644
--- a/pkg/client/clientset/versioned/typed/camel/v1alpha1/fake/fake_integrationplatform.go
+++ b/pkg/client/clientset/versioned/typed/camel/v1/fake/fake_integrationplatform.go
@@ -20,7 +20,7 @@ limitations under the License.
package fake
import (
- v1alpha1 "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -31,29 +31,29 @@ import (
// FakeIntegrationPlatforms implements IntegrationPlatformInterface
type FakeIntegrationPlatforms struct {
- Fake *FakeCamelV1alpha1
+ Fake *FakeCamelV1
ns string
}
-var integrationplatformsResource = schema.GroupVersionResource{Group: "camel.apache.org", Version: "v1alpha1", Resource: "integrationplatforms"}
+var integrationplatformsResource = schema.GroupVersionResource{Group: "camel.apache.org", Version: "v1", Resource: "integrationplatforms"}
-var integrationplatformsKind = schema.GroupVersionKind{Group: "camel.apache.org", Version: "v1alpha1", Kind: "IntegrationPlatform"}
+var integrationplatformsKind = schema.GroupVersionKind{Group: "camel.apache.org", Version: "v1", Kind: "IntegrationPlatform"}
// Get takes name of the integrationPlatform, and returns the corresponding integrationPlatform object, and an error if there is any.
-func (c *FakeIntegrationPlatforms) Get(name string, options v1.GetOptions) (result *v1alpha1.IntegrationPlatform, err error) {
+func (c *FakeIntegrationPlatforms) Get(name string, options v1.GetOptions) (result *camelv1.IntegrationPlatform, err error) {
obj, err := c.Fake.
- Invokes(testing.NewGetAction(integrationplatformsResource, c.ns, name), &v1alpha1.IntegrationPlatform{})
+ Invokes(testing.NewGetAction(integrationplatformsResource, c.ns, name), &camelv1.IntegrationPlatform{})
if obj == nil {
return nil, err
}
- return obj.(*v1alpha1.IntegrationPlatform), err
+ return obj.(*camelv1.IntegrationPlatform), err
}
// List takes label and field selectors, and returns the list of IntegrationPlatforms that match those selectors.
-func (c *FakeIntegrationPlatforms) List(opts v1.ListOptions) (result *v1alpha1.IntegrationPlatformList, err error) {
+func (c *FakeIntegrationPlatforms) List(opts v1.ListOptions) (result *camelv1.IntegrationPlatformList, err error) {
obj, err := c.Fake.
- Invokes(testing.NewListAction(integrationplatformsResource, integrationplatformsKind, c.ns, opts), &v1alpha1.IntegrationPlatformList{})
+ Invokes(testing.NewListAction(integrationplatformsResource, integrationplatformsKind, c.ns, opts), &camelv1.IntegrationPlatformList{})
if obj == nil {
return nil, err
@@ -63,8 +63,8 @@ func (c *FakeIntegrationPlatforms) List(opts v1.ListOptions) (result *v1alpha1.I
if label == nil {
label = labels.Everything()
}
- list := &v1alpha1.IntegrationPlatformList{ListMeta: obj.(*v1alpha1.IntegrationPlatformList).ListMeta}
- for _, item := range obj.(*v1alpha1.IntegrationPlatformList).Items {
+ list := &camelv1.IntegrationPlatformList{ListMeta: obj.(*camelv1.IntegrationPlatformList).ListMeta}
+ for _, item := range obj.(*camelv1.IntegrationPlatformList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -80,43 +80,43 @@ func (c *FakeIntegrationPlatforms) Watch(opts v1.ListOptions) (watch.Interface,
}
// Create takes the representation of a integrationPlatform and creates it. Returns the server's representation of the integrationPlatform, and an error, if there is any.
-func (c *FakeIntegrationPlatforms) Create(integrationPlatform *v1alpha1.IntegrationPlatform) (result *v1alpha1.IntegrationPlatform, err error) {
+func (c *FakeIntegrationPlatforms) Create(integrationPlatform *camelv1.IntegrationPlatform) (result *camelv1.IntegrationPlatform, err error) {
obj, err := c.Fake.
- Invokes(testing.NewCreateAction(integrationplatformsResource, c.ns, integrationPlatform), &v1alpha1.IntegrationPlatform{})
+ Invokes(testing.NewCreateAction(integrationplatformsResource, c.ns, integrationPlatform), &camelv1.IntegrationPlatform{})
if obj == nil {
return nil, err
}
- return obj.(*v1alpha1.IntegrationPlatform), err
+ return obj.(*camelv1.IntegrationPlatform), err
}
// Update takes the representation of a integrationPlatform and updates it. Returns the server's representation of the integrationPlatform, and an error, if there is any.
-func (c *FakeIntegrationPlatforms) Update(integrationPlatform *v1alpha1.IntegrationPlatform) (result *v1alpha1.IntegrationPlatform, err error) {
+func (c *FakeIntegrationPlatforms) Update(integrationPlatform *camelv1.IntegrationPlatform) (result *camelv1.IntegrationPlatform, err error) {
obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(integrationplatformsResource, c.ns, integrationPlatform), &v1alpha1.IntegrationPlatform{})
+ Invokes(testing.NewUpdateAction(integrationplatformsResource, c.ns, integrationPlatform), &camelv1.IntegrationPlatform{})
if obj == nil {
return nil, err
}
- return obj.(*v1alpha1.IntegrationPlatform), err
+ return obj.(*camelv1.IntegrationPlatform), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *FakeIntegrationPlatforms) UpdateStatus(integrationPlatform *v1alpha1.IntegrationPlatform) (*v1alpha1.IntegrationPlatform, error) {
+func (c *FakeIntegrationPlatforms) UpdateStatus(integrationPlatform *camelv1.IntegrationPlatform) (*camelv1.IntegrationPlatform, error) {
obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(integrationplatformsResource, "status", c.ns, integrationPlatform), &v1alpha1.IntegrationPlatform{})
+ Invokes(testing.NewUpdateSubresourceAction(integrationplatformsResource, "status", c.ns, integrationPlatform), &camelv1.IntegrationPlatform{})
if obj == nil {
return nil, err
}
- return obj.(*v1alpha1.IntegrationPlatform), err
+ return obj.(*camelv1.IntegrationPlatform), err
}
// Delete takes name of the integrationPlatform and deletes it. Returns an error if one occurs.
func (c *FakeIntegrationPlatforms) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
- Invokes(testing.NewDeleteAction(integrationplatformsResource, c.ns, name), &v1alpha1.IntegrationPlatform{})
+ Invokes(testing.NewDeleteAction(integrationplatformsResource, c.ns, name), &camelv1.IntegrationPlatform{})
return err
}
@@ -125,17 +125,17 @@ func (c *FakeIntegrationPlatforms) Delete(name string, options *v1.DeleteOptions
func (c *FakeIntegrationPlatforms) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(integrationplatformsResource, c.ns, listOptions)
- _, err := c.Fake.Invokes(action, &v1alpha1.IntegrationPlatformList{})
+ _, err := c.Fake.Invokes(action, &camelv1.IntegrationPlatformList{})
return err
}
// Patch applies the patch and returns the patched integrationPlatform.
-func (c *FakeIntegrationPlatforms) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.IntegrationPlatform, err error) {
+func (c *FakeIntegrationPlatforms) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *camelv1.IntegrationPlatform, err error) {
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(integrationplatformsResource, c.ns, name, pt, data, subresources...), &v1alpha1.IntegrationPlatform{})
+ Invokes(testing.NewPatchSubresourceAction(integrationplatformsResource, c.ns, name, pt, data, subresources...), &camelv1.IntegrationPlatform{})
if obj == nil {
return nil, err
}
- return obj.(*v1alpha1.IntegrationPlatform), err
+ return obj.(*camelv1.IntegrationPlatform), err
}
diff --git a/pkg/client/clientset/versioned/typed/camel/v1alpha1/generated_expansion.go b/pkg/client/clientset/versioned/typed/camel/v1/generated_expansion.go
similarity index 98%
rename from pkg/client/clientset/versioned/typed/camel/v1alpha1/generated_expansion.go
rename to pkg/client/clientset/versioned/typed/camel/v1/generated_expansion.go
index 99f3b06..d4a0d7a 100644
--- a/pkg/client/clientset/versioned/typed/camel/v1alpha1/generated_expansion.go
+++ b/pkg/client/clientset/versioned/typed/camel/v1/generated_expansion.go
@@ -17,7 +17,7 @@ limitations under the License.
// Code generated by client-gen. DO NOT EDIT.
-package v1alpha1
+package v1
type BuildExpansion interface{}
diff --git a/pkg/client/clientset/versioned/typed/camel/v1alpha1/integration.go b/pkg/client/clientset/versioned/typed/camel/v1/integration.go
similarity index 71%
rename from pkg/client/clientset/versioned/typed/camel/v1alpha1/integration.go
rename to pkg/client/clientset/versioned/typed/camel/v1/integration.go
index d325dbf..559f411 100644
--- a/pkg/client/clientset/versioned/typed/camel/v1alpha1/integration.go
+++ b/pkg/client/clientset/versioned/typed/camel/v1/integration.go
@@ -17,14 +17,14 @@ limitations under the License.
// Code generated by client-gen. DO NOT EDIT.
-package v1alpha1
+package v1
import (
"time"
- v1alpha1 "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
scheme "github.com/apache/camel-k/pkg/client/clientset/versioned/scheme"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
@@ -38,15 +38,15 @@ type IntegrationsGetter interface {
// IntegrationInterface has methods to work with Integration resources.
type IntegrationInterface interface {
- Create(*v1alpha1.Integration) (*v1alpha1.Integration, error)
- Update(*v1alpha1.Integration) (*v1alpha1.Integration, error)
- UpdateStatus(*v1alpha1.Integration) (*v1alpha1.Integration, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1alpha1.Integration, error)
- List(opts v1.ListOptions) (*v1alpha1.IntegrationList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Integration, err error)
+ Create(*v1.Integration) (*v1.Integration, error)
+ Update(*v1.Integration) (*v1.Integration, error)
+ UpdateStatus(*v1.Integration) (*v1.Integration, error)
+ Delete(name string, options *metav1.DeleteOptions) error
+ DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
+ Get(name string, options metav1.GetOptions) (*v1.Integration, error)
+ List(opts metav1.ListOptions) (*v1.IntegrationList, error)
+ Watch(opts metav1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Integration, err error)
IntegrationExpansion
}
@@ -57,7 +57,7 @@ type integrations struct {
}
// newIntegrations returns a Integrations
-func newIntegrations(c *CamelV1alpha1Client, namespace string) *integrations {
+func newIntegrations(c *CamelV1Client, namespace string) *integrations {
return &integrations{
client: c.RESTClient(),
ns: namespace,
@@ -65,8 +65,8 @@ func newIntegrations(c *CamelV1alpha1Client, namespace string) *integrations {
}
// Get takes name of the integration, and returns the corresponding integration object, and an error if there is any.
-func (c *integrations) Get(name string, options v1.GetOptions) (result *v1alpha1.Integration, err error) {
- result = &v1alpha1.Integration{}
+func (c *integrations) Get(name string, options metav1.GetOptions) (result *v1.Integration, err error) {
+ result = &v1.Integration{}
err = c.client.Get().
Namespace(c.ns).
Resource("integrations").
@@ -78,12 +78,12 @@ func (c *integrations) Get(name string, options v1.GetOptions) (result *v1alpha1
}
// List takes label and field selectors, and returns the list of Integrations that match those selectors.
-func (c *integrations) List(opts v1.ListOptions) (result *v1alpha1.IntegrationList, err error) {
+func (c *integrations) List(opts metav1.ListOptions) (result *v1.IntegrationList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
- result = &v1alpha1.IntegrationList{}
+ result = &v1.IntegrationList{}
err = c.client.Get().
Namespace(c.ns).
Resource("integrations").
@@ -95,7 +95,7 @@ func (c *integrations) List(opts v1.ListOptions) (result *v1alpha1.IntegrationLi
}
// Watch returns a watch.Interface that watches the requested integrations.
-func (c *integrations) Watch(opts v1.ListOptions) (watch.Interface, error) {
+func (c *integrations) Watch(opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -110,8 +110,8 @@ func (c *integrations) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Create takes the representation of a integration and creates it. Returns the server's representation of the integration, and an error, if there is any.
-func (c *integrations) Create(integration *v1alpha1.Integration) (result *v1alpha1.Integration, err error) {
- result = &v1alpha1.Integration{}
+func (c *integrations) Create(integration *v1.Integration) (result *v1.Integration, err error) {
+ result = &v1.Integration{}
err = c.client.Post().
Namespace(c.ns).
Resource("integrations").
@@ -122,8 +122,8 @@ func (c *integrations) Create(integration *v1alpha1.Integration) (result *v1alph
}
// Update takes the representation of a integration and updates it. Returns the server's representation of the integration, and an error, if there is any.
-func (c *integrations) Update(integration *v1alpha1.Integration) (result *v1alpha1.Integration, err error) {
- result = &v1alpha1.Integration{}
+func (c *integrations) Update(integration *v1.Integration) (result *v1.Integration, err error) {
+ result = &v1.Integration{}
err = c.client.Put().
Namespace(c.ns).
Resource("integrations").
@@ -137,8 +137,8 @@ func (c *integrations) Update(integration *v1alpha1.Integration) (result *v1alph
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *integrations) UpdateStatus(integration *v1alpha1.Integration) (result *v1alpha1.Integration, err error) {
- result = &v1alpha1.Integration{}
+func (c *integrations) UpdateStatus(integration *v1.Integration) (result *v1.Integration, err error) {
+ result = &v1.Integration{}
err = c.client.Put().
Namespace(c.ns).
Resource("integrations").
@@ -151,7 +151,7 @@ func (c *integrations) UpdateStatus(integration *v1alpha1.Integration) (result *
}
// Delete takes name of the integration and deletes it. Returns an error if one occurs.
-func (c *integrations) Delete(name string, options *v1.DeleteOptions) error {
+func (c *integrations) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("integrations").
@@ -162,7 +162,7 @@ func (c *integrations) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
-func (c *integrations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+func (c *integrations) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -178,8 +178,8 @@ func (c *integrations) DeleteCollection(options *v1.DeleteOptions, listOptions v
}
// Patch applies the patch and returns the patched integration.
-func (c *integrations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Integration, err error) {
- result = &v1alpha1.Integration{}
+func (c *integrations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Integration, err error) {
+ result = &v1.Integration{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("integrations").
diff --git a/pkg/client/clientset/versioned/typed/camel/v1alpha1/integrationkit.go b/pkg/client/clientset/versioned/typed/camel/v1/integrationkit.go
similarity index 70%
rename from pkg/client/clientset/versioned/typed/camel/v1alpha1/integrationkit.go
rename to pkg/client/clientset/versioned/typed/camel/v1/integrationkit.go
index df65f9c..f5b2886 100644
--- a/pkg/client/clientset/versioned/typed/camel/v1alpha1/integrationkit.go
+++ b/pkg/client/clientset/versioned/typed/camel/v1/integrationkit.go
@@ -17,14 +17,14 @@ limitations under the License.
// Code generated by client-gen. DO NOT EDIT.
-package v1alpha1
+package v1
import (
"time"
- v1alpha1 "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
scheme "github.com/apache/camel-k/pkg/client/clientset/versioned/scheme"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
@@ -38,15 +38,15 @@ type IntegrationKitsGetter interface {
// IntegrationKitInterface has methods to work with IntegrationKit resources.
type IntegrationKitInterface interface {
- Create(*v1alpha1.IntegrationKit) (*v1alpha1.IntegrationKit, error)
- Update(*v1alpha1.IntegrationKit) (*v1alpha1.IntegrationKit, error)
- UpdateStatus(*v1alpha1.IntegrationKit) (*v1alpha1.IntegrationKit, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1alpha1.IntegrationKit, error)
- List(opts v1.ListOptions) (*v1alpha1.IntegrationKitList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.IntegrationKit, err error)
+ Create(*v1.IntegrationKit) (*v1.IntegrationKit, error)
+ Update(*v1.IntegrationKit) (*v1.IntegrationKit, error)
+ UpdateStatus(*v1.IntegrationKit) (*v1.IntegrationKit, error)
+ Delete(name string, options *metav1.DeleteOptions) error
+ DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
+ Get(name string, options metav1.GetOptions) (*v1.IntegrationKit, error)
+ List(opts metav1.ListOptions) (*v1.IntegrationKitList, error)
+ Watch(opts metav1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.IntegrationKit, err error)
IntegrationKitExpansion
}
@@ -57,7 +57,7 @@ type integrationKits struct {
}
// newIntegrationKits returns a IntegrationKits
-func newIntegrationKits(c *CamelV1alpha1Client, namespace string) *integrationKits {
+func newIntegrationKits(c *CamelV1Client, namespace string) *integrationKits {
return &integrationKits{
client: c.RESTClient(),
ns: namespace,
@@ -65,8 +65,8 @@ func newIntegrationKits(c *CamelV1alpha1Client, namespace string) *integrationKi
}
// Get takes name of the integrationKit, and returns the corresponding integrationKit object, and an error if there is any.
-func (c *integrationKits) Get(name string, options v1.GetOptions) (result *v1alpha1.IntegrationKit, err error) {
- result = &v1alpha1.IntegrationKit{}
+func (c *integrationKits) Get(name string, options metav1.GetOptions) (result *v1.IntegrationKit, err error) {
+ result = &v1.IntegrationKit{}
err = c.client.Get().
Namespace(c.ns).
Resource("integrationkits").
@@ -78,12 +78,12 @@ func (c *integrationKits) Get(name string, options v1.GetOptions) (result *v1alp
}
// List takes label and field selectors, and returns the list of IntegrationKits that match those selectors.
-func (c *integrationKits) List(opts v1.ListOptions) (result *v1alpha1.IntegrationKitList, err error) {
+func (c *integrationKits) List(opts metav1.ListOptions) (result *v1.IntegrationKitList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
- result = &v1alpha1.IntegrationKitList{}
+ result = &v1.IntegrationKitList{}
err = c.client.Get().
Namespace(c.ns).
Resource("integrationkits").
@@ -95,7 +95,7 @@ func (c *integrationKits) List(opts v1.ListOptions) (result *v1alpha1.Integratio
}
// Watch returns a watch.Interface that watches the requested integrationKits.
-func (c *integrationKits) Watch(opts v1.ListOptions) (watch.Interface, error) {
+func (c *integrationKits) Watch(opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -110,8 +110,8 @@ func (c *integrationKits) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Create takes the representation of a integrationKit and creates it. Returns the server's representation of the integrationKit, and an error, if there is any.
-func (c *integrationKits) Create(integrationKit *v1alpha1.IntegrationKit) (result *v1alpha1.IntegrationKit, err error) {
- result = &v1alpha1.IntegrationKit{}
+func (c *integrationKits) Create(integrationKit *v1.IntegrationKit) (result *v1.IntegrationKit, err error) {
+ result = &v1.IntegrationKit{}
err = c.client.Post().
Namespace(c.ns).
Resource("integrationkits").
@@ -122,8 +122,8 @@ func (c *integrationKits) Create(integrationKit *v1alpha1.IntegrationKit) (resul
}
// Update takes the representation of a integrationKit and updates it. Returns the server's representation of the integrationKit, and an error, if there is any.
-func (c *integrationKits) Update(integrationKit *v1alpha1.IntegrationKit) (result *v1alpha1.IntegrationKit, err error) {
- result = &v1alpha1.IntegrationKit{}
+func (c *integrationKits) Update(integrationKit *v1.IntegrationKit) (result *v1.IntegrationKit, err error) {
+ result = &v1.IntegrationKit{}
err = c.client.Put().
Namespace(c.ns).
Resource("integrationkits").
@@ -137,8 +137,8 @@ func (c *integrationKits) Update(integrationKit *v1alpha1.IntegrationKit) (resul
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *integrationKits) UpdateStatus(integrationKit *v1alpha1.IntegrationKit) (result *v1alpha1.IntegrationKit, err error) {
- result = &v1alpha1.IntegrationKit{}
+func (c *integrationKits) UpdateStatus(integrationKit *v1.IntegrationKit) (result *v1.IntegrationKit, err error) {
+ result = &v1.IntegrationKit{}
err = c.client.Put().
Namespace(c.ns).
Resource("integrationkits").
@@ -151,7 +151,7 @@ func (c *integrationKits) UpdateStatus(integrationKit *v1alpha1.IntegrationKit)
}
// Delete takes name of the integrationKit and deletes it. Returns an error if one occurs.
-func (c *integrationKits) Delete(name string, options *v1.DeleteOptions) error {
+func (c *integrationKits) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("integrationkits").
@@ -162,7 +162,7 @@ func (c *integrationKits) Delete(name string, options *v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
-func (c *integrationKits) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+func (c *integrationKits) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -178,8 +178,8 @@ func (c *integrationKits) DeleteCollection(options *v1.DeleteOptions, listOption
}
// Patch applies the patch and returns the patched integrationKit.
-func (c *integrationKits) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.IntegrationKit, err error) {
- result = &v1alpha1.IntegrationKit{}
+func (c *integrationKits) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.IntegrationKit, err error) {
+ result = &v1.IntegrationKit{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("integrationkits").
diff --git a/pkg/client/clientset/versioned/typed/camel/v1alpha1/integrationplatform.go b/pkg/client/clientset/versioned/typed/camel/v1/integrationplatform.go
similarity index 70%
rename from pkg/client/clientset/versioned/typed/camel/v1alpha1/integrationplatform.go
rename to pkg/client/clientset/versioned/typed/camel/v1/integrationplatform.go
index 586b602..7f1aec9 100644
--- a/pkg/client/clientset/versioned/typed/camel/v1alpha1/integrationplatform.go
+++ b/pkg/client/clientset/versioned/typed/camel/v1/integrationplatform.go
@@ -17,14 +17,14 @@ limitations under the License.
// Code generated by client-gen. DO NOT EDIT.
-package v1alpha1
+package v1
import (
"time"
- v1alpha1 "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
scheme "github.com/apache/camel-k/pkg/client/clientset/versioned/scheme"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
@@ -38,15 +38,15 @@ type IntegrationPlatformsGetter interface {
// IntegrationPlatformInterface has methods to work with IntegrationPlatform resources.
type IntegrationPlatformInterface interface {
- Create(*v1alpha1.IntegrationPlatform) (*v1alpha1.IntegrationPlatform, error)
- Update(*v1alpha1.IntegrationPlatform) (*v1alpha1.IntegrationPlatform, error)
- UpdateStatus(*v1alpha1.IntegrationPlatform) (*v1alpha1.IntegrationPlatform, error)
- Delete(name string, options *v1.DeleteOptions) error
- DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
- Get(name string, options v1.GetOptions) (*v1alpha1.IntegrationPlatform, error)
- List(opts v1.ListOptions) (*v1alpha1.IntegrationPlatformList, error)
- Watch(opts v1.ListOptions) (watch.Interface, error)
- Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.IntegrationPlatform, err error)
+ Create(*v1.IntegrationPlatform) (*v1.IntegrationPlatform, error)
+ Update(*v1.IntegrationPlatform) (*v1.IntegrationPlatform, error)
+ UpdateStatus(*v1.IntegrationPlatform) (*v1.IntegrationPlatform, error)
+ Delete(name string, options *metav1.DeleteOptions) error
+ DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
+ Get(name string, options metav1.GetOptions) (*v1.IntegrationPlatform, error)
+ List(opts metav1.ListOptions) (*v1.IntegrationPlatformList, error)
+ Watch(opts metav1.ListOptions) (watch.Interface, error)
+ Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.IntegrationPlatform, err error)
IntegrationPlatformExpansion
}
@@ -57,7 +57,7 @@ type integrationPlatforms struct {
}
// newIntegrationPlatforms returns a IntegrationPlatforms
-func newIntegrationPlatforms(c *CamelV1alpha1Client, namespace string) *integrationPlatforms {
+func newIntegrationPlatforms(c *CamelV1Client, namespace string) *integrationPlatforms {
return &integrationPlatforms{
client: c.RESTClient(),
ns: namespace,
@@ -65,8 +65,8 @@ func newIntegrationPlatforms(c *CamelV1alpha1Client, namespace string) *integrat
}
// Get takes name of the integrationPlatform, and returns the corresponding integrationPlatform object, and an error if there is any.
-func (c *integrationPlatforms) Get(name string, options v1.GetOptions) (result *v1alpha1.IntegrationPlatform, err error) {
- result = &v1alpha1.IntegrationPlatform{}
+func (c *integrationPlatforms) Get(name string, options metav1.GetOptions) (result *v1.IntegrationPlatform, err error) {
+ result = &v1.IntegrationPlatform{}
err = c.client.Get().
Namespace(c.ns).
Resource("integrationplatforms").
@@ -78,12 +78,12 @@ func (c *integrationPlatforms) Get(name string, options v1.GetOptions) (result *
}
// List takes label and field selectors, and returns the list of IntegrationPlatforms that match those selectors.
-func (c *integrationPlatforms) List(opts v1.ListOptions) (result *v1alpha1.IntegrationPlatformList, err error) {
+func (c *integrationPlatforms) List(opts metav1.ListOptions) (result *v1.IntegrationPlatformList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
- result = &v1alpha1.IntegrationPlatformList{}
+ result = &v1.IntegrationPlatformList{}
err = c.client.Get().
Namespace(c.ns).
Resource("integrationplatforms").
@@ -95,7 +95,7 @@ func (c *integrationPlatforms) List(opts v1.ListOptions) (result *v1alpha1.Integ
}
// Watch returns a watch.Interface that watches the requested integrationPlatforms.
-func (c *integrationPlatforms) Watch(opts v1.ListOptions) (watch.Interface, error) {
+func (c *integrationPlatforms) Watch(opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
@@ -110,8 +110,8 @@ func (c *integrationPlatforms) Watch(opts v1.ListOptions) (watch.Interface, erro
}
// Create takes the representation of a integrationPlatform and creates it. Returns the server's representation of the integrationPlatform, and an error, if there is any.
-func (c *integrationPlatforms) Create(integrationPlatform *v1alpha1.IntegrationPlatform) (result *v1alpha1.IntegrationPlatform, err error) {
- result = &v1alpha1.IntegrationPlatform{}
+func (c *integrationPlatforms) Create(integrationPlatform *v1.IntegrationPlatform) (result *v1.IntegrationPlatform, err error) {
+ result = &v1.IntegrationPlatform{}
err = c.client.Post().
Namespace(c.ns).
Resource("integrationplatforms").
@@ -122,8 +122,8 @@ func (c *integrationPlatforms) Create(integrationPlatform *v1alpha1.IntegrationP
}
// Update takes the representation of a integrationPlatform and updates it. Returns the server's representation of the integrationPlatform, and an error, if there is any.
-func (c *integrationPlatforms) Update(integrationPlatform *v1alpha1.IntegrationPlatform) (result *v1alpha1.IntegrationPlatform, err error) {
- result = &v1alpha1.IntegrationPlatform{}
+func (c *integrationPlatforms) Update(integrationPlatform *v1.IntegrationPlatform) (result *v1.IntegrationPlatform, err error) {
+ result = &v1.IntegrationPlatform{}
err = c.client.Put().
Namespace(c.ns).
Resource("integrationplatforms").
@@ -137,8 +137,8 @@ func (c *integrationPlatforms) Update(integrationPlatform *v1alpha1.IntegrationP
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *integrationPlatforms) UpdateStatus(integrationPlatform *v1alpha1.IntegrationPlatform) (result *v1alpha1.IntegrationPlatform, err error) {
- result = &v1alpha1.IntegrationPlatform{}
+func (c *integrationPlatforms) UpdateStatus(integrationPlatform *v1.IntegrationPlatform) (result *v1.IntegrationPlatform, err error) {
+ result = &v1.IntegrationPlatform{}
err = c.client.Put().
Namespace(c.ns).
Resource("integrationplatforms").
@@ -151,7 +151,7 @@ func (c *integrationPlatforms) UpdateStatus(integrationPlatform *v1alpha1.Integr
}
// Delete takes name of the integrationPlatform and deletes it. Returns an error if one occurs.
-func (c *integrationPlatforms) Delete(name string, options *v1.DeleteOptions) error {
+func (c *integrationPlatforms) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("integrationplatforms").
@@ -162,7 +162,7 @@ func (c *integrationPlatforms) Delete(name string, options *v1.DeleteOptions) er
}
// DeleteCollection deletes a collection of objects.
-func (c *integrationPlatforms) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
+func (c *integrationPlatforms) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
var timeout time.Duration
if listOptions.TimeoutSeconds != nil {
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
@@ -178,8 +178,8 @@ func (c *integrationPlatforms) DeleteCollection(options *v1.DeleteOptions, listO
}
// Patch applies the patch and returns the patched integrationPlatform.
-func (c *integrationPlatforms) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.IntegrationPlatform, err error) {
- result = &v1alpha1.IntegrationPlatform{}
+func (c *integrationPlatforms) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.IntegrationPlatform, err error) {
+ result = &v1.IntegrationPlatform{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("integrationplatforms").
diff --git a/pkg/client/informers/externalversions/camel/interface.go b/pkg/client/informers/externalversions/camel/interface.go
index a6992b3..5506847 100644
--- a/pkg/client/informers/externalversions/camel/interface.go
+++ b/pkg/client/informers/externalversions/camel/interface.go
@@ -20,14 +20,14 @@ limitations under the License.
package camel
import (
- v1alpha1 "github.com/apache/camel-k/pkg/client/informers/externalversions/camel/v1alpha1"
+ v1 "github.com/apache/camel-k/pkg/client/informers/externalversions/camel/v1"
internalinterfaces "github.com/apache/camel-k/pkg/client/informers/externalversions/internalinterfaces"
)
// Interface provides access to each of this group's versions.
type Interface interface {
- // V1alpha1 provides access to shared informers for resources in V1alpha1.
- V1alpha1() v1alpha1.Interface
+ // V1 provides access to shared informers for resources in V1.
+ V1() v1.Interface
}
type group struct {
@@ -41,7 +41,7 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
-// V1alpha1 returns a new v1alpha1.Interface.
-func (g *group) V1alpha1() v1alpha1.Interface {
- return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions)
+// V1 returns a new v1.Interface.
+func (g *group) V1() v1.Interface {
+ return v1.New(g.factory, g.namespace, g.tweakListOptions)
}
diff --git a/pkg/client/informers/externalversions/camel/v1alpha1/build.go b/pkg/client/informers/externalversions/camel/v1/build.go
similarity index 80%
rename from pkg/client/informers/externalversions/camel/v1alpha1/build.go
rename to pkg/client/informers/externalversions/camel/v1/build.go
index fa2c2f2..dafb02e 100644
--- a/pkg/client/informers/externalversions/camel/v1alpha1/build.go
+++ b/pkg/client/informers/externalversions/camel/v1/build.go
@@ -17,16 +17,16 @@ limitations under the License.
// Code generated by informer-gen. DO NOT EDIT.
-package v1alpha1
+package v1
import (
time "time"
- camelv1alpha1 "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1"
versioned "github.com/apache/camel-k/pkg/client/clientset/versioned"
internalinterfaces "github.com/apache/camel-k/pkg/client/informers/externalversions/internalinterfaces"
- v1alpha1 "github.com/apache/camel-k/pkg/client/listers/camel/v1alpha1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ v1 "github.com/apache/camel-k/pkg/client/listers/camel/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
cache "k8s.io/client-go/tools/cache"
@@ -36,7 +36,7 @@ import (
// Builds.
type BuildInformer interface {
Informer() cache.SharedIndexInformer
- Lister() v1alpha1.BuildLister
+ Lister() v1.BuildLister
}
type buildInformer struct {
@@ -58,20 +58,20 @@ func NewBuildInformer(client versioned.Interface, namespace string, resyncPeriod
func NewFilteredBuildInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
+ ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
- return client.CamelV1alpha1().Builds(namespace).List(options)
+ return client.CamelV1().Builds(namespace).List(options)
},
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
+ WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
- return client.CamelV1alpha1().Builds(namespace).Watch(options)
+ return client.CamelV1().Builds(namespace).Watch(options)
},
},
- &camelv1alpha1.Build{},
+ &camelv1.Build{},
resyncPeriod,
indexers,
)
@@ -82,9 +82,9 @@ func (f *buildInformer) defaultInformer(client versioned.Interface, resyncPeriod
}
func (f *buildInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&camelv1alpha1.Build{}, f.defaultInformer)
+ return f.factory.InformerFor(&camelv1.Build{}, f.defaultInformer)
}
-func (f *buildInformer) Lister() v1alpha1.BuildLister {
- return v1alpha1.NewBuildLister(f.Informer().GetIndexer())
+func (f *buildInformer) Lister() v1.BuildLister {
+ return v1.NewBuildLister(f.Informer().GetIndexer())
}
diff --git a/pkg/client/informers/externalversions/camel/v1alpha1/integration.go b/pkg/client/informers/externalversions/camel/v1/integration.go
similarity index 80%
rename from pkg/client/informers/externalversions/camel/v1alpha1/integration.go
rename to pkg/client/informers/externalversions/camel/v1/integration.go
index 6523ad3..bb06eea 100644
--- a/pkg/client/informers/externalversions/camel/v1alpha1/integration.go
+++ b/pkg/client/informers/externalversions/camel/v1/integration.go
@@ -17,16 +17,16 @@ limitations under the License.
// Code generated by informer-gen. DO NOT EDIT.
-package v1alpha1
+package v1
import (
time "time"
- camelv1alpha1 "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1"
versioned "github.com/apache/camel-k/pkg/client/clientset/versioned"
internalinterfaces "github.com/apache/camel-k/pkg/client/informers/externalversions/internalinterfaces"
- v1alpha1 "github.com/apache/camel-k/pkg/client/listers/camel/v1alpha1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ v1 "github.com/apache/camel-k/pkg/client/listers/camel/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
cache "k8s.io/client-go/tools/cache"
@@ -36,7 +36,7 @@ import (
// Integrations.
type IntegrationInformer interface {
Informer() cache.SharedIndexInformer
- Lister() v1alpha1.IntegrationLister
+ Lister() v1.IntegrationLister
}
type integrationInformer struct {
@@ -58,20 +58,20 @@ func NewIntegrationInformer(client versioned.Interface, namespace string, resync
func NewFilteredIntegrationInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
+ ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
- return client.CamelV1alpha1().Integrations(namespace).List(options)
+ return client.CamelV1().Integrations(namespace).List(options)
},
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
+ WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
- return client.CamelV1alpha1().Integrations(namespace).Watch(options)
+ return client.CamelV1().Integrations(namespace).Watch(options)
},
},
- &camelv1alpha1.Integration{},
+ &camelv1.Integration{},
resyncPeriod,
indexers,
)
@@ -82,9 +82,9 @@ func (f *integrationInformer) defaultInformer(client versioned.Interface, resync
}
func (f *integrationInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&camelv1alpha1.Integration{}, f.defaultInformer)
+ return f.factory.InformerFor(&camelv1.Integration{}, f.defaultInformer)
}
-func (f *integrationInformer) Lister() v1alpha1.IntegrationLister {
- return v1alpha1.NewIntegrationLister(f.Informer().GetIndexer())
+func (f *integrationInformer) Lister() v1.IntegrationLister {
+ return v1.NewIntegrationLister(f.Informer().GetIndexer())
}
diff --git a/pkg/client/informers/externalversions/camel/v1alpha1/integrationkit.go b/pkg/client/informers/externalversions/camel/v1/integrationkit.go
similarity index 79%
rename from pkg/client/informers/externalversions/camel/v1alpha1/integrationkit.go
rename to pkg/client/informers/externalversions/camel/v1/integrationkit.go
index a15951d..1756a06 100644
--- a/pkg/client/informers/externalversions/camel/v1alpha1/integrationkit.go
+++ b/pkg/client/informers/externalversions/camel/v1/integrationkit.go
@@ -17,16 +17,16 @@ limitations under the License.
// Code generated by informer-gen. DO NOT EDIT.
-package v1alpha1
+package v1
import (
time "time"
- camelv1alpha1 "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1"
versioned "github.com/apache/camel-k/pkg/client/clientset/versioned"
internalinterfaces "github.com/apache/camel-k/pkg/client/informers/externalversions/internalinterfaces"
- v1alpha1 "github.com/apache/camel-k/pkg/client/listers/camel/v1alpha1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ v1 "github.com/apache/camel-k/pkg/client/listers/camel/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
cache "k8s.io/client-go/tools/cache"
@@ -36,7 +36,7 @@ import (
// IntegrationKits.
type IntegrationKitInformer interface {
Informer() cache.SharedIndexInformer
- Lister() v1alpha1.IntegrationKitLister
+ Lister() v1.IntegrationKitLister
}
type integrationKitInformer struct {
@@ -58,20 +58,20 @@ func NewIntegrationKitInformer(client versioned.Interface, namespace string, res
func NewFilteredIntegrationKitInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
+ ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
- return client.CamelV1alpha1().IntegrationKits(namespace).List(options)
+ return client.CamelV1().IntegrationKits(namespace).List(options)
},
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
+ WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
- return client.CamelV1alpha1().IntegrationKits(namespace).Watch(options)
+ return client.CamelV1().IntegrationKits(namespace).Watch(options)
},
},
- &camelv1alpha1.IntegrationKit{},
+ &camelv1.IntegrationKit{},
resyncPeriod,
indexers,
)
@@ -82,9 +82,9 @@ func (f *integrationKitInformer) defaultInformer(client versioned.Interface, res
}
func (f *integrationKitInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&camelv1alpha1.IntegrationKit{}, f.defaultInformer)
+ return f.factory.InformerFor(&camelv1.IntegrationKit{}, f.defaultInformer)
}
-func (f *integrationKitInformer) Lister() v1alpha1.IntegrationKitLister {
- return v1alpha1.NewIntegrationKitLister(f.Informer().GetIndexer())
+func (f *integrationKitInformer) Lister() v1.IntegrationKitLister {
+ return v1.NewIntegrationKitLister(f.Informer().GetIndexer())
}
diff --git a/pkg/client/informers/externalversions/camel/v1alpha1/integrationplatform.go b/pkg/client/informers/externalversions/camel/v1/integrationplatform.go
similarity index 79%
rename from pkg/client/informers/externalversions/camel/v1alpha1/integrationplatform.go
rename to pkg/client/informers/externalversions/camel/v1/integrationplatform.go
index f2ef242..4f31648 100644
--- a/pkg/client/informers/externalversions/camel/v1alpha1/integrationplatform.go
+++ b/pkg/client/informers/externalversions/camel/v1/integrationplatform.go
@@ -17,16 +17,16 @@ limitations under the License.
// Code generated by informer-gen. DO NOT EDIT.
-package v1alpha1
+package v1
import (
time "time"
- camelv1alpha1 "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1"
versioned "github.com/apache/camel-k/pkg/client/clientset/versioned"
internalinterfaces "github.com/apache/camel-k/pkg/client/informers/externalversions/internalinterfaces"
- v1alpha1 "github.com/apache/camel-k/pkg/client/listers/camel/v1alpha1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ v1 "github.com/apache/camel-k/pkg/client/listers/camel/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
cache "k8s.io/client-go/tools/cache"
@@ -36,7 +36,7 @@ import (
// IntegrationPlatforms.
type IntegrationPlatformInformer interface {
Informer() cache.SharedIndexInformer
- Lister() v1alpha1.IntegrationPlatformLister
+ Lister() v1.IntegrationPlatformLister
}
type integrationPlatformInformer struct {
@@ -58,20 +58,20 @@ func NewIntegrationPlatformInformer(client versioned.Interface, namespace string
func NewFilteredIntegrationPlatformInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
+ ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
- return client.CamelV1alpha1().IntegrationPlatforms(namespace).List(options)
+ return client.CamelV1().IntegrationPlatforms(namespace).List(options)
},
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
+ WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
- return client.CamelV1alpha1().IntegrationPlatforms(namespace).Watch(options)
+ return client.CamelV1().IntegrationPlatforms(namespace).Watch(options)
},
},
- &camelv1alpha1.IntegrationPlatform{},
+ &camelv1.IntegrationPlatform{},
resyncPeriod,
indexers,
)
@@ -82,9 +82,9 @@ func (f *integrationPlatformInformer) defaultInformer(client versioned.Interface
}
func (f *integrationPlatformInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&camelv1alpha1.IntegrationPlatform{}, f.defaultInformer)
+ return f.factory.InformerFor(&camelv1.IntegrationPlatform{}, f.defaultInformer)
}
-func (f *integrationPlatformInformer) Lister() v1alpha1.IntegrationPlatformLister {
- return v1alpha1.NewIntegrationPlatformLister(f.Informer().GetIndexer())
+func (f *integrationPlatformInformer) Lister() v1.IntegrationPlatformLister {
+ return v1.NewIntegrationPlatformLister(f.Informer().GetIndexer())
}
diff --git a/pkg/client/informers/externalversions/camel/v1alpha1/interface.go b/pkg/client/informers/externalversions/camel/v1/interface.go
similarity index 99%
rename from pkg/client/informers/externalversions/camel/v1alpha1/interface.go
rename to pkg/client/informers/externalversions/camel/v1/interface.go
index 90d9282..3d4b08f 100644
--- a/pkg/client/informers/externalversions/camel/v1alpha1/interface.go
+++ b/pkg/client/informers/externalversions/camel/v1/interface.go
@@ -17,7 +17,7 @@ limitations under the License.
// Code generated by informer-gen. DO NOT EDIT.
-package v1alpha1
+package v1
import (
internalinterfaces "github.com/apache/camel-k/pkg/client/informers/externalversions/internalinterfaces"
diff --git a/pkg/client/informers/externalversions/generic.go b/pkg/client/informers/externalversions/generic.go
index d40015c..2def9d1 100644
--- a/pkg/client/informers/externalversions/generic.go
+++ b/pkg/client/informers/externalversions/generic.go
@@ -22,7 +22,7 @@ package externalversions
import (
"fmt"
- v1alpha1 "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
schema "k8s.io/apimachinery/pkg/runtime/schema"
cache "k8s.io/client-go/tools/cache"
)
@@ -53,15 +53,15 @@ func (f *genericInformer) Lister() cache.GenericLister {
// TODO extend this to unknown resources with a client pool
func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) {
switch resource {
- // Group=camel.apache.org, Version=v1alpha1
- case v1alpha1.SchemeGroupVersion.WithResource("builds"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Camel().V1alpha1().Builds().Informer()}, nil
- case v1alpha1.SchemeGroupVersion.WithResource("integrations"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Camel().V1alpha1().Integrations().Informer()}, nil
- case v1alpha1.SchemeGroupVersion.WithResource("integrationkits"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Camel().V1alpha1().IntegrationKits().Informer()}, nil
- case v1alpha1.SchemeGroupVersion.WithResource("integrationplatforms"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Camel().V1alpha1().IntegrationPlatforms().Informer()}, nil
+ // Group=camel.apache.org, Version=v1
+ case v1.SchemeGroupVersion.WithResource("builds"):
+ return &genericInformer{resource: resource.GroupResource(), informer: f.Camel().V1().Builds().Informer()}, nil
+ case v1.SchemeGroupVersion.WithResource("integrations"):
+ return &genericInformer{resource: resource.GroupResource(), informer: f.Camel().V1().Integrations().Informer()}, nil
+ case v1.SchemeGroupVersion.WithResource("integrationkits"):
+ return &genericInformer{resource: resource.GroupResource(), informer: f.Camel().V1().IntegrationKits().Informer()}, nil
+ case v1.SchemeGroupVersion.WithResource("integrationplatforms"):
+ return &genericInformer{resource: resource.GroupResource(), informer: f.Camel().V1().IntegrationPlatforms().Informer()}, nil
}
diff --git a/pkg/client/listers/camel/v1alpha1/build.go b/pkg/client/listers/camel/v1/build.go
similarity index 80%
rename from pkg/client/listers/camel/v1alpha1/build.go
rename to pkg/client/listers/camel/v1/build.go
index 430b744..c8eeb04 100644
--- a/pkg/client/listers/camel/v1alpha1/build.go
+++ b/pkg/client/listers/camel/v1/build.go
@@ -17,10 +17,10 @@ limitations under the License.
// Code generated by lister-gen. DO NOT EDIT.
-package v1alpha1
+package v1
import (
- v1alpha1 "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
@@ -29,7 +29,7 @@ import (
// BuildLister helps list Builds.
type BuildLister interface {
// List lists all Builds in the indexer.
- List(selector labels.Selector) (ret []*v1alpha1.Build, err error)
+ List(selector labels.Selector) (ret []*v1.Build, err error)
// Builds returns an object that can list and get Builds.
Builds(namespace string) BuildNamespaceLister
BuildListerExpansion
@@ -46,9 +46,9 @@ func NewBuildLister(indexer cache.Indexer) BuildLister {
}
// List lists all Builds in the indexer.
-func (s *buildLister) List(selector labels.Selector) (ret []*v1alpha1.Build, err error) {
+func (s *buildLister) List(selector labels.Selector) (ret []*v1.Build, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha1.Build))
+ ret = append(ret, m.(*v1.Build))
})
return ret, err
}
@@ -61,9 +61,9 @@ func (s *buildLister) Builds(namespace string) BuildNamespaceLister {
// BuildNamespaceLister helps list and get Builds.
type BuildNamespaceLister interface {
// List lists all Builds in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1alpha1.Build, err error)
+ List(selector labels.Selector) (ret []*v1.Build, err error)
// Get retrieves the Build from the indexer for a given namespace and name.
- Get(name string) (*v1alpha1.Build, error)
+ Get(name string) (*v1.Build, error)
BuildNamespaceListerExpansion
}
@@ -75,21 +75,21 @@ type buildNamespaceLister struct {
}
// List lists all Builds in the indexer for a given namespace.
-func (s buildNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.Build, err error) {
+func (s buildNamespaceLister) List(selector labels.Selector) (ret []*v1.Build, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha1.Build))
+ ret = append(ret, m.(*v1.Build))
})
return ret, err
}
// Get retrieves the Build from the indexer for a given namespace and name.
-func (s buildNamespaceLister) Get(name string) (*v1alpha1.Build, error) {
+func (s buildNamespaceLister) Get(name string) (*v1.Build, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
- return nil, errors.NewNotFound(v1alpha1.Resource("build"), name)
+ return nil, errors.NewNotFound(v1.Resource("build"), name)
}
- return obj.(*v1alpha1.Build), nil
+ return obj.(*v1.Build), nil
}
diff --git a/pkg/client/listers/camel/v1alpha1/expansion_generated.go b/pkg/client/listers/camel/v1/expansion_generated.go
similarity index 99%
rename from pkg/client/listers/camel/v1alpha1/expansion_generated.go
rename to pkg/client/listers/camel/v1/expansion_generated.go
index cd54414..10cc476 100644
--- a/pkg/client/listers/camel/v1alpha1/expansion_generated.go
+++ b/pkg/client/listers/camel/v1/expansion_generated.go
@@ -17,7 +17,7 @@ limitations under the License.
// Code generated by lister-gen. DO NOT EDIT.
-package v1alpha1
+package v1
// BuildListerExpansion allows custom methods to be added to
// BuildLister.
diff --git a/pkg/client/listers/camel/v1alpha1/integration.go b/pkg/client/listers/camel/v1/integration.go
similarity index 81%
rename from pkg/client/listers/camel/v1alpha1/integration.go
rename to pkg/client/listers/camel/v1/integration.go
index d66e0b3..cacac07 100644
--- a/pkg/client/listers/camel/v1alpha1/integration.go
+++ b/pkg/client/listers/camel/v1/integration.go
@@ -17,10 +17,10 @@ limitations under the License.
// Code generated by lister-gen. DO NOT EDIT.
-package v1alpha1
+package v1
import (
- v1alpha1 "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
@@ -29,7 +29,7 @@ import (
// IntegrationLister helps list Integrations.
type IntegrationLister interface {
// List lists all Integrations in the indexer.
- List(selector labels.Selector) (ret []*v1alpha1.Integration, err error)
+ List(selector labels.Selector) (ret []*v1.Integration, err error)
// Integrations returns an object that can list and get Integrations.
Integrations(namespace string) IntegrationNamespaceLister
IntegrationListerExpansion
@@ -46,9 +46,9 @@ func NewIntegrationLister(indexer cache.Indexer) IntegrationLister {
}
// List lists all Integrations in the indexer.
-func (s *integrationLister) List(selector labels.Selector) (ret []*v1alpha1.Integration, err error) {
+func (s *integrationLister) List(selector labels.Selector) (ret []*v1.Integration, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha1.Integration))
+ ret = append(ret, m.(*v1.Integration))
})
return ret, err
}
@@ -61,9 +61,9 @@ func (s *integrationLister) Integrations(namespace string) IntegrationNamespaceL
// IntegrationNamespaceLister helps list and get Integrations.
type IntegrationNamespaceLister interface {
// List lists all Integrations in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1alpha1.Integration, err error)
+ List(selector labels.Selector) (ret []*v1.Integration, err error)
// Get retrieves the Integration from the indexer for a given namespace and name.
- Get(name string) (*v1alpha1.Integration, error)
+ Get(name string) (*v1.Integration, error)
IntegrationNamespaceListerExpansion
}
@@ -75,21 +75,21 @@ type integrationNamespaceLister struct {
}
// List lists all Integrations in the indexer for a given namespace.
-func (s integrationNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.Integration, err error) {
+func (s integrationNamespaceLister) List(selector labels.Selector) (ret []*v1.Integration, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha1.Integration))
+ ret = append(ret, m.(*v1.Integration))
})
return ret, err
}
// Get retrieves the Integration from the indexer for a given namespace and name.
-func (s integrationNamespaceLister) Get(name string) (*v1alpha1.Integration, error) {
+func (s integrationNamespaceLister) Get(name string) (*v1.Integration, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
- return nil, errors.NewNotFound(v1alpha1.Resource("integration"), name)
+ return nil, errors.NewNotFound(v1.Resource("integration"), name)
}
- return obj.(*v1alpha1.Integration), nil
+ return obj.(*v1.Integration), nil
}
diff --git a/pkg/client/listers/camel/v1alpha1/integrationkit.go b/pkg/client/listers/camel/v1/integrationkit.go
similarity index 81%
rename from pkg/client/listers/camel/v1alpha1/integrationkit.go
rename to pkg/client/listers/camel/v1/integrationkit.go
index 6ca6853..c5fb423 100644
--- a/pkg/client/listers/camel/v1alpha1/integrationkit.go
+++ b/pkg/client/listers/camel/v1/integrationkit.go
@@ -17,10 +17,10 @@ limitations under the License.
// Code generated by lister-gen. DO NOT EDIT.
-package v1alpha1
+package v1
import (
- v1alpha1 "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
@@ -29,7 +29,7 @@ import (
// IntegrationKitLister helps list IntegrationKits.
type IntegrationKitLister interface {
// List lists all IntegrationKits in the indexer.
- List(selector labels.Selector) (ret []*v1alpha1.IntegrationKit, err error)
+ List(selector labels.Selector) (ret []*v1.IntegrationKit, err error)
// IntegrationKits returns an object that can list and get IntegrationKits.
IntegrationKits(namespace string) IntegrationKitNamespaceLister
IntegrationKitListerExpansion
@@ -46,9 +46,9 @@ func NewIntegrationKitLister(indexer cache.Indexer) IntegrationKitLister {
}
// List lists all IntegrationKits in the indexer.
-func (s *integrationKitLister) List(selector labels.Selector) (ret []*v1alpha1.IntegrationKit, err error) {
+func (s *integrationKitLister) List(selector labels.Selector) (ret []*v1.IntegrationKit, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha1.IntegrationKit))
+ ret = append(ret, m.(*v1.IntegrationKit))
})
return ret, err
}
@@ -61,9 +61,9 @@ func (s *integrationKitLister) IntegrationKits(namespace string) IntegrationKitN
// IntegrationKitNamespaceLister helps list and get IntegrationKits.
type IntegrationKitNamespaceLister interface {
// List lists all IntegrationKits in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1alpha1.IntegrationKit, err error)
+ List(selector labels.Selector) (ret []*v1.IntegrationKit, err error)
// Get retrieves the IntegrationKit from the indexer for a given namespace and name.
- Get(name string) (*v1alpha1.IntegrationKit, error)
+ Get(name string) (*v1.IntegrationKit, error)
IntegrationKitNamespaceListerExpansion
}
@@ -75,21 +75,21 @@ type integrationKitNamespaceLister struct {
}
// List lists all IntegrationKits in the indexer for a given namespace.
-func (s integrationKitNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.IntegrationKit, err error) {
+func (s integrationKitNamespaceLister) List(selector labels.Selector) (ret []*v1.IntegrationKit, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha1.IntegrationKit))
+ ret = append(ret, m.(*v1.IntegrationKit))
})
return ret, err
}
// Get retrieves the IntegrationKit from the indexer for a given namespace and name.
-func (s integrationKitNamespaceLister) Get(name string) (*v1alpha1.IntegrationKit, error) {
+func (s integrationKitNamespaceLister) Get(name string) (*v1.IntegrationKit, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
- return nil, errors.NewNotFound(v1alpha1.Resource("integrationkit"), name)
+ return nil, errors.NewNotFound(v1.Resource("integrationkit"), name)
}
- return obj.(*v1alpha1.IntegrationKit), nil
+ return obj.(*v1.IntegrationKit), nil
}
diff --git a/pkg/client/listers/camel/v1alpha1/integrationplatform.go b/pkg/client/listers/camel/v1/integrationplatform.go
similarity index 82%
rename from pkg/client/listers/camel/v1alpha1/integrationplatform.go
rename to pkg/client/listers/camel/v1/integrationplatform.go
index 386d651..b9a223e 100644
--- a/pkg/client/listers/camel/v1alpha1/integrationplatform.go
+++ b/pkg/client/listers/camel/v1/integrationplatform.go
@@ -17,10 +17,10 @@ limitations under the License.
// Code generated by lister-gen. DO NOT EDIT.
-package v1alpha1
+package v1
import (
- v1alpha1 "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
@@ -29,7 +29,7 @@ import (
// IntegrationPlatformLister helps list IntegrationPlatforms.
type IntegrationPlatformLister interface {
// List lists all IntegrationPlatforms in the indexer.
- List(selector labels.Selector) (ret []*v1alpha1.IntegrationPlatform, err error)
+ List(selector labels.Selector) (ret []*v1.IntegrationPlatform, err error)
// IntegrationPlatforms returns an object that can list and get IntegrationPlatforms.
IntegrationPlatforms(namespace string) IntegrationPlatformNamespaceLister
IntegrationPlatformListerExpansion
@@ -46,9 +46,9 @@ func NewIntegrationPlatformLister(indexer cache.Indexer) IntegrationPlatformList
}
// List lists all IntegrationPlatforms in the indexer.
-func (s *integrationPlatformLister) List(selector labels.Selector) (ret []*v1alpha1.IntegrationPlatform, err error) {
+func (s *integrationPlatformLister) List(selector labels.Selector) (ret []*v1.IntegrationPlatform, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha1.IntegrationPlatform))
+ ret = append(ret, m.(*v1.IntegrationPlatform))
})
return ret, err
}
@@ -61,9 +61,9 @@ func (s *integrationPlatformLister) IntegrationPlatforms(namespace string) Integ
// IntegrationPlatformNamespaceLister helps list and get IntegrationPlatforms.
type IntegrationPlatformNamespaceLister interface {
// List lists all IntegrationPlatforms in the indexer for a given namespace.
- List(selector labels.Selector) (ret []*v1alpha1.IntegrationPlatform, err error)
+ List(selector labels.Selector) (ret []*v1.IntegrationPlatform, err error)
// Get retrieves the IntegrationPlatform from the indexer for a given namespace and name.
- Get(name string) (*v1alpha1.IntegrationPlatform, error)
+ Get(name string) (*v1.IntegrationPlatform, error)
IntegrationPlatformNamespaceListerExpansion
}
@@ -75,21 +75,21 @@ type integrationPlatformNamespaceLister struct {
}
// List lists all IntegrationPlatforms in the indexer for a given namespace.
-func (s integrationPlatformNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.IntegrationPlatform, err error) {
+func (s integrationPlatformNamespaceLister) List(selector labels.Selector) (ret []*v1.IntegrationPlatform, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha1.IntegrationPlatform))
+ ret = append(ret, m.(*v1.IntegrationPlatform))
})
return ret, err
}
// Get retrieves the IntegrationPlatform from the indexer for a given namespace and name.
-func (s integrationPlatformNamespaceLister) Get(name string) (*v1alpha1.IntegrationPlatform, error) {
+func (s integrationPlatformNamespaceLister) Get(name string) (*v1.IntegrationPlatform, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
- return nil, errors.NewNotFound(v1alpha1.Resource("integrationplatform"), name)
+ return nil, errors.NewNotFound(v1.Resource("integrationplatform"), name)
}
- return obj.(*v1alpha1.IntegrationPlatform), nil
+ return obj.(*v1.IntegrationPlatform), nil
}
diff --git a/pkg/cmd/builder/builder.go b/pkg/cmd/builder/builder.go
index 9fa9e9b..74e69ca 100644
--- a/pkg/cmd/builder/builder.go
+++ b/pkg/cmd/builder/builder.go
@@ -33,7 +33,7 @@ import (
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/builder"
"github.com/apache/camel-k/pkg/client"
"github.com/apache/camel-k/pkg/util/cancellable"
@@ -64,12 +64,12 @@ func Run(namespace string, buildName string, taskName string) {
ctx := cancellable.NewContext()
- build := &v1alpha1.Build{}
+ build := &v1.Build{}
exitOnError(
c.Get(ctx, types.NamespacedName{Namespace: namespace, Name: buildName}, build),
)
- var task *v1alpha1.BuilderTask
+ var task *v1.BuilderTask
for _, t := range build.Spec.Tasks {
if t.Builder != nil && t.Builder.Name == taskName {
task = t.Builder
@@ -77,7 +77,7 @@ func Run(namespace string, buildName string, taskName string) {
}
if task == nil {
exitOnError(errors.Errorf("No task of type [%s] with name [%s] in build [%s/%s]",
- reflect.TypeOf(v1alpha1.BuilderTask{}).Name(), taskName, namespace, buildName))
+ reflect.TypeOf(v1.BuilderTask{}).Name(), taskName, namespace, buildName))
}
status := builder.New(c).Run(*task)
@@ -92,7 +92,7 @@ func Run(namespace string, buildName string, taskName string) {
build.Status = target.Status
switch build.Status.Phase {
- case v1alpha1.BuildPhaseFailed:
+ case v1.BuildPhaseFailed:
log.Error(nil, build.Status.Error)
os.Exit(1)
default:
diff --git a/pkg/cmd/completion_bash.go b/pkg/cmd/completion_bash.go
index 9048ea3..d1100f4 100644
--- a/pkg/cmd/completion_bash.go
+++ b/pkg/cmd/completion_bash.go
@@ -22,7 +22,7 @@ import (
"fmt"
"strings"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/platform"
@@ -253,7 +253,7 @@ func configureBashAnnotationForFlag(command *cobra.Command, flagName string, ann
func computeCamelDependencies() string {
catalog, err := camel.DefaultCatalog()
if err != nil || catalog == nil {
- catalog = camel.NewRuntimeCatalog(v1alpha1.CamelCatalog{}.Spec)
+ catalog = camel.NewRuntimeCatalog(v1.CamelCatalog{}.Spec)
}
results := make([]string, 0, len(catalog.Artifacts))
diff --git a/pkg/cmd/delete.go b/pkg/cmd/delete.go
index aaf9863..0a4d844 100644
--- a/pkg/cmd/delete.go
+++ b/pkg/cmd/delete.go
@@ -22,7 +22,7 @@ import (
"fmt"
"strconv"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/util/kubernetes"
"github.com/spf13/cobra"
k8errors "k8s.io/apimachinery/pkg/api/errors"
@@ -92,10 +92,10 @@ func (command *deleteCmdOptions) run(args []string) error {
}
}
} else if command.DeleteAll {
- integrationList := v1alpha1.IntegrationList{
+ integrationList := v1.IntegrationList{
TypeMeta: metav1.TypeMeta{
- APIVersion: v1alpha1.SchemeGroupVersion.String(),
- Kind: v1alpha1.IntegrationKind,
+ APIVersion: v1.SchemeGroupVersion.String(),
+ Kind: v1.IntegrationKind,
},
}
diff --git a/pkg/cmd/describe.go b/pkg/cmd/describe.go
index 13ed541..1345f7a 100644
--- a/pkg/cmd/describe.go
+++ b/pkg/cmd/describe.go
@@ -23,7 +23,7 @@ import (
"github.com/apache/camel-k/pkg/util/indentedwriter"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/spf13/cobra"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -50,7 +50,7 @@ func describeObjectMeta(w *indentedwriter.Writer, om metav1.ObjectMeta) {
w.Write(0, "Creation Timestamp:\t%s\n", om.CreationTimestamp.Format(time.RFC1123Z))
}
-func describeTraits(w *indentedwriter.Writer, traits map[string]v1alpha1.TraitSpec) {
+func describeTraits(w *indentedwriter.Writer, traits map[string]v1.TraitSpec) {
if len(traits) > 0 {
w.Write(0, "Traits:\n")
diff --git a/pkg/cmd/describe_integration.go b/pkg/cmd/describe_integration.go
index bd4647c..0b581b7 100644
--- a/pkg/cmd/describe_integration.go
+++ b/pkg/cmd/describe_integration.go
@@ -22,7 +22,7 @@ import (
"io"
"strings"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/util/indentedwriter"
"github.com/spf13/cobra"
@@ -77,7 +77,7 @@ func (command *describeIntegrationCommandOptions) run(args []string) error {
return err
}
- ctx := v1alpha1.NewIntegration(command.Namespace, args[0])
+ ctx := v1.NewIntegration(command.Namespace, args[0])
key := k8sclient.ObjectKey{
Namespace: command.Namespace,
Name: args[0],
@@ -92,7 +92,7 @@ func (command *describeIntegrationCommandOptions) run(args []string) error {
return nil
}
-func (command *describeIntegrationCommandOptions) describeIntegration(i v1alpha1.Integration) string {
+func (command *describeIntegrationCommandOptions) describeIntegration(i v1.Integration) string {
return indentedwriter.IndentedString(func(out io.Writer) {
w := indentedwriter.NewWriter(out)
diff --git a/pkg/cmd/describe_kit.go b/pkg/cmd/describe_kit.go
index c0d42f6..2a4b02f 100644
--- a/pkg/cmd/describe_kit.go
+++ b/pkg/cmd/describe_kit.go
@@ -23,7 +23,7 @@ import (
"github.com/apache/camel-k/pkg/util/indentedwriter"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/spf13/cobra"
k8sclient "sigs.k8s.io/controller-runtime/pkg/client"
)
@@ -70,7 +70,7 @@ func (command *describeKitCommandOptions) run(args []string) error {
return err
}
- kit := v1alpha1.NewIntegrationKit(command.Namespace, args[0])
+ kit := v1.NewIntegrationKit(command.Namespace, args[0])
kitKey := k8sclient.ObjectKey{
Namespace: command.Namespace,
Name: args[0],
@@ -85,7 +85,7 @@ func (command *describeKitCommandOptions) run(args []string) error {
return nil
}
-func (command *describeKitCommandOptions) describeIntegrationKit(kit v1alpha1.IntegrationKit) string {
+func (command *describeKitCommandOptions) describeIntegrationKit(kit v1.IntegrationKit) string {
return indentedwriter.IndentedString(func(out io.Writer) {
w := indentedwriter.NewWriter(out)
diff --git a/pkg/cmd/describe_platform.go b/pkg/cmd/describe_platform.go
index ddcb799..902bda9 100644
--- a/pkg/cmd/describe_platform.go
+++ b/pkg/cmd/describe_platform.go
@@ -23,7 +23,7 @@ import (
"github.com/apache/camel-k/pkg/util/indentedwriter"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/spf13/cobra"
k8sclient "sigs.k8s.io/controller-runtime/pkg/client"
)
@@ -70,7 +70,7 @@ func (command *describePlatformCommandOptions) run(args []string) error {
return err
}
- platform := v1alpha1.NewIntegrationPlatform(command.Namespace, args[0])
+ platform := v1.NewIntegrationPlatform(command.Namespace, args[0])
platformKey := k8sclient.ObjectKey{
Namespace: command.Namespace,
Name: args[0],
@@ -85,7 +85,7 @@ func (command *describePlatformCommandOptions) run(args []string) error {
return nil
}
-func (command *describePlatformCommandOptions) describeIntegrationPlatform(platform v1alpha1.IntegrationPlatform) string {
+func (command *describePlatformCommandOptions) describeIntegrationPlatform(platform v1.IntegrationPlatform) string {
return indentedwriter.IndentedString(func(out io.Writer) {
w := indentedwriter.NewWriter(out)
describeObjectMeta(w, platform.ObjectMeta)
@@ -110,18 +110,18 @@ func (command *describePlatformCommandOptions) describeIntegrationPlatform(platf
})
}
-func getPlatformBaseImage(spec v1alpha1.IntegrationPlatformSpec) string {
+func getPlatformBaseImage(spec v1.IntegrationPlatformSpec) string {
return spec.Build.BaseImage
}
-func getPlatformCamelVersion(spec v1alpha1.IntegrationPlatformSpec) string {
+func getPlatformCamelVersion(spec v1.IntegrationPlatformSpec) string {
return spec.Build.CamelVersion
}
-func getPlatformMavenLocalRepository(spec v1alpha1.IntegrationPlatformSpec) string {
+func getPlatformMavenLocalRepository(spec v1.IntegrationPlatformSpec) string {
return spec.Build.Maven.LocalRepository
}
-func getPlatformPublishStrategy(spec v1alpha1.IntegrationPlatformSpec) string {
+func getPlatformPublishStrategy(spec v1.IntegrationPlatformSpec) string {
return string(spec.Build.PublishStrategy)
}
diff --git a/pkg/cmd/get.go b/pkg/cmd/get.go
index 3e10f96..330b31f 100644
--- a/pkg/cmd/get.go
+++ b/pkg/cmd/get.go
@@ -27,7 +27,7 @@ import (
"github.com/spf13/cobra"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
)
type getCmdOptions struct {
@@ -55,9 +55,9 @@ func (o *getCmdOptions) run(cmd *cobra.Command, args []string) error {
return err
}
- integrationList := v1alpha1.IntegrationList{
+ integrationList := v1.IntegrationList{
TypeMeta: metav1.TypeMeta{
- APIVersion: v1alpha1.SchemeGroupVersion.String(),
+ APIVersion: v1.SchemeGroupVersion.String(),
Kind: "Integration",
},
}
diff --git a/pkg/cmd/install.go b/pkg/cmd/install.go
index 9519777..301e510 100644
--- a/pkg/cmd/install.go
+++ b/pkg/cmd/install.go
@@ -30,7 +30,7 @@ import (
"github.com/apache/camel-k/deploy"
"github.com/apache/camel-k/pkg/apis"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/client"
"github.com/apache/camel-k/pkg/install"
"github.com/apache/camel-k/pkg/util/kubernetes"
@@ -135,7 +135,7 @@ type installCmdOptions struct {
TraitProfile string `mapstructure:"trait-profile"`
HTTPProxySecret string `mapstructure:"http-proxy-secret"`
- registry v1alpha1.IntegrationPlatformRegistrySpec
+ registry v1.IntegrationPlatformRegistrySpec
registryAuth registry.Auth
}
@@ -232,10 +232,10 @@ func (o *installCmdOptions) install(_ *cobra.Command, _ []string) error {
}
if o.BuildStrategy != "" {
switch s := o.BuildStrategy; s {
- case v1alpha1.IntegrationPlatformBuildStrategyPod:
- platform.Spec.Build.BuildStrategy = v1alpha1.IntegrationPlatformBuildStrategyPod
- case v1alpha1.IntegrationPlatformBuildStrategyRoutine:
- platform.Spec.Build.BuildStrategy = v1alpha1.IntegrationPlatformBuildStrategyRoutine
+ case v1.IntegrationPlatformBuildStrategyPod:
+ platform.Spec.Build.BuildStrategy = v1.IntegrationPlatformBuildStrategyPod
+ case v1.IntegrationPlatformBuildStrategyRoutine:
+ platform.Spec.Build.BuildStrategy = v1.IntegrationPlatformBuildStrategyRoutine
default:
return fmt.Errorf("unknown build strategy: %s", s)
}
@@ -251,7 +251,7 @@ func (o *installCmdOptions) install(_ *cobra.Command, _ []string) error {
}
}
if o.TraitProfile != "" {
- platform.Spec.Profile = v1alpha1.TraitProfileByName(o.TraitProfile)
+ platform.Spec.Profile = v1.TraitProfileByName(o.TraitProfile)
}
if len(o.MavenRepositories) > 0 {
@@ -273,7 +273,7 @@ func (o *installCmdOptions) install(_ *cobra.Command, _ []string) error {
}
if o.ClusterType != "" {
- for _, c := range v1alpha1.AllIntegrationPlatformClusters {
+ for _, c := range v1.AllIntegrationPlatformClusters {
if strings.EqualFold(string(c), o.ClusterType) {
platform.Spec.Cluster = c
}
@@ -346,17 +346,17 @@ func (o *installCmdOptions) printOutput(collection *kubernetes.Collection) error
return nil
}
-func (o *installCmdOptions) waitForPlatformReady(platform *v1alpha1.IntegrationPlatform) error {
- handler := func(i *v1alpha1.IntegrationPlatform) bool {
+func (o *installCmdOptions) waitForPlatformReady(platform *v1.IntegrationPlatform) error {
+ handler := func(i *v1.IntegrationPlatform) bool {
if i.Status.Phase != "" {
fmt.Println("platform \""+platform.Name+"\" in phase", i.Status.Phase)
- if i.Status.Phase == v1alpha1.IntegrationPlatformPhaseReady {
+ if i.Status.Phase == v1.IntegrationPlatformPhaseReady {
// TODO display some error info when available in the status
return false
}
- if i.Status.Phase == v1alpha1.IntegrationPlatformPhaseError {
+ if i.Status.Phase == v1.IntegrationPlatformPhaseError {
fmt.Println("platform installation failed")
return false
}
@@ -405,8 +405,8 @@ func (o *installCmdOptions) validate(_ *cobra.Command, _ []string) error {
}
if o.TraitProfile != "" {
- tp := v1alpha1.TraitProfileByName(o.TraitProfile)
- if tp == v1alpha1.TraitProfile("") {
+ tp := v1.TraitProfileByName(o.TraitProfile)
+ if tp == v1.TraitProfile("") {
err := fmt.Errorf("unknown trait profile %s", o.TraitProfile)
result = multierr.Append(result, err)
}
@@ -431,7 +431,7 @@ func errorIfKitIsNotAvailable(schema *runtime.Scheme, kit string) error {
if kind.Kind != "IntegrationKit" {
continue
}
- integrationKit := resource.(*v1alpha1.IntegrationKit)
+ integrationKit := resource.(*v1.IntegrationKit)
if integrationKit.Name == kit {
return nil
}
@@ -439,7 +439,7 @@ func errorIfKitIsNotAvailable(schema *runtime.Scheme, kit string) error {
return errors.Errorf("Unknown kit '%s'", kit)
}
-func decodeMavenSettings(mavenSettings string) (v1alpha1.ValueSource, error) {
+func decodeMavenSettings(mavenSettings string) (v1.ValueSource, error) {
sub := make([]string, 0)
rex := regexp.MustCompile(`^(configmap|secret):([a-zA-Z0-9][a-zA-Z0-9-]*)(/([a-zA-Z0-9].*))?$`)
hits := rex.FindAllStringSubmatch(mavenSettings, -1)
@@ -458,7 +458,7 @@ func decodeMavenSettings(mavenSettings string) (v1alpha1.ValueSource, error) {
}
if sub[0] == "configmap" {
- return v1alpha1.ValueSource{
+ return v1.ValueSource{
ConfigMapKeyRef: &corev1.ConfigMapKeySelector{
LocalObjectReference: corev1.LocalObjectReference{
Name: sub[1],
@@ -468,7 +468,7 @@ func decodeMavenSettings(mavenSettings string) (v1alpha1.ValueSource, error) {
}, nil
}
if sub[0] == "secret" {
- return v1alpha1.ValueSource{
+ return v1.ValueSource{
SecretKeyRef: &corev1.SecretKeySelector{
LocalObjectReference: corev1.LocalObjectReference{
Name: sub[1],
@@ -479,5 +479,5 @@ func decodeMavenSettings(mavenSettings string) (v1alpha1.ValueSource, error) {
}
}
- return v1alpha1.ValueSource{}, fmt.Errorf("illegal maven setting definition, syntax: configmap|secret:resource-name[/settings path]")
+ return v1.ValueSource{}, fmt.Errorf("illegal maven setting definition, syntax: configmap|secret:resource-name[/settings path]")
}
diff --git a/pkg/cmd/install_test.go b/pkg/cmd/install_test.go
index bf8b58d..34a8322 100644
--- a/pkg/cmd/install_test.go
+++ b/pkg/cmd/install_test.go
@@ -23,7 +23,7 @@ import (
"github.com/apache/camel-k/pkg/util/test"
"github.com/spf13/cobra"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/stretchr/testify/assert"
)
@@ -44,7 +44,7 @@ func addTestInstallCmd(options RootCmdOptions, rootCmd *cobra.Command) *installC
func TestDecodeMavenSettings(t *testing.T) {
var err error
- var val v1alpha1.ValueSource
+ var val v1.ValueSource
//
// ConfigMap
diff --git a/pkg/cmd/kit_create.go b/pkg/cmd/kit_create.go
index a29c4b3..ac370ae 100644
--- a/pkg/cmd/kit_create.go
+++ b/pkg/cmd/kit_create.go
@@ -22,7 +22,7 @@ import (
"fmt"
"strings"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/trait"
"github.com/apache/camel-k/pkg/util"
"github.com/apache/camel-k/pkg/util/kubernetes"
@@ -98,7 +98,7 @@ func (command *kitCreateCommandOptions) run(_ *cobra.Command, args []string) err
}
}
- ctx := v1alpha1.NewIntegrationKit(command.Namespace, args[0])
+ ctx := v1.NewIntegrationKit(command.Namespace, args[0])
key := k8sclient.ObjectKey{
Namespace: command.Namespace,
Name: args[0],
@@ -107,19 +107,19 @@ func (command *kitCreateCommandOptions) run(_ *cobra.Command, args []string) err
// the integration kit already exists, let's check that it is
// not a platform one which is supposed to be "read only"
- if ctx.Labels["camel.apache.org/kit.type"] == v1alpha1.IntegrationKitTypePlatform {
+ if ctx.Labels["camel.apache.org/kit.type"] == v1.IntegrationKitTypePlatform {
fmt.Printf("integration kit \"%s\" is not editable\n", ctx.Name)
return nil
}
}
- ctx = v1alpha1.NewIntegrationKit(command.Namespace, kubernetes.SanitizeName(args[0]))
+ ctx = v1.NewIntegrationKit(command.Namespace, kubernetes.SanitizeName(args[0]))
ctx.Labels = map[string]string{
- "camel.apache.org/kit.type": v1alpha1.IntegrationKitTypeUser,
+ "camel.apache.org/kit.type": v1.IntegrationKitTypeUser,
}
- ctx.Spec = v1alpha1.IntegrationKitSpec{
+ ctx.Spec = v1.IntegrationKitSpec{
Dependencies: make([]string, 0, len(command.Dependencies)),
- Configuration: make([]v1alpha1.ConfigurationSpec, 0),
+ Configuration: make([]v1.ConfigurationSpec, 0),
Repositories: command.Repositories,
}
@@ -129,7 +129,7 @@ func (command *kitCreateCommandOptions) run(_ *cobra.Command, args []string) err
// is be marked as external as the information about the classpath
// is missing so it cannot be used as base for other Kits
//
- ctx.Labels["camel.apache.org/kit.type"] = v1alpha1.IntegrationKitTypeExternal
+ ctx.Labels["camel.apache.org/kit.type"] = v1.IntegrationKitTypeExternal
//
// Set the Image to be used by the kit
@@ -150,19 +150,19 @@ func (command *kitCreateCommandOptions) run(_ *cobra.Command, args []string) err
}
for _, item := range command.Properties {
- ctx.Spec.Configuration = append(ctx.Spec.Configuration, v1alpha1.ConfigurationSpec{
+ ctx.Spec.Configuration = append(ctx.Spec.Configuration, v1.ConfigurationSpec{
Type: "property",
Value: item,
})
}
for _, item := range command.Configmaps {
- ctx.Spec.Configuration = append(ctx.Spec.Configuration, v1alpha1.ConfigurationSpec{
+ ctx.Spec.Configuration = append(ctx.Spec.Configuration, v1.ConfigurationSpec{
Type: "configmap",
Value: item,
})
}
for _, item := range command.Secrets {
- ctx.Spec.Configuration = append(ctx.Spec.Configuration, v1alpha1.ConfigurationSpec{
+ ctx.Spec.Configuration = append(ctx.Spec.Configuration, v1.ConfigurationSpec{
Type: "secret",
Value: item,
})
@@ -201,9 +201,9 @@ func (command *kitCreateCommandOptions) run(_ *cobra.Command, args []string) err
return nil
}
-func (*kitCreateCommandOptions) configureTrait(ctx *v1alpha1.IntegrationKit, config string) error {
+func (*kitCreateCommandOptions) configureTrait(ctx *v1.IntegrationKit, config string) error {
if ctx.Spec.Traits == nil {
- ctx.Spec.Traits = make(map[string]v1alpha1.TraitSpec)
+ ctx.Spec.Traits = make(map[string]v1.TraitSpec)
}
parts := traitConfigRegexp.FindStringSubmatch(config)
@@ -216,7 +216,7 @@ func (*kitCreateCommandOptions) configureTrait(ctx *v1alpha1.IntegrationKit, con
spec, ok := ctx.Spec.Traits[traitID]
if !ok {
- spec = v1alpha1.TraitSpec{
+ spec = v1.TraitSpec{
Configuration: make(map[string]string),
}
}
diff --git a/pkg/cmd/kit_delete.go b/pkg/cmd/kit_delete.go
index 3d02d03..cbec001 100644
--- a/pkg/cmd/kit_delete.go
+++ b/pkg/cmd/kit_delete.go
@@ -23,7 +23,7 @@ import (
k8sclient "sigs.k8s.io/controller-runtime/pkg/client"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/spf13/cobra"
k8errors "k8s.io/apimachinery/pkg/api/errors"
@@ -81,7 +81,7 @@ func (command *kitDeleteCommandOptions) run(args []string) error {
}
if command.All {
- kitList := v1alpha1.NewIntegrationKitList()
+ kitList := v1.NewIntegrationKitList()
if err := c.List(command.Context, &kitList, k8sclient.InNamespace(command.Namespace)); err != nil {
return err
}
@@ -89,7 +89,7 @@ func (command *kitDeleteCommandOptions) run(args []string) error {
names = make([]string, 0, len(kitList.Items))
for _, item := range kitList.Items {
// only include non platform Kits
- if item.Labels["camel.apache.org/kit.type"] != v1alpha1.IntegrationKitTypePlatform {
+ if item.Labels["camel.apache.org/kit.type"] != v1.IntegrationKitTypePlatform {
names = append(names, item.Name)
}
}
@@ -105,7 +105,7 @@ func (command *kitDeleteCommandOptions) run(args []string) error {
}
func (command *kitDeleteCommandOptions) delete(name string) error {
- ctx := v1alpha1.NewIntegrationKit(command.Namespace, name)
+ ctx := v1.NewIntegrationKit(command.Namespace, name)
key := k8sclient.ObjectKey{
Namespace: command.Namespace,
Name: name,
@@ -129,7 +129,7 @@ func (command *kitDeleteCommandOptions) delete(name string) error {
// check that it is not a platform one which is supposed to be "read only"
// thus not managed by the end user
- if ctx.Labels["camel.apache.org/kit.type"] == v1alpha1.IntegrationKitTypePlatform {
+ if ctx.Labels["camel.apache.org/kit.type"] == v1.IntegrationKitTypePlatform {
// skip platform Kits while deleting all Kits
if command.All {
return nil
diff --git a/pkg/cmd/kit_get.go b/pkg/cmd/kit_get.go
index b20489f..55d9214 100644
--- a/pkg/cmd/kit_get.go
+++ b/pkg/cmd/kit_get.go
@@ -25,7 +25,7 @@ import (
k8sclient "sigs.k8s.io/controller-runtime/pkg/client"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
)
func newKitGetCmd(rootCmdOptions *RootCmdOptions) (*cobra.Command, *kitGetCommandOptions) {
@@ -50,9 +50,9 @@ func newKitGetCmd(rootCmdOptions *RootCmdOptions) (*cobra.Command, *kitGetComman
},
}
- cmd.Flags().Bool(v1alpha1.IntegrationKitTypeUser, true, "Includes user Kits")
- cmd.Flags().Bool(v1alpha1.IntegrationKitTypeExternal, true, "Includes external Kits")
- cmd.Flags().Bool(v1alpha1.IntegrationKitTypePlatform, true, "Includes platform Kits")
+ cmd.Flags().Bool(v1.IntegrationKitTypeUser, true, "Includes user Kits")
+ cmd.Flags().Bool(v1.IntegrationKitTypeExternal, true, "Includes external Kits")
+ cmd.Flags().Bool(v1.IntegrationKitTypePlatform, true, "Includes platform Kits")
return &cmd, &options
}
@@ -69,7 +69,7 @@ func (command *kitGetCommandOptions) validate(cmd *cobra.Command, args []string)
}
func (command *kitGetCommandOptions) run(cmd *cobra.Command) error {
- kitList := v1alpha1.NewIntegrationKitList()
+ kitList := v1.NewIntegrationKitList()
c, err := command.GetCmdClient()
if err != nil {
return err
@@ -82,9 +82,9 @@ func (command *kitGetCommandOptions) run(cmd *cobra.Command) error {
fmt.Fprintln(w, "NAME\tPHASE\tTYPE\tIMAGE")
for _, ctx := range kitList.Items {
t := ctx.Labels["camel.apache.org/kit.type"]
- u := command.User && t == v1alpha1.IntegrationKitTypeUser
- e := command.External && t == v1alpha1.IntegrationKitTypeExternal
- p := command.Platform && t == v1alpha1.IntegrationKitTypePlatform
+ u := command.User && t == v1.IntegrationKitTypeUser
+ e := command.External && t == v1.IntegrationKitTypeExternal
+ p := command.Platform && t == v1.IntegrationKitTypePlatform
if u || e || p {
fmt.Fprintf(w, "%s\t%s\t%s\t%s\n", ctx.Name, string(ctx.Status.Phase), t, ctx.Status.Image)
diff --git a/pkg/cmd/log.go b/pkg/cmd/log.go
index de6d0db..f1d5697 100644
--- a/pkg/cmd/log.go
+++ b/pkg/cmd/log.go
@@ -20,7 +20,7 @@ package cmd
import (
"fmt"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
k8slog "github.com/apache/camel-k/pkg/util/kubernetes/log"
"github.com/spf13/cobra"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -64,10 +64,10 @@ func (o *logCmdOptions) run(cmd *cobra.Command, args []string) error {
if err != nil {
return err
}
- integration := v1alpha1.Integration{
+ integration := v1.Integration{
TypeMeta: metav1.TypeMeta{
- Kind: v1alpha1.IntegrationKind,
- APIVersion: v1alpha1.SchemeGroupVersion.String(),
+ Kind: v1.IntegrationKind,
+ APIVersion: v1.SchemeGroupVersion.String(),
},
ObjectMeta: metav1.ObjectMeta{
Namespace: o.Namespace,
diff --git a/pkg/cmd/rebuild.go b/pkg/cmd/rebuild.go
index 82e845c..763506a 100644
--- a/pkg/cmd/rebuild.go
+++ b/pkg/cmd/rebuild.go
@@ -25,7 +25,7 @@ import (
k8sclient "sigs.k8s.io/controller-runtime/pkg/client"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/client"
)
@@ -54,7 +54,7 @@ func (o *rebuildCmdOptions) rebuild(_ *cobra.Command, args []string) error {
return err
}
- var integrations []v1alpha1.Integration
+ var integrations []v1.Integration
if len(args) == 0 {
if integrations, err = o.listAllIntegrations(c); err != nil {
return err
@@ -73,18 +73,18 @@ func (o *rebuildCmdOptions) rebuild(_ *cobra.Command, args []string) error {
return nil
}
-func (o *rebuildCmdOptions) listAllIntegrations(c client.Client) ([]v1alpha1.Integration, error) {
- list := v1alpha1.NewIntegrationList()
+func (o *rebuildCmdOptions) listAllIntegrations(c client.Client) ([]v1.Integration, error) {
+ list := v1.NewIntegrationList()
if err := c.List(o.Context, &list, k8sclient.InNamespace(o.Namespace)); err != nil {
return nil, errors.Wrap(err, fmt.Sprintf("could not retrieve integrations from namespace %s", o.Namespace))
}
return list.Items, nil
}
-func (o *rebuildCmdOptions) getIntegrations(c client.Client, names []string) ([]v1alpha1.Integration, error) {
- ints := make([]v1alpha1.Integration, 0, len(names))
+func (o *rebuildCmdOptions) getIntegrations(c client.Client, names []string) ([]v1.Integration, error) {
+ ints := make([]v1.Integration, 0, len(names))
for _, n := range names {
- it := v1alpha1.NewIntegration(o.Namespace, n)
+ it := v1.NewIntegration(o.Namespace, n)
key := k8sclient.ObjectKey{
Name: n,
Namespace: o.Namespace,
@@ -97,10 +97,10 @@ func (o *rebuildCmdOptions) getIntegrations(c client.Client, names []string) ([]
return ints, nil
}
-func (o *rebuildCmdOptions) rebuildIntegrations(c k8sclient.StatusClient, integrations []v1alpha1.Integration) error {
+func (o *rebuildCmdOptions) rebuildIntegrations(c k8sclient.StatusClient, integrations []v1.Integration) error {
for _, i := range integrations {
it := i
- it.Status = v1alpha1.IntegrationStatus{}
+ it.Status = v1.IntegrationStatus{}
if err := c.Status().Update(o.Context, &it); err != nil {
return errors.Wrap(err, fmt.Sprintf("could not rebuild integration %s in namespace %s", it.Name, o.Namespace))
}
diff --git a/pkg/cmd/reset.go b/pkg/cmd/reset.go
index 0275493..80faeb7 100644
--- a/pkg/cmd/reset.go
+++ b/pkg/cmd/reset.go
@@ -25,7 +25,7 @@ import (
k8sclient "sigs.k8s.io/controller-runtime/pkg/client"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/client"
)
@@ -86,7 +86,7 @@ func (o *resetCmdOptions) reset(_ *cobra.Command, _ []string) {
}
func (o *resetCmdOptions) deleteAllIntegrations(c client.Client) (int, error) {
- list := v1alpha1.NewIntegrationList()
+ list := v1.NewIntegrationList()
if err := c.List(o.Context, &list, k8sclient.InNamespace(o.Namespace)); err != nil {
return 0, errors.Wrap(err, fmt.Sprintf("could not retrieve integrations from namespace %s", o.Namespace))
}
@@ -100,7 +100,7 @@ func (o *resetCmdOptions) deleteAllIntegrations(c client.Client) (int, error) {
}
func (o *resetCmdOptions) deleteAllIntegrationKits(c client.Client) (int, error) {
- list := v1alpha1.NewIntegrationKitList()
+ list := v1.NewIntegrationKitList()
if err := c.List(o.Context, &list, k8sclient.InNamespace(o.Namespace)); err != nil {
return 0, errors.Wrap(err, fmt.Sprintf("could not retrieve integration Kits from namespace %s", o.Namespace))
}
@@ -114,7 +114,7 @@ func (o *resetCmdOptions) deleteAllIntegrationKits(c client.Client) (int, error)
}
func (o *resetCmdOptions) resetIntegrationPlatform(c client.Client) error {
- list := v1alpha1.NewIntegrationPlatformList()
+ list := v1.NewIntegrationPlatformList()
if err := c.List(o.Context, &list, k8sclient.InNamespace(o.Namespace)); err != nil {
return errors.Wrap(err, fmt.Sprintf("could not retrieve integration platform from namespace %s", o.Namespace))
}
@@ -125,6 +125,6 @@ func (o *resetCmdOptions) resetIntegrationPlatform(c client.Client) error {
}
platform := list.Items[0]
// Let's reset the status
- platform.Status = v1alpha1.IntegrationPlatformStatus{}
+ platform.Status = v1.IntegrationPlatformStatus{}
return c.Status().Update(o.Context, &platform)
}
diff --git a/pkg/cmd/run.go b/pkg/cmd/run.go
index df1b9b6..65e44de 100644
--- a/pkg/cmd/run.go
+++ b/pkg/cmd/run.go
@@ -31,7 +31,7 @@ import (
"strings"
"syscall"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/client"
"github.com/apache/camel-k/pkg/gzip"
"github.com/apache/camel-k/pkg/trait"
@@ -207,7 +207,7 @@ func (o *runCmdOptions) run(cmd *cobra.Command, args []string) error {
return err
}
- if integrationPhase == nil || *integrationPhase == v1alpha1.IntegrationPhaseRunning || *integrationPhase == v1alpha1.IntegrationPhaseError {
+ if integrationPhase == nil || *integrationPhase == v1.IntegrationPhaseRunning || *integrationPhase == v1.IntegrationPhaseError {
break
}
@@ -240,20 +240,20 @@ func (o *runCmdOptions) run(cmd *cobra.Command, args []string) error {
return nil
}
-func (o *runCmdOptions) waitForIntegrationReady(integration *v1alpha1.Integration) (*v1alpha1.IntegrationPhase, error) {
- handler := func(i *v1alpha1.Integration) bool {
+func (o *runCmdOptions) waitForIntegrationReady(integration *v1.Integration) (*v1.IntegrationPhase, error) {
+ handler := func(i *v1.Integration) bool {
//
// TODO when we add health checks, we should Wait until they are passed
//
if i.Status.Phase != "" {
fmt.Println("integration \""+integration.Name+"\" in phase", i.Status.Phase)
- if i.Status.Phase == v1alpha1.IntegrationPhaseRunning {
+ if i.Status.Phase == v1.IntegrationPhaseRunning {
// TODO display some error info when available in the status
return false
}
- if i.Status.Phase == v1alpha1.IntegrationPhaseError {
+ if i.Status.Phase == v1.IntegrationPhaseError {
fmt.Println("integration deployment failed")
return false
}
@@ -293,12 +293,12 @@ func (o *runCmdOptions) syncIntegration(c client.Client, sources []string) error
return nil
}
-func (o *runCmdOptions) createIntegration(c client.Client, sources []string) (*v1alpha1.Integration, error) {
+func (o *runCmdOptions) createIntegration(c client.Client, sources []string) (*v1.Integration, error) {
return o.updateIntegrationCode(c, sources)
}
//nolint: gocyclo
-func (o *runCmdOptions) updateIntegrationCode(c client.Client, sources []string) (*v1alpha1.Integration, error) {
+func (o *runCmdOptions) updateIntegrationCode(c client.Client, sources []string) (*v1.Integration, error) {
namespace := o.Namespace
name := ""
@@ -313,21 +313,21 @@ func (o *runCmdOptions) updateIntegrationCode(c client.Client, sources []string)
return nil, errors.New("unable to determine integration name")
}
- integration := v1alpha1.Integration{
+ integration := v1.Integration{
TypeMeta: metav1.TypeMeta{
- Kind: v1alpha1.IntegrationKind,
- APIVersion: v1alpha1.SchemeGroupVersion.String(),
+ Kind: v1.IntegrationKind,
+ APIVersion: v1.SchemeGroupVersion.String(),
},
ObjectMeta: metav1.ObjectMeta{
Namespace: namespace,
Name: name,
},
- Spec: v1alpha1.IntegrationSpec{
+ Spec: v1.IntegrationSpec{
Dependencies: make([]string, 0, len(o.Dependencies)),
Kit: o.IntegrationKit,
- Configuration: make([]v1alpha1.ConfigurationSpec, 0),
+ Configuration: make([]v1.ConfigurationSpec, 0),
Repositories: o.Repositories,
- Profile: v1alpha1.TraitProfileByName(o.Profile),
+ Profile: v1.TraitProfileByName(o.Profile),
},
}
@@ -337,8 +337,8 @@ func (o *runCmdOptions) updateIntegrationCode(c client.Client, sources []string)
return nil, err
}
- integration.Spec.AddSources(v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ integration.Spec.AddSources(v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: path.Base(source),
Content: data,
Compression: o.Compression,
@@ -352,13 +352,13 @@ func (o *runCmdOptions) updateIntegrationCode(c client.Client, sources []string)
return nil, err
}
- integration.Spec.AddResources(v1alpha1.ResourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ integration.Spec.AddResources(v1.ResourceSpec{
+ DataSpec: v1.DataSpec{
Name: path.Base(resource),
Content: data,
Compression: o.Compression,
},
- Type: v1alpha1.ResourceTypeData,
+ Type: v1.ResourceTypeData,
})
}
@@ -368,13 +368,13 @@ func (o *runCmdOptions) updateIntegrationCode(c client.Client, sources []string)
return nil, err
}
- integration.Spec.AddResources(v1alpha1.ResourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ integration.Spec.AddResources(v1.ResourceSpec{
+ DataSpec: v1.DataSpec{
Name: path.Base(resource),
Content: data,
Compression: o.Compression,
},
- Type: v1alpha1.ResourceTypeOpenAPI,
+ Type: v1.ResourceTypeOpenAPI,
})
}
@@ -495,9 +495,9 @@ func (*runCmdOptions) loadData(fileName string, compress bool) (string, error) {
return string(content), nil
}
-func (*runCmdOptions) configureTrait(integration *v1alpha1.Integration, config string) error {
+func (*runCmdOptions) configureTrait(integration *v1.Integration, config string) error {
if integration.Spec.Traits == nil {
- integration.Spec.Traits = make(map[string]v1alpha1.TraitSpec)
+ integration.Spec.Traits = make(map[string]v1.TraitSpec)
}
parts := traitConfigRegexp.FindStringSubmatch(config)
@@ -510,7 +510,7 @@ func (*runCmdOptions) configureTrait(integration *v1alpha1.Integration, config s
spec, ok := integration.Spec.Traits[traitID]
if !ok {
- spec = v1alpha1.TraitSpec{
+ spec = v1.TraitSpec{
Configuration: make(map[string]string),
}
}
diff --git a/pkg/cmd/util.go b/pkg/cmd/util.go
index 8ee87ac..3fc96ed 100644
--- a/pkg/cmd/util.go
+++ b/pkg/cmd/util.go
@@ -27,7 +27,7 @@ import (
"github.com/mitchellh/mapstructure"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/client"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
@@ -39,10 +39,10 @@ import (
// DeleteIntegration --
func DeleteIntegration(ctx context.Context, c client.Client, name string, namespace string) error {
- integration := v1alpha1.Integration{
+ integration := v1.Integration{
TypeMeta: metav1.TypeMeta{
- Kind: v1alpha1.IntegrationKind,
- APIVersion: v1alpha1.SchemeGroupVersion.String(),
+ Kind: v1.IntegrationKind,
+ APIVersion: v1.SchemeGroupVersion.String(),
},
ObjectMeta: metav1.ObjectMeta{
Namespace: namespace,
diff --git a/pkg/controller/build/action.go b/pkg/controller/build/action.go
index 448f805..3d1de7a 100644
--- a/pkg/controller/build/action.go
+++ b/pkg/controller/build/action.go
@@ -20,7 +20,7 @@ package build
import (
"context"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/client"
"github.com/apache/camel-k/pkg/util/log"
)
@@ -34,10 +34,10 @@ type Action interface {
Name() string
// returns true if the action can handle the build
- CanHandle(build *v1alpha1.Build) bool
+ CanHandle(build *v1.Build) bool
// executes the handling function
- Handle(ctx context.Context, build *v1alpha1.Build) (*v1alpha1.Build, error)
+ Handle(ctx context.Context, build *v1.Build) (*v1.Build, error)
}
type baseAction struct {
diff --git a/pkg/controller/build/build_controller.go b/pkg/controller/build/build_controller.go
index 6e9897f..01cb77f 100644
--- a/pkg/controller/build/build_controller.go
+++ b/pkg/controller/build/build_controller.go
@@ -35,7 +35,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/reconcile"
"sigs.k8s.io/controller-runtime/pkg/source"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/builder"
"github.com/apache/camel-k/pkg/client"
"github.com/apache/camel-k/pkg/platform"
@@ -70,11 +70,11 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
}
// Watch for changes to primary resource Build
- err = c.Watch(&source.Kind{Type: &v1alpha1.Build{}}, &handler.EnqueueRequestForObject{},
+ err = c.Watch(&source.Kind{Type: &v1.Build{}}, &handler.EnqueueRequestForObject{},
predicate.Funcs{
UpdateFunc: func(e event.UpdateEvent) bool {
- oldBuild := e.ObjectOld.(*v1alpha1.Build)
- newBuild := e.ObjectNew.(*v1alpha1.Build)
+ oldBuild := e.ObjectOld.(*v1.Build)
+ newBuild := e.ObjectNew.(*v1.Build)
// Ignore updates to the build status in which case metadata.Generation does not change,
// or except when the build phase changes as it's used to transition from one phase
// to another
@@ -90,7 +90,7 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
err = c.Watch(&source.Kind{Type: &corev1.Pod{}},
&handler.EnqueueRequestForOwner{
IsController: true,
- OwnerType: &v1alpha1.Build{},
+ OwnerType: &v1.Build{},
},
predicate.Funcs{
UpdateFunc: func(e event.UpdateEvent) bool {
@@ -135,7 +135,7 @@ func (r *ReconcileBuild) Reconcile(request reconcile.Request) (reconcile.Result,
ctx := context.TODO()
// Fetch the Build instance
- var instance v1alpha1.Build
+ var instance v1.Build
if err := r.client.Get(ctx, request.NamespacedName, &instance); err != nil {
if errors.IsNotFound(err) {
@@ -152,16 +152,16 @@ func (r *ReconcileBuild) Reconcile(request reconcile.Request) (reconcile.Result,
targetLog := rlog.ForBuild(target)
pl, err := platform.GetOrLookupCurrent(ctx, r.client, target.Namespace, target.Status.Platform)
- if target.Status.Phase == v1alpha1.BuildPhaseNone || target.Status.Phase == v1alpha1.BuildPhaseWaitingForPlatform {
- if err != nil || pl.Status.Phase != v1alpha1.IntegrationPlatformPhaseReady {
- target.Status.Phase = v1alpha1.BuildPhaseWaitingForPlatform
+ if target.Status.Phase == v1.BuildPhaseNone || target.Status.Phase == v1.BuildPhaseWaitingForPlatform {
+ if err != nil || pl.Status.Phase != v1.IntegrationPlatformPhaseReady {
+ target.Status.Phase = v1.BuildPhaseWaitingForPlatform
} else {
- target.Status.Phase = v1alpha1.BuildPhaseInitialization
+ target.Status.Phase = v1.BuildPhaseInitialization
}
if instance.Status.Phase != target.Status.Phase {
if err != nil {
- target.Status.SetErrorCondition(v1alpha1.BuildConditionPlatformAvailable, v1alpha1.BuildConditionPlatformAvailableReason, err)
+ target.Status.SetErrorCondition(v1.BuildConditionPlatformAvailable, v1.BuildConditionPlatformAvailableReason, err)
}
if pl != nil {
@@ -177,7 +177,7 @@ func (r *ReconcileBuild) Reconcile(request reconcile.Request) (reconcile.Result,
var actions []Action
switch pl.Status.Build.BuildStrategy {
- case v1alpha1.IntegrationPlatformBuildStrategyPod:
+ case v1.IntegrationPlatformBuildStrategyPod:
actions = []Action{
NewInitializePodAction(),
NewSchedulePodAction(r.reader),
@@ -185,7 +185,7 @@ func (r *ReconcileBuild) Reconcile(request reconcile.Request) (reconcile.Result,
NewErrorRecoveryAction(),
NewErrorAction(),
}
- case v1alpha1.IntegrationPlatformBuildStrategyRoutine:
+ case v1.IntegrationPlatformBuildStrategyRoutine:
actions = []Action{
NewInitializeRoutineAction(),
NewScheduleRoutineAction(r.reader, r.builder, &r.routines),
@@ -230,7 +230,7 @@ func (r *ReconcileBuild) Reconcile(request reconcile.Request) (reconcile.Result,
}
// Requeue scheduling (resp. failed) build so that it re-enters the build (resp. recovery) working queue
- if target.Status.Phase == v1alpha1.BuildPhaseScheduling || target.Status.Phase == v1alpha1.BuildPhaseFailed {
+ if target.Status.Phase == v1.BuildPhaseScheduling || target.Status.Phase == v1.BuildPhaseFailed {
return reconcile.Result{
RequeueAfter: 5 * time.Second,
}, nil
@@ -239,7 +239,7 @@ func (r *ReconcileBuild) Reconcile(request reconcile.Request) (reconcile.Result,
return reconcile.Result{}, nil
}
-func (r *ReconcileBuild) update(ctx context.Context, base *v1alpha1.Build, target *v1alpha1.Build) (reconcile.Result, error) {
+func (r *ReconcileBuild) update(ctx context.Context, base *v1.Build, target *v1.Build) (reconcile.Result, error) {
err := r.client.Status().Patch(ctx, target, k8sclient.MergeFrom(base))
return reconcile.Result{}, err
diff --git a/pkg/controller/build/error.go b/pkg/controller/build/error.go
index 62d42b8..c291864 100644
--- a/pkg/controller/build/error.go
+++ b/pkg/controller/build/error.go
@@ -20,7 +20,7 @@ package build
import (
"context"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
)
// NewErrorAction creates a new error action for scheduled routine
@@ -38,11 +38,11 @@ func (action *errorAction) Name() string {
}
// CanHandle tells whether this action can handle the build
-func (action *errorAction) CanHandle(build *v1alpha1.Build) bool {
- return build.Status.Phase == v1alpha1.BuildPhaseError
+func (action *errorAction) CanHandle(build *v1.Build) bool {
+ return build.Status.Phase == v1.BuildPhaseError
}
// Handle handles the builds
-func (action *errorAction) Handle(ctx context.Context, build *v1alpha1.Build) (*v1alpha1.Build, error) {
+func (action *errorAction) Handle(ctx context.Context, build *v1.Build) (*v1.Build, error) {
return nil, nil
}
diff --git a/pkg/controller/build/initialize_pod.go b/pkg/controller/build/initialize_pod.go
index 15def69..6d7df04 100644
--- a/pkg/controller/build/initialize_pod.go
+++ b/pkg/controller/build/initialize_pod.go
@@ -28,7 +28,7 @@ import (
k8sclient "sigs.k8s.io/controller-runtime/pkg/client"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/install"
)
@@ -47,12 +47,12 @@ func (action *initializePodAction) Name() string {
}
// CanHandle tells whether this action can handle the build
-func (action *initializePodAction) CanHandle(build *v1alpha1.Build) bool {
- return build.Status.Phase == v1alpha1.BuildPhaseInitialization
+func (action *initializePodAction) CanHandle(build *v1.Build) bool {
+ return build.Status.Phase == v1.BuildPhaseInitialization
}
// Handle handles the builds
-func (action *initializePodAction) Handle(ctx context.Context, build *v1alpha1.Build) (*v1alpha1.Build, error) {
+func (action *initializePodAction) Handle(ctx context.Context, build *v1.Build) (*v1.Build, error) {
// Ensure service account is present
// TODO: maybe this should be done by the platform trait ??
if err := action.ensureServiceAccount(ctx, build); err != nil {
@@ -69,12 +69,12 @@ func (action *initializePodAction) Handle(ctx context.Context, build *v1alpha1.B
return nil, err
}
- build.Status.Phase = v1alpha1.BuildPhaseScheduling
+ build.Status.Phase = v1.BuildPhaseScheduling
return build, nil
}
-func (action *initializePodAction) ensureServiceAccount(ctx context.Context, build *v1alpha1.Build) error {
+func (action *initializePodAction) ensureServiceAccount(ctx context.Context, build *v1.Build) error {
sa := corev1.ServiceAccount{}
saKey := k8sclient.ObjectKey{
Name: "camel-k-builder",
@@ -90,7 +90,7 @@ func (action *initializePodAction) ensureServiceAccount(ctx context.Context, bui
return err
}
-func deleteBuilderPod(ctx context.Context, client k8sclient.Writer, build *v1alpha1.Build) error {
+func deleteBuilderPod(ctx context.Context, client k8sclient.Writer, build *v1.Build) error {
pod := corev1.Pod{
TypeMeta: metav1.TypeMeta{
APIVersion: corev1.SchemeGroupVersion.String(),
@@ -110,7 +110,7 @@ func deleteBuilderPod(ctx context.Context, client k8sclient.Writer, build *v1alp
return err
}
-func getBuilderPod(ctx context.Context, client k8sclient.Reader, build *v1alpha1.Build) (*corev1.Pod, error) {
+func getBuilderPod(ctx context.Context, client k8sclient.Reader, build *v1.Build) (*corev1.Pod, error) {
pod := corev1.Pod{}
err := client.Get(ctx, k8sclient.ObjectKey{Namespace: build.Namespace, Name: buildPodName(build)}, &pod)
if err != nil && k8serrors.IsNotFound(err) {
@@ -123,6 +123,6 @@ func getBuilderPod(ctx context.Context, client k8sclient.Reader, build *v1alpha1
return &pod, nil
}
-func buildPodName(build *v1alpha1.Build) string {
+func buildPodName(build *v1.Build) string {
return "camel-k-" + build.Name + "-builder"
}
diff --git a/pkg/controller/build/initialize_routine.go b/pkg/controller/build/initialize_routine.go
index df48624..26716fe 100644
--- a/pkg/controller/build/initialize_routine.go
+++ b/pkg/controller/build/initialize_routine.go
@@ -20,7 +20,7 @@ package build
import (
"context"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
)
// NewInitializeRoutineAction creates a new initialize action
@@ -38,13 +38,13 @@ func (action *initializeRoutineAction) Name() string {
}
// CanHandle tells whether this action can handle the build
-func (action *initializeRoutineAction) CanHandle(build *v1alpha1.Build) bool {
- return build.Status.Phase == v1alpha1.BuildPhaseInitialization
+func (action *initializeRoutineAction) CanHandle(build *v1.Build) bool {
+ return build.Status.Phase == v1.BuildPhaseInitialization
}
// Handle handles the builds
-func (action *initializeRoutineAction) Handle(ctx context.Context, build *v1alpha1.Build) (*v1alpha1.Build, error) {
- build.Status.Phase = v1alpha1.BuildPhaseScheduling
+func (action *initializeRoutineAction) Handle(ctx context.Context, build *v1.Build) (*v1.Build, error) {
+ build.Status.Phase = v1.BuildPhaseScheduling
return build, nil
}
diff --git a/pkg/controller/build/monitor_pod.go b/pkg/controller/build/monitor_pod.go
index 40d7bee..75b1107 100644
--- a/pkg/controller/build/monitor_pod.go
+++ b/pkg/controller/build/monitor_pod.go
@@ -23,7 +23,7 @@ import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
)
// NewMonitorPodAction creates a new monitor action for scheduled pod
@@ -41,12 +41,12 @@ func (action *monitorPodAction) Name() string {
}
// CanHandle tells whether this action can handle the build
-func (action *monitorPodAction) CanHandle(build *v1alpha1.Build) bool {
- return build.Status.Phase == v1alpha1.BuildPhasePending || build.Status.Phase == v1alpha1.BuildPhaseRunning
+func (action *monitorPodAction) CanHandle(build *v1.Build) bool {
+ return build.Status.Phase == v1.BuildPhasePending || build.Status.Phase == v1.BuildPhaseRunning
}
// Handle handles the builds
-func (action *monitorPodAction) Handle(ctx context.Context, build *v1alpha1.Build) (*v1alpha1.Build, error) {
+func (action *monitorPodAction) Handle(ctx context.Context, build *v1.Build) (*v1.Build, error) {
pod, err := getBuilderPod(ctx, action.client, build)
if err != nil {
return nil, err
@@ -54,18 +54,18 @@ func (action *monitorPodAction) Handle(ctx context.Context, build *v1alpha1.Buil
switch {
case pod == nil:
- build.Status.Phase = v1alpha1.BuildPhaseScheduling
+ build.Status.Phase = v1.BuildPhaseScheduling
// Pod remains in pending phase when init containers execute
case pod.Status.Phase == corev1.PodPending && action.isPodScheduled(pod),
pod.Status.Phase == corev1.PodRunning:
- build.Status.Phase = v1alpha1.BuildPhaseRunning
+ build.Status.Phase = v1.BuildPhaseRunning
if build.Status.StartedAt.Time.IsZero() {
build.Status.StartedAt = metav1.Now()
}
case pod.Status.Phase == corev1.PodSucceeded:
- build.Status.Phase = v1alpha1.BuildPhaseSucceeded
+ build.Status.Phase = v1.BuildPhaseSucceeded
build.Status.Duration = metav1.Now().Sub(build.Status.StartedAt.Time).String()
for _, task := range build.Spec.Tasks {
if task.Kaniko != nil {
@@ -75,7 +75,7 @@ func (action *monitorPodAction) Handle(ctx context.Context, build *v1alpha1.Buil
}
case pod.Status.Phase == corev1.PodFailed:
- build.Status.Phase = v1alpha1.BuildPhaseFailed
+ build.Status.Phase = v1.BuildPhaseFailed
build.Status.Duration = metav1.Now().Sub(build.Status.StartedAt.Time).String()
}
diff --git a/pkg/controller/build/monitor_routine.go b/pkg/controller/build/monitor_routine.go
index 3c61cf0..7bf0525 100644
--- a/pkg/controller/build/monitor_routine.go
+++ b/pkg/controller/build/monitor_routine.go
@@ -21,7 +21,7 @@ import (
"context"
"sync"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
)
// NewMonitorRoutineAction creates a new monitor action for scheduled routine
@@ -42,17 +42,17 @@ func (action *monitorRoutineAction) Name() string {
}
// CanHandle tells whether this action can handle the build
-func (action *monitorRoutineAction) CanHandle(build *v1alpha1.Build) bool {
- return build.Status.Phase == v1alpha1.BuildPhasePending || build.Status.Phase == v1alpha1.BuildPhaseRunning
+func (action *monitorRoutineAction) CanHandle(build *v1.Build) bool {
+ return build.Status.Phase == v1.BuildPhasePending || build.Status.Phase == v1.BuildPhaseRunning
}
// Handle handles the builds
-func (action *monitorRoutineAction) Handle(ctx context.Context, build *v1alpha1.Build) (*v1alpha1.Build, error) {
+func (action *monitorRoutineAction) Handle(ctx context.Context, build *v1.Build) (*v1.Build, error) {
// Check the build routine
- if _, ok := action.routines.Load(build.Name); !ok && build.Status.Phase != v1alpha1.BuildPhaseFailed {
+ if _, ok := action.routines.Load(build.Name); !ok && build.Status.Phase != v1.BuildPhaseFailed {
// and recover the build if it's missing. This can happen when the operator
// stops abruptly and restarts or the build status update fails.
- build.Status.Phase = v1alpha1.BuildPhaseFailed
+ build.Status.Phase = v1.BuildPhaseFailed
return build, nil
}
diff --git a/pkg/controller/build/recovery.go b/pkg/controller/build/recovery.go
index cf2dc7e..1f19925 100644
--- a/pkg/controller/build/recovery.go
+++ b/pkg/controller/build/recovery.go
@@ -25,7 +25,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
)
// NewErrorRecoveryAction creates a new error recovering handling action for the build
@@ -50,16 +50,16 @@ func (action *errorRecoveryAction) Name() string {
return "error-recovery"
}
-func (action *errorRecoveryAction) CanHandle(build *v1alpha1.Build) bool {
- return build.Status.Phase == v1alpha1.BuildPhaseFailed
+func (action *errorRecoveryAction) CanHandle(build *v1.Build) bool {
+ return build.Status.Phase == v1.BuildPhaseFailed
}
-func (action *errorRecoveryAction) Handle(ctx context.Context, build *v1alpha1.Build) (*v1alpha1.Build, error) {
+func (action *errorRecoveryAction) Handle(ctx context.Context, build *v1.Build) (*v1.Build, error) {
if build.Status.Failure == nil {
- build.Status.Failure = &v1alpha1.Failure{
+ build.Status.Failure = &v1.Failure{
Reason: build.Status.Error,
Time: metav1.Now(),
- Recovery: v1alpha1.FailureRecovery{
+ Recovery: v1.FailureRecovery{
Attempt: 0,
AttemptMax: 5,
},
@@ -68,7 +68,7 @@ func (action *errorRecoveryAction) Handle(ctx context.Context, build *v1alpha1.B
}
if build.Status.Failure.Recovery.Attempt >= build.Status.Failure.Recovery.AttemptMax {
- build.Status.Phase = v1alpha1.BuildPhaseError
+ build.Status.Phase = v1.BuildPhaseError
return build, nil
}
@@ -84,7 +84,7 @@ func (action *errorRecoveryAction) Handle(ctx context.Context, build *v1alpha1.B
return nil, nil
}
- build.Status.Phase = v1alpha1.BuildPhaseInitialization
+ build.Status.Phase = v1.BuildPhaseInitialization
build.Status.Failure.Recovery.Attempt++
build.Status.Failure.Recovery.AttemptTime = metav1.Now()
diff --git a/pkg/controller/build/schedule_pod.go b/pkg/controller/build/schedule_pod.go
index 30c2c38..afcb252 100644
--- a/pkg/controller/build/schedule_pod.go
+++ b/pkg/controller/build/schedule_pod.go
@@ -29,7 +29,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/platform"
"github.com/apache/camel-k/pkg/util/defaults"
)
@@ -54,17 +54,17 @@ func (action *schedulePodAction) Name() string {
}
// CanHandle tells whether this action can handle the build
-func (action *schedulePodAction) CanHandle(build *v1alpha1.Build) bool {
- return build.Status.Phase == v1alpha1.BuildPhaseScheduling
+func (action *schedulePodAction) CanHandle(build *v1.Build) bool {
+ return build.Status.Phase == v1.BuildPhaseScheduling
}
// Handle handles the builds
-func (action *schedulePodAction) Handle(ctx context.Context, build *v1alpha1.Build) (*v1alpha1.Build, error) {
+func (action *schedulePodAction) Handle(ctx context.Context, build *v1.Build) (*v1.Build, error) {
// Enter critical section
action.lock.Lock()
defer action.lock.Unlock()
- builds := &v1alpha1.BuildList{}
+ builds := &v1.BuildList{}
// We use the non-caching client as informers cache is not invalidated nor updated
// atomically by write operations
err := action.reader.List(ctx, builds, client.InNamespace(build.Namespace))
@@ -75,7 +75,7 @@ func (action *schedulePodAction) Handle(ctx context.Context, build *v1alpha1.Bui
// Emulate a serialized working queue to only allow one build to run at a given time.
// This is currently necessary for the incremental build to work as expected.
for _, b := range builds.Items {
- if b.Status.Phase == v1alpha1.BuildPhasePending || b.Status.Phase == v1alpha1.BuildPhaseRunning {
+ if b.Status.Phase == v1.BuildPhasePending || b.Status.Phase == v1.BuildPhaseRunning {
// Let's requeue the build in case one is already running
return nil, nil
}
@@ -104,12 +104,12 @@ func (action *schedulePodAction) Handle(ctx context.Context, build *v1alpha1.Bui
}
}
- build.Status.Phase = v1alpha1.BuildPhasePending
+ build.Status.Phase = v1.BuildPhasePending
return build, nil
}
-func (action *schedulePodAction) newBuildPod(ctx context.Context, build *v1alpha1.Build) (*corev1.Pod, error) {
+func (action *schedulePodAction) newBuildPod(ctx context.Context, build *v1.Build) (*corev1.Pod, error) {
pod := &corev1.Pod{
TypeMeta: metav1.TypeMeta{
APIVersion: corev1.SchemeGroupVersion.String(),
@@ -154,7 +154,7 @@ func (action *schedulePodAction) newBuildPod(ctx context.Context, build *v1alpha
return pod, nil
}
-func (action *schedulePodAction) addBuilderTaskToPod(build *v1alpha1.Build, task *v1alpha1.BuilderTask, pod *corev1.Pod) {
+func (action *schedulePodAction) addBuilderTaskToPod(build *v1.Build, task *v1.BuilderTask, pod *corev1.Pod) {
pod.Spec.InitContainers = append(pod.Spec.InitContainers, corev1.Container{
Name: task.Name,
Image: action.operatorImage,
@@ -175,7 +175,7 @@ func (action *schedulePodAction) addBuilderTaskToPod(build *v1alpha1.Build, task
action.addBaseTaskToPod(&task.BaseTask, pod)
}
-func (action *schedulePodAction) addKanikoTaskToPod(task *v1alpha1.KanikoTask, pod *corev1.Pod) {
+func (action *schedulePodAction) addKanikoTaskToPod(task *v1.KanikoTask, pod *corev1.Pod) {
pod.Spec.InitContainers = append(pod.Spec.InitContainers, corev1.Container{
Name: task.Name,
Image: task.Image,
@@ -188,7 +188,7 @@ func (action *schedulePodAction) addKanikoTaskToPod(task *v1alpha1.KanikoTask, p
action.addBaseTaskToPod(&task.BaseTask, pod)
}
-func (action *schedulePodAction) addBaseTaskToPod(task *v1alpha1.BaseTask, pod *corev1.Pod) {
+func (action *schedulePodAction) addBaseTaskToPod(task *v1.BaseTask, pod *corev1.Pod) {
pod.Spec.Volumes = append(pod.Spec.Volumes, task.Volumes...)
if task.Affinity != nil {
diff --git a/pkg/controller/build/schedule_routine.go b/pkg/controller/build/schedule_routine.go
index 61a9173..b0db0ed 100644
--- a/pkg/controller/build/schedule_routine.go
+++ b/pkg/controller/build/schedule_routine.go
@@ -27,7 +27,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/builder"
"github.com/apache/camel-k/pkg/util/patch"
)
@@ -55,17 +55,17 @@ func (action *scheduleRoutineAction) Name() string {
}
// CanHandle tells whether this action can handle the build
-func (action *scheduleRoutineAction) CanHandle(build *v1alpha1.Build) bool {
- return build.Status.Phase == v1alpha1.BuildPhaseScheduling
+func (action *scheduleRoutineAction) CanHandle(build *v1.Build) bool {
+ return build.Status.Phase == v1.BuildPhaseScheduling
}
// Handle handles the builds
-func (action *scheduleRoutineAction) Handle(ctx context.Context, build *v1alpha1.Build) (*v1alpha1.Build, error) {
+func (action *scheduleRoutineAction) Handle(ctx context.Context, build *v1.Build) (*v1.Build, error) {
// Enter critical section
action.lock.Lock()
defer action.lock.Unlock()
- builds := &v1alpha1.BuildList{}
+ builds := &v1.BuildList{}
// We use the non-caching client as informers cache is not invalidated nor updated
// atomically by write operations
err := action.reader.List(ctx, builds, client.InNamespace(build.Namespace))
@@ -76,7 +76,7 @@ func (action *scheduleRoutineAction) Handle(ctx context.Context, build *v1alpha1
// Emulate a serialized working queue to only allow one build to run at a given time.
// This is currently necessary for the incremental build to work as expected.
for _, b := range builds.Items {
- if b.Status.Phase == v1alpha1.BuildPhasePending || b.Status.Phase == v1alpha1.BuildPhaseRunning {
+ if b.Status.Phase == v1.BuildPhasePending || b.Status.Phase == v1.BuildPhaseRunning {
// Let's requeue the build in case one is already running
return nil, nil
}
@@ -85,7 +85,7 @@ func (action *scheduleRoutineAction) Handle(ctx context.Context, build *v1alpha1
// Transition the build to pending state
// This must be done in the critical section rather than delegated to the controller
target := build.DeepCopy()
- target.Status.Phase = v1alpha1.BuildPhasePending
+ target.Status.Phase = v1.BuildPhasePending
action.L.Info("Build state transition", "phase", target.Status.Phase)
err = action.client.Status().Update(ctx, target)
if err != nil {
@@ -100,11 +100,11 @@ func (action *scheduleRoutineAction) Handle(ctx context.Context, build *v1alpha1
return nil, nil
}
-func (action *scheduleRoutineAction) runBuild(ctx context.Context, build *v1alpha1.Build) {
+func (action *scheduleRoutineAction) runBuild(ctx context.Context, build *v1.Build) {
defer action.routines.Delete(build.Name)
- status := v1alpha1.BuildStatus{
- Phase: v1alpha1.BuildPhaseRunning,
+ status := v1.BuildStatus{
+ Phase: v1.BuildPhaseRunning,
StartedAt: metav1.Now(),
}
if err := action.updateBuildStatus(ctx, build, status); err != nil {
@@ -113,9 +113,9 @@ func (action *scheduleRoutineAction) runBuild(ctx context.Context, build *v1alph
for i, task := range build.Spec.Tasks {
if task.Builder == nil {
- status := v1alpha1.BuildStatus{
+ status := v1.BuildStatus{
// Error the build directly as we know recovery won't work over ill-defined tasks
- Phase: v1alpha1.BuildPhaseError,
+ Phase: v1.BuildPhaseError,
Error: fmt.Sprintf("task cannot be executed using the routine strategy: %s",
task.GetName()),
Duration: metav1.Now().Sub(build.Status.StartedAt.Time).String(),
@@ -126,12 +126,12 @@ func (action *scheduleRoutineAction) runBuild(ctx context.Context, build *v1alph
status := action.builder.Run(*task.Builder)
lastTask := i == len(build.Spec.Tasks)-1
- taskFailed := status.Phase == v1alpha1.BuildPhaseFailed
+ taskFailed := status.Phase == v1.BuildPhaseFailed
if lastTask || taskFailed {
status.Duration = metav1.Now().Sub(build.Status.StartedAt.Time).String()
}
if lastTask && !taskFailed {
- status.Phase = v1alpha1.BuildPhaseSucceeded
+ status.Phase = v1.BuildPhaseSucceeded
}
err := action.updateBuildStatus(ctx, build, status)
if err != nil || taskFailed {
@@ -140,7 +140,7 @@ func (action *scheduleRoutineAction) runBuild(ctx context.Context, build *v1alph
}
}
-func (action *scheduleRoutineAction) updateBuildStatus(ctx context.Context, build *v1alpha1.Build, status v1alpha1.BuildStatus) error {
+func (action *scheduleRoutineAction) updateBuildStatus(ctx context.Context, build *v1.Build, status v1.BuildStatus) error {
target := build.DeepCopy()
target.Status = status
// Copy the failure field from the build to persist recovery state
diff --git a/pkg/controller/integration/action.go b/pkg/controller/integration/action.go
index b205756..4038d42 100644
--- a/pkg/controller/integration/action.go
+++ b/pkg/controller/integration/action.go
@@ -20,7 +20,7 @@ package integration
import (
"context"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/client"
"github.com/apache/camel-k/pkg/util/log"
)
@@ -34,10 +34,10 @@ type Action interface {
Name() string
// returns true if the action can handle the integration
- CanHandle(integration *v1alpha1.Integration) bool
+ CanHandle(integration *v1.Integration) bool
// executes the handling function
- Handle(ctx context.Context, integration *v1alpha1.Integration) (*v1alpha1.Integration, error)
+ Handle(ctx context.Context, integration *v1.Integration) (*v1.Integration, error)
}
type baseAction struct {
diff --git a/pkg/controller/integration/build_kit.go b/pkg/controller/integration/build_kit.go
index 9f7b208..91260a0 100644
--- a/pkg/controller/integration/build_kit.go
+++ b/pkg/controller/integration/build_kit.go
@@ -21,7 +21,7 @@ import (
"context"
"fmt"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/trait"
"github.com/apache/camel-k/pkg/util"
"github.com/rs/xid"
@@ -40,12 +40,12 @@ func (action *buildKitAction) Name() string {
return "build-kit"
}
-func (action *buildKitAction) CanHandle(integration *v1alpha1.Integration) bool {
- return integration.Status.Phase == v1alpha1.IntegrationPhaseBuildingKit ||
- integration.Status.Phase == v1alpha1.IntegrationPhaseResolvingKit
+func (action *buildKitAction) CanHandle(integration *v1.Integration) bool {
+ return integration.Status.Phase == v1.IntegrationPhaseBuildingKit ||
+ integration.Status.Phase == v1.IntegrationPhaseResolvingKit
}
-func (action *buildKitAction) Handle(ctx context.Context, integration *v1alpha1.Integration) (*v1alpha1.Integration, error) {
+func (action *buildKitAction) Handle(ctx context.Context, integration *v1.Integration) (*v1.Integration, error) {
kit, err := LookupKitForIntegration(ctx, action.client, integration)
if err != nil {
//TODO: we may need to add a wait strategy, i.e give up after some time
@@ -53,7 +53,7 @@ func (action *buildKitAction) Handle(ctx context.Context, integration *v1alpha1.
}
if kit != nil {
- if kit.Labels["camel.apache.org/kit.type"] == v1alpha1.IntegrationKitTypePlatform {
+ if kit.Labels["camel.apache.org/kit.type"] == v1.IntegrationKitTypePlatform {
// This is a platform kit and as it is auto generated it may get
// out of sync if the integration that has generated it, has been
// amended to add/remove dependencies
@@ -67,21 +67,21 @@ func (action *buildKitAction) Handle(ctx context.Context, integration *v1alpha1.
// We need to re-generate a kit or search for a new one that
// satisfies integrations needs so let's remove the association
// with a kit
- integration.SetIntegrationKit(&v1alpha1.IntegrationKit{})
+ integration.SetIntegrationKit(&v1.IntegrationKit{})
return integration, nil
}
}
- if kit.Status.Phase == v1alpha1.IntegrationKitPhaseError {
+ if kit.Status.Phase == v1.IntegrationKitPhaseError {
integration.Status.Image = kit.Status.Image
- integration.Status.Phase = v1alpha1.IntegrationPhaseError
+ integration.Status.Phase = v1.IntegrationPhaseError
integration.SetIntegrationKit(kit)
return integration, nil
}
- if kit.Status.Phase == v1alpha1.IntegrationKitPhaseReady {
+ if kit.Status.Phase == v1.IntegrationKitPhaseReady {
integration.Status.Image = kit.Status.Image
integration.SetIntegrationKit(kit)
@@ -102,13 +102,13 @@ func (action *buildKitAction) Handle(ctx context.Context, integration *v1alpha1.
}
platformKitName := fmt.Sprintf("kit-%s", xid.New())
- platformKit := v1alpha1.NewIntegrationKit(integration.Namespace, platformKitName)
+ platformKit := v1.NewIntegrationKit(integration.Namespace, platformKitName)
// Add some information for post-processing, this may need to be refactored
// to a proper data structure
platformKit.Labels = map[string]string{
- "camel.apache.org/kit.type": v1alpha1.IntegrationKitTypePlatform,
- "camel.apache.org/kit.created.by.kind": v1alpha1.IntegrationKind,
+ "camel.apache.org/kit.type": v1.IntegrationKitTypePlatform,
+ "camel.apache.org/kit.created.by.kind": v1.IntegrationKind,
"camel.apache.org/kit.created.by.name": integration.Name,
"camel.apache.org/kit.created.by.version": integration.ResourceVersion,
}
@@ -118,7 +118,7 @@ func (action *buildKitAction) Handle(ctx context.Context, integration *v1alpha1.
}
// Set the kit to have the same characteristics as the integrations
- platformKit.Spec = v1alpha1.IntegrationKitSpec{
+ platformKit.Spec = v1.IntegrationKitSpec{
Dependencies: integration.Status.Dependencies,
Repositories: integration.Spec.Repositories,
Traits: action.filterKitTraits(ctx, integration.Spec.Traits),
@@ -135,12 +135,12 @@ func (action *buildKitAction) Handle(ctx context.Context, integration *v1alpha1.
return integration, nil
}
-func (action *buildKitAction) filterKitTraits(ctx context.Context, in map[string]v1alpha1.TraitSpec) map[string]v1alpha1.TraitSpec {
+func (action *buildKitAction) filterKitTraits(ctx context.Context, in map[string]v1.TraitSpec) map[string]v1.TraitSpec {
if len(in) == 0 {
return in
}
catalog := trait.NewCatalog(ctx, action.client)
- out := make(map[string]v1alpha1.TraitSpec)
+ out := make(map[string]v1.TraitSpec)
for name, conf := range in {
t := catalog.GetTrait(name)
if t != nil && !t.InfluencesKit() {
diff --git a/pkg/controller/integration/deploy.go b/pkg/controller/integration/deploy.go
index fa03160..fb22fa4 100644
--- a/pkg/controller/integration/deploy.go
+++ b/pkg/controller/integration/deploy.go
@@ -20,7 +20,7 @@ package integration
import (
"context"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/trait"
"github.com/apache/camel-k/pkg/util/kubernetes"
"github.com/pkg/errors"
@@ -39,11 +39,11 @@ func (action *deployAction) Name() string {
return "deploy"
}
-func (action *deployAction) CanHandle(integration *v1alpha1.Integration) bool {
- return integration.Status.Phase == v1alpha1.IntegrationPhaseDeploying
+func (action *deployAction) CanHandle(integration *v1.Integration) bool {
+ return integration.Status.Phase == v1.IntegrationPhaseDeploying
}
-func (action *deployAction) Handle(ctx context.Context, integration *v1alpha1.Integration) (*v1alpha1.Integration, error) {
+func (action *deployAction) Handle(ctx context.Context, integration *v1.Integration) (*v1.Integration, error) {
if integration.Status.Kit == "" {
return nil, errors.Errorf("no kit set on integration %s", integration.Name)
}
@@ -58,7 +58,7 @@ func (action *deployAction) Handle(ctx context.Context, integration *v1alpha1.In
return nil, err
}
- integration.Status.Phase = v1alpha1.IntegrationPhaseRunning
+ integration.Status.Phase = v1.IntegrationPhaseRunning
return integration, nil
}
diff --git a/pkg/controller/integration/error.go b/pkg/controller/integration/error.go
index 262e866..277c755 100644
--- a/pkg/controller/integration/error.go
+++ b/pkg/controller/integration/error.go
@@ -20,7 +20,7 @@ package integration
import (
"context"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/util/digest"
)
@@ -37,11 +37,11 @@ func (action *errorAction) Name() string {
return "error"
}
-func (action *errorAction) CanHandle(integration *v1alpha1.Integration) bool {
- return integration.Status.Phase == v1alpha1.IntegrationPhaseError
+func (action *errorAction) CanHandle(integration *v1.Integration) bool {
+ return integration.Status.Phase == v1.IntegrationPhaseError
}
-func (action *errorAction) Handle(ctx context.Context, integration *v1alpha1.Integration) (*v1alpha1.Integration, error) {
+func (action *errorAction) Handle(ctx context.Context, integration *v1.Integration) (*v1.Integration, error) {
hash, err := digest.ComputeForIntegration(integration)
if err != nil {
return nil, err
@@ -51,7 +51,7 @@ func (action *errorAction) Handle(ctx context.Context, integration *v1alpha1.Int
action.L.Info("Integration needs a rebuild")
integration.Status.Digest = hash
- integration.Status.Phase = v1alpha1.IntegrationPhaseInitialization
+ integration.Status.Phase = v1.IntegrationPhaseInitialization
return integration, nil
}
diff --git a/pkg/controller/integration/initialize.go b/pkg/controller/integration/initialize.go
index 0c57cf3..1d6c1a5 100644
--- a/pkg/controller/integration/initialize.go
+++ b/pkg/controller/integration/initialize.go
@@ -20,7 +20,7 @@ package integration
import (
"context"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/client"
"github.com/apache/camel-k/pkg/platform"
"github.com/apache/camel-k/pkg/trait"
@@ -43,12 +43,12 @@ func (action *initializeAction) Name() string {
}
// CanHandle tells whether this action can handle the integration
-func (action *initializeAction) CanHandle(integration *v1alpha1.Integration) bool {
- return integration.Status.Phase == v1alpha1.IntegrationPhaseInitialization
+func (action *initializeAction) CanHandle(integration *v1.Integration) bool {
+ return integration.Status.Phase == v1.IntegrationPhaseInitialization
}
// Handle handles the integrations
-func (action *initializeAction) Handle(ctx context.Context, integration *v1alpha1.Integration) (*v1alpha1.Integration, error) {
+func (action *initializeAction) Handle(ctx context.Context, integration *v1.Integration) (*v1.Integration, error) {
if _, err := trait.Apply(ctx, action.client, integration, nil); err != nil {
return nil, err
}
@@ -58,9 +58,9 @@ func (action *initializeAction) Handle(ctx context.Context, integration *v1alpha
return nil, err
}
- kit := v1alpha1.NewIntegrationKit(integration.Namespace, integration.Spec.Kit)
+ kit := v1.NewIntegrationKit(integration.Namespace, integration.Spec.Kit)
- integration.Status.Phase = v1alpha1.IntegrationPhaseBuildingKit
+ integration.Status.Phase = v1.IntegrationPhaseBuildingKit
integration.SetIntegrationKit(&kit)
integration.Status.Profile = determineBestProfile(ctx, action.client, integration, pl)
integration.Status.Version = defaults.Version
@@ -69,7 +69,7 @@ func (action *initializeAction) Handle(ctx context.Context, integration *v1alpha
}
// DetermineBestProfile tries to detect the best trait profile for the integration
-func determineBestProfile(ctx context.Context, c client.Client, integration *v1alpha1.Integration, p *v1alpha1.IntegrationPlatform) v1alpha1.TraitProfile {
+func determineBestProfile(ctx context.Context, c client.Client, integration *v1.Integration, p *v1.IntegrationPlatform) v1.TraitProfile {
if integration.Spec.Profile != "" {
return integration.Spec.Profile
}
@@ -82,7 +82,7 @@ func determineBestProfile(ctx context.Context, c client.Client, integration *v1a
return p.Status.Profile
}
if knative.IsEnabledInNamespace(ctx, c, p.Namespace) {
- return v1alpha1.TraitProfileKnative
+ return v1.TraitProfileKnative
}
return platform.GetProfile(p)
}
diff --git a/pkg/controller/integration/integration_controller.go b/pkg/controller/integration/integration_controller.go
index f0302a1..432f274 100644
--- a/pkg/controller/integration/integration_controller.go
+++ b/pkg/controller/integration/integration_controller.go
@@ -34,7 +34,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/reconcile"
"sigs.k8s.io/controller-runtime/pkg/source"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/client"
"github.com/apache/camel-k/pkg/util/digest"
"github.com/apache/camel-k/pkg/util/log"
@@ -72,10 +72,10 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
}
// Watch for changes to primary resource Integration
- err = c.Watch(&source.Kind{Type: &v1alpha1.Integration{}}, &handler.EnqueueRequestForObject{}, predicate.Funcs{
+ err = c.Watch(&source.Kind{Type: &v1.Integration{}}, &handler.EnqueueRequestForObject{}, predicate.Funcs{
UpdateFunc: func(e event.UpdateEvent) bool {
- oldIntegration := e.ObjectOld.(*v1alpha1.Integration)
- newIntegration := e.ObjectNew.(*v1alpha1.Integration)
+ oldIntegration := e.ObjectOld.(*v1.Integration)
+ newIntegration := e.ObjectNew.(*v1.Integration)
// Ignore updates to the integration status in which case metadata.Generation does not change,
// or except when the integration phase changes as it's used to transition from one phase
// to another
@@ -94,13 +94,13 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
// Watch for IntegrationKit phase transitioning to ready or error and
// enqueue requests for any integrations that are in phase waiting for
// kit
- err = c.Watch(&source.Kind{Type: &v1alpha1.IntegrationKit{}}, &handler.EnqueueRequestsFromMapFunc{
+ err = c.Watch(&source.Kind{Type: &v1.IntegrationKit{}}, &handler.EnqueueRequestsFromMapFunc{
ToRequests: handler.ToRequestsFunc(func(a handler.MapObject) []reconcile.Request {
- kit := a.Object.(*v1alpha1.IntegrationKit)
+ kit := a.Object.(*v1.IntegrationKit)
var requests []reconcile.Request
- if kit.Status.Phase == v1alpha1.IntegrationKitPhaseReady || kit.Status.Phase == v1alpha1.IntegrationKitPhaseError {
- list := &v1alpha1.IntegrationList{}
+ if kit.Status.Phase == v1.IntegrationKitPhaseReady || kit.Status.Phase == v1.IntegrationKitPhaseError {
+ list := &v1.IntegrationList{}
if err := mgr.GetClient().List(context.TODO(), list, k8sclient.InNamespace(kit.Namespace)); err != nil {
log.Error(err, "Failed to retrieve integration list")
@@ -108,7 +108,7 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
}
for _, integration := range list.Items {
- if integration.Status.Phase == v1alpha1.IntegrationPhaseBuildingKit {
+ if integration.Status.Phase == v1.IntegrationPhaseBuildingKit {
log.Infof("Kit %s ready, wake-up integration: %s", kit.Name, integration.Name)
requests = append(requests, reconcile.Request{
NamespacedName: types.NamespacedName{
@@ -129,13 +129,13 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
// Watch for IntegrationPlatform phase transitioning to ready and enqueue
// requests for any integrations that are in phase waiting for platform
- err = c.Watch(&source.Kind{Type: &v1alpha1.IntegrationPlatform{}}, &handler.EnqueueRequestsFromMapFunc{
+ err = c.Watch(&source.Kind{Type: &v1.IntegrationPlatform{}}, &handler.EnqueueRequestsFromMapFunc{
ToRequests: handler.ToRequestsFunc(func(a handler.MapObject) []reconcile.Request {
- platform := a.Object.(*v1alpha1.IntegrationPlatform)
+ platform := a.Object.(*v1.IntegrationPlatform)
var requests []reconcile.Request
- if platform.Status.Phase == v1alpha1.IntegrationPlatformPhaseReady {
- list := &v1alpha1.IntegrationList{}
+ if platform.Status.Phase == v1.IntegrationPlatformPhaseReady {
+ list := &v1.IntegrationList{}
if err := mgr.GetClient().List(context.TODO(), list, k8sclient.InNamespace(platform.Namespace)); err != nil {
log.Error(err, "Failed to retrieve integration list")
@@ -143,7 +143,7 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
}
for _, integration := range list.Items {
- if integration.Status.Phase == v1alpha1.IntegrationPhaseWaitingForPlatform {
+ if integration.Status.Phase == v1.IntegrationPhaseWaitingForPlatform {
log.Infof("Platform %s ready, wake-up integration: %s", platform.Name, integration.Name)
requests = append(requests, reconcile.Request{
NamespacedName: types.NamespacedName{
@@ -222,7 +222,7 @@ func (r *ReconcileIntegration) Reconcile(request reconcile.Request) (reconcile.R
ctx := context.TODO()
// Fetch the Integration instance
- var instance v1alpha1.Integration
+ var instance v1.Integration
if err := r.client.Get(ctx, request.NamespacedName, &instance); err != nil {
if k8serrors.IsNotFound(err) {
@@ -282,7 +282,7 @@ func (r *ReconcileIntegration) Reconcile(request reconcile.Request) (reconcile.R
return reconcile.Result{}, nil
}
-func (r *ReconcileIntegration) update(ctx context.Context, base *v1alpha1.Integration, target *v1alpha1.Integration) (reconcile.Result, error) {
+func (r *ReconcileIntegration) update(ctx context.Context, base *v1.Integration, target *v1.Integration) (reconcile.Result, error) {
dgst, err := digest.ComputeForIntegration(target)
if err != nil {
return reconcile.Result{}, err
diff --git a/pkg/controller/integration/monitor.go b/pkg/controller/integration/monitor.go
index 4ed46f5..b11e272 100644
--- a/pkg/controller/integration/monitor.go
+++ b/pkg/controller/integration/monitor.go
@@ -23,7 +23,7 @@ import (
appsv1 "k8s.io/api/apps/v1"
k8sclient "sigs.k8s.io/controller-runtime/pkg/client"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/trait"
"github.com/apache/camel-k/pkg/util/defaults"
"github.com/apache/camel-k/pkg/util/digest"
@@ -42,11 +42,11 @@ func (action *monitorAction) Name() string {
return "monitor"
}
-func (action *monitorAction) CanHandle(integration *v1alpha1.Integration) bool {
- return integration.Status.Phase == v1alpha1.IntegrationPhaseRunning
+func (action *monitorAction) CanHandle(integration *v1.Integration) bool {
+ return integration.Status.Phase == v1.IntegrationPhaseRunning
}
-func (action *monitorAction) Handle(ctx context.Context, integration *v1alpha1.Integration) (*v1alpha1.Integration, error) {
+func (action *monitorAction) Handle(ctx context.Context, integration *v1.Integration) (*v1.Integration, error) {
hash, err := digest.ComputeForIntegration(integration)
if err != nil {
return nil, err
@@ -56,8 +56,8 @@ func (action *monitorAction) Handle(ctx context.Context, integration *v1alpha1.I
action.L.Info("Integration needs a rebuild")
integration.Status.Digest = hash
- integration.Status.Phase = v1alpha1.IntegrationPhaseInitialization
- if integration.Spec.Profile != v1alpha1.TraitProfile("") {
+ integration.Status.Phase = v1.IntegrationPhaseInitialization
+ if integration.Spec.Profile != v1.TraitProfile("") {
integration.Status.Profile = integration.Spec.Profile
}
integration.Status.Version = defaults.Version
diff --git a/pkg/controller/integration/platform_setup.go b/pkg/controller/integration/platform_setup.go
index 1082017..3142eb0 100644
--- a/pkg/controller/integration/platform_setup.go
+++ b/pkg/controller/integration/platform_setup.go
@@ -20,7 +20,7 @@ package integration
import (
"context"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/trait"
)
@@ -39,13 +39,13 @@ func (action *platformSetupAction) Name() string {
}
// CanHandle tells whether this action can handle the integration
-func (action *platformSetupAction) CanHandle(integration *v1alpha1.Integration) bool {
- return integration.Status.Phase == v1alpha1.IntegrationPhaseNone ||
- integration.Status.Phase == v1alpha1.IntegrationPhaseWaitingForPlatform
+func (action *platformSetupAction) CanHandle(integration *v1.Integration) bool {
+ return integration.Status.Phase == v1.IntegrationPhaseNone ||
+ integration.Status.Phase == v1.IntegrationPhaseWaitingForPlatform
}
// Handle handles the integrations
-func (action *platformSetupAction) Handle(ctx context.Context, integration *v1alpha1.Integration) (*v1alpha1.Integration, error) {
+func (action *platformSetupAction) Handle(ctx context.Context, integration *v1.Integration) (*v1.Integration, error) {
if _, err := trait.Apply(ctx, action.client, integration, nil); err != nil {
return nil, err
}
diff --git a/pkg/controller/integration/util.go b/pkg/controller/integration/util.go
index 261153a..633565e 100644
--- a/pkg/controller/integration/util.go
+++ b/pkg/controller/integration/util.go
@@ -27,19 +27,19 @@ import (
k8sclient "sigs.k8s.io/controller-runtime/pkg/client"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/util"
"github.com/apache/camel-k/pkg/util/controller"
"github.com/apache/camel-k/pkg/util/kubernetes"
)
var allowedLookupLabels = map[string]bool{
- v1alpha1.IntegrationKitTypePlatform: true,
- v1alpha1.IntegrationKitTypeExternal: true,
+ v1.IntegrationKitTypePlatform: true,
+ v1.IntegrationKitTypeExternal: true,
}
// LookupKitForIntegration --
-func LookupKitForIntegration(ctx context.Context, c k8sclient.Reader, integration *v1alpha1.Integration) (*v1alpha1.IntegrationKit, error) {
+func LookupKitForIntegration(ctx context.Context, c k8sclient.Reader, integration *v1.Integration) (*v1.IntegrationKit, error) {
if integration.Status.Kit != "" {
kit, err := kubernetes.GetIntegrationKit(ctx, c, integration.Status.Kit, integration.Namespace)
if err != nil {
@@ -63,7 +63,7 @@ func LookupKitForIntegration(ctx context.Context, c k8sclient.Reader, integratio
options = append(options, controller.MatchingSelector{Selector: selector})
}
- kits := v1alpha1.NewIntegrationKitList()
+ kits := v1.NewIntegrationKitList()
if err := c.List(ctx, &kits, options...); err != nil {
return nil, err
}
@@ -71,7 +71,7 @@ func LookupKitForIntegration(ctx context.Context, c k8sclient.Reader, integratio
for _, kit := range kits.Items {
kit := kit // pin
- if kit.Status.Phase == v1alpha1.IntegrationKitPhaseError {
+ if kit.Status.Phase == v1.IntegrationKitPhaseError {
continue
}
if kit.Status.CamelVersion != integration.Status.CamelVersion {
@@ -128,7 +128,7 @@ func LookupKitForIntegration(ctx context.Context, c k8sclient.Reader, integratio
}
// HasMatchingTraits compare traits defined on kit against those defined on integration.
-func HasMatchingTraits(kit *v1alpha1.IntegrationKit, integration *v1alpha1.Integration) bool {
+func HasMatchingTraits(kit *v1.IntegrationKit, integration *v1.Integration) bool {
for kitTraitName, kitTraitConf := range kit.Spec.Traits {
iTraitConf, ok := integration.Spec.Traits[kitTraitName]
if !ok {
diff --git a/pkg/controller/integration/util_test.go b/pkg/controller/integration/util_test.go
index 8029265..13b6762 100644
--- a/pkg/controller/integration/util_test.go
+++ b/pkg/controller/integration/util_test.go
@@ -23,7 +23,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/util/test"
"github.com/stretchr/testify/assert"
@@ -31,64 +31,64 @@ import (
func TestLookupKitForIntegration_DiscardKitsInError(t *testing.T) {
c, err := test.NewFakeClient(
- &v1alpha1.IntegrationKit{
+ &v1.IntegrationKit{
TypeMeta: metav1.TypeMeta{
- APIVersion: v1alpha1.SchemeGroupVersion.String(),
- Kind: v1alpha1.IntegrationKindKind,
+ APIVersion: v1.SchemeGroupVersion.String(),
+ Kind: v1.IntegrationKindKind,
},
ObjectMeta: metav1.ObjectMeta{
Namespace: "ns",
Name: "my-kit-1",
Labels: map[string]string{
- "camel.apache.org/kit.type": v1alpha1.IntegrationKitTypePlatform,
+ "camel.apache.org/kit.type": v1.IntegrationKitTypePlatform,
},
},
- Spec: v1alpha1.IntegrationKitSpec{
+ Spec: v1.IntegrationKitSpec{
Dependencies: []string{
"camel-core",
"camel-irc",
},
},
- Status: v1alpha1.IntegrationKitStatus{
- Phase: v1alpha1.IntegrationKitPhaseError,
+ Status: v1.IntegrationKitStatus{
+ Phase: v1.IntegrationKitPhaseError,
},
},
- &v1alpha1.IntegrationKit{
+ &v1.IntegrationKit{
TypeMeta: metav1.TypeMeta{
- APIVersion: v1alpha1.SchemeGroupVersion.String(),
- Kind: v1alpha1.IntegrationKindKind,
+ APIVersion: v1.SchemeGroupVersion.String(),
+ Kind: v1.IntegrationKindKind,
},
ObjectMeta: metav1.ObjectMeta{
Namespace: "ns",
Name: "my-kit-2",
Labels: map[string]string{
- "camel.apache.org/kit.type": v1alpha1.IntegrationKitTypePlatform,
+ "camel.apache.org/kit.type": v1.IntegrationKitTypePlatform,
},
},
- Spec: v1alpha1.IntegrationKitSpec{
+ Spec: v1.IntegrationKitSpec{
Dependencies: []string{
"camel-core",
"camel-irc",
},
},
- Status: v1alpha1.IntegrationKitStatus{
- Phase: v1alpha1.IntegrationKitPhaseReady,
+ Status: v1.IntegrationKitStatus{
+ Phase: v1.IntegrationKitPhaseReady,
},
},
)
assert.Nil(t, err)
- i, err := LookupKitForIntegration(context.TODO(), c, &v1alpha1.Integration{
+ i, err := LookupKitForIntegration(context.TODO(), c, &v1.Integration{
TypeMeta: metav1.TypeMeta{
- APIVersion: v1alpha1.SchemeGroupVersion.String(),
- Kind: v1alpha1.IntegrationKind,
+ APIVersion: v1.SchemeGroupVersion.String(),
+ Kind: v1.IntegrationKind,
},
ObjectMeta: metav1.ObjectMeta{
Namespace: "ns",
Name: "my-integration",
},
- Status: v1alpha1.IntegrationStatus{
+ Status: v1.IntegrationStatus{
Dependencies: []string{
"camel-core",
"camel-irc",
@@ -107,24 +107,24 @@ func TestLookupKitForIntegration_DiscardKitsWithIncompatibleTraits(t *testing.T)
// Should be discarded because it contains both of the required traits but one
// contains a different configuration value
//
- &v1alpha1.IntegrationKit{
+ &v1.IntegrationKit{
TypeMeta: metav1.TypeMeta{
- APIVersion: v1alpha1.SchemeGroupVersion.String(),
- Kind: v1alpha1.IntegrationKindKind,
+ APIVersion: v1.SchemeGroupVersion.String(),
+ Kind: v1.IntegrationKindKind,
},
ObjectMeta: metav1.ObjectMeta{
Namespace: "ns",
Name: "my-kit-1",
Labels: map[string]string{
- "camel.apache.org/kit.type": v1alpha1.IntegrationKitTypePlatform,
+ "camel.apache.org/kit.type": v1.IntegrationKitTypePlatform,
},
},
- Spec: v1alpha1.IntegrationKitSpec{
+ Spec: v1.IntegrationKitSpec{
Dependencies: []string{
"camel-core",
"camel-irc",
},
- Traits: map[string]v1alpha1.TraitSpec{
+ Traits: map[string]v1.TraitSpec{
"knative": {
Configuration: map[string]string{
"enabled": "true",
@@ -137,32 +137,32 @@ func TestLookupKitForIntegration_DiscardKitsWithIncompatibleTraits(t *testing.T)
},
},
},
- Status: v1alpha1.IntegrationKitStatus{
- Phase: v1alpha1.IntegrationKitPhaseReady,
+ Status: v1.IntegrationKitStatus{
+ Phase: v1.IntegrationKitPhaseReady,
},
},
//
// Should be discarded because it contains a subset of the required traits but
// with different configuration value
//
- &v1alpha1.IntegrationKit{
+ &v1.IntegrationKit{
TypeMeta: metav1.TypeMeta{
- APIVersion: v1alpha1.SchemeGroupVersion.String(),
- Kind: v1alpha1.IntegrationKindKind,
+ APIVersion: v1.SchemeGroupVersion.String(),
+ Kind: v1.IntegrationKindKind,
},
ObjectMeta: metav1.ObjectMeta{
Namespace: "ns",
Name: "my-kit-2",
Labels: map[string]string{
- "camel.apache.org/kit.type": v1alpha1.IntegrationKitTypePlatform,
+ "camel.apache.org/kit.type": v1.IntegrationKitTypePlatform,
},
},
- Spec: v1alpha1.IntegrationKitSpec{
+ Spec: v1.IntegrationKitSpec{
Dependencies: []string{
"camel-core",
"camel-irc",
},
- Traits: map[string]v1alpha1.TraitSpec{
+ Traits: map[string]v1.TraitSpec{
"knative": {
Configuration: map[string]string{
"enabled": "false",
@@ -170,32 +170,32 @@ func TestLookupKitForIntegration_DiscardKitsWithIncompatibleTraits(t *testing.T)
},
},
},
- Status: v1alpha1.IntegrationKitStatus{
- Phase: v1alpha1.IntegrationKitPhaseReady,
+ Status: v1.IntegrationKitStatus{
+ Phase: v1.IntegrationKitPhaseReady,
},
},
//
// Should be discarded because it contains both of the required traits but
// also an additional one
//
- &v1alpha1.IntegrationKit{
+ &v1.IntegrationKit{
TypeMeta: metav1.TypeMeta{
- APIVersion: v1alpha1.SchemeGroupVersion.String(),
- Kind: v1alpha1.IntegrationKindKind,
+ APIVersion: v1.SchemeGroupVersion.String(),
+ Kind: v1.IntegrationKindKind,
},
ObjectMeta: metav1.ObjectMeta{
Namespace: "ns",
Name: "my-kit-3",
Labels: map[string]string{
- "camel.apache.org/kit.type": v1alpha1.IntegrationKitTypePlatform,
+ "camel.apache.org/kit.type": v1.IntegrationKitTypePlatform,
},
},
- Spec: v1alpha1.IntegrationKitSpec{
+ Spec: v1.IntegrationKitSpec{
Dependencies: []string{
"camel-core",
"camel-irc",
},
- Traits: map[string]v1alpha1.TraitSpec{
+ Traits: map[string]v1.TraitSpec{
"knative": {
Configuration: map[string]string{
"enabled": "true",
@@ -213,32 +213,32 @@ func TestLookupKitForIntegration_DiscardKitsWithIncompatibleTraits(t *testing.T)
},
},
},
- Status: v1alpha1.IntegrationKitStatus{
- Phase: v1alpha1.IntegrationKitPhaseReady,
+ Status: v1.IntegrationKitStatus{
+ Phase: v1.IntegrationKitPhaseReady,
},
},
//
// Should NOT be discarded because it contains a subset of the required traits and
// same configuration values
//
- &v1alpha1.IntegrationKit{
+ &v1.IntegrationKit{
TypeMeta: metav1.TypeMeta{
- APIVersion: v1alpha1.SchemeGroupVersion.String(),
- Kind: v1alpha1.IntegrationKindKind,
+ APIVersion: v1.SchemeGroupVersion.String(),
+ Kind: v1.IntegrationKindKind,
},
ObjectMeta: metav1.ObjectMeta{
Namespace: "ns",
Name: "my-kit-4",
Labels: map[string]string{
- "camel.apache.org/kit.type": v1alpha1.IntegrationKitTypePlatform,
+ "camel.apache.org/kit.type": v1.IntegrationKitTypePlatform,
},
},
- Spec: v1alpha1.IntegrationKitSpec{
+ Spec: v1.IntegrationKitSpec{
Dependencies: []string{
"camel-core",
"camel-irc",
},
- Traits: map[string]v1alpha1.TraitSpec{
+ Traits: map[string]v1.TraitSpec{
"knative": {
Configuration: map[string]string{
"enabled": "true",
@@ -246,25 +246,25 @@ func TestLookupKitForIntegration_DiscardKitsWithIncompatibleTraits(t *testing.T)
},
},
},
- Status: v1alpha1.IntegrationKitStatus{
- Phase: v1alpha1.IntegrationKitPhaseReady,
+ Status: v1.IntegrationKitStatus{
+ Phase: v1.IntegrationKitPhaseReady,
},
},
)
assert.Nil(t, err)
- i, err := LookupKitForIntegration(context.TODO(), c, &v1alpha1.Integration{
+ i, err := LookupKitForIntegration(context.TODO(), c, &v1.Integration{
TypeMeta: metav1.TypeMeta{
- APIVersion: v1alpha1.SchemeGroupVersion.String(),
- Kind: v1alpha1.IntegrationKind,
+ APIVersion: v1.SchemeGroupVersion.String(),
+ Kind: v1.IntegrationKind,
},
ObjectMeta: metav1.ObjectMeta{
Namespace: "ns",
Name: "my-integration",
},
- Spec: v1alpha1.IntegrationSpec{
- Traits: map[string]v1alpha1.TraitSpec{
+ Spec: v1.IntegrationSpec{
+ Traits: map[string]v1.TraitSpec{
"knative": {
Configuration: map[string]string{
"enabled": "true",
@@ -277,7 +277,7 @@ func TestLookupKitForIntegration_DiscardKitsWithIncompatibleTraits(t *testing.T)
},
},
},
- Status: v1alpha1.IntegrationStatus{
+ Status: v1.IntegrationStatus{
Dependencies: []string{
"camel-core",
"camel-irc",
diff --git a/pkg/controller/integrationkit/action.go b/pkg/controller/integrationkit/action.go
index 5dd5ecf..354b80e 100644
--- a/pkg/controller/integrationkit/action.go
+++ b/pkg/controller/integrationkit/action.go
@@ -20,7 +20,7 @@ package integrationkit
import (
"context"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/client"
"github.com/apache/camel-k/pkg/util/log"
)
@@ -34,10 +34,10 @@ type Action interface {
Name() string
// returns true if the action can handle the integration kit
- CanHandle(kit *v1alpha1.IntegrationKit) bool
+ CanHandle(kit *v1.IntegrationKit) bool
// executes the handling function
- Handle(ctx context.Context, kit *v1alpha1.IntegrationKit) (*v1alpha1.IntegrationKit, error)
+ Handle(ctx context.Context, kit *v1.IntegrationKit) (*v1.IntegrationKit, error)
}
type baseAction struct {
diff --git a/pkg/controller/integrationkit/build.go b/pkg/controller/integrationkit/build.go
index f234343..ed00d8e 100644
--- a/pkg/controller/integrationkit/build.go
+++ b/pkg/controller/integrationkit/build.go
@@ -28,7 +28,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/trait"
"github.com/apache/camel-k/pkg/util/kubernetes"
)
@@ -46,31 +46,31 @@ func (action *buildAction) Name() string {
return "build-submitted"
}
-func (action *buildAction) CanHandle(kit *v1alpha1.IntegrationKit) bool {
- return kit.Status.Phase == v1alpha1.IntegrationKitPhaseBuildSubmitted ||
- kit.Status.Phase == v1alpha1.IntegrationKitPhaseBuildRunning
+func (action *buildAction) CanHandle(kit *v1.IntegrationKit) bool {
+ return kit.Status.Phase == v1.IntegrationKitPhaseBuildSubmitted ||
+ kit.Status.Phase == v1.IntegrationKitPhaseBuildRunning
}
-func (action *buildAction) Handle(ctx context.Context, kit *v1alpha1.IntegrationKit) (*v1alpha1.IntegrationKit, error) {
- if kit.Status.Phase == v1alpha1.IntegrationKitPhaseBuildSubmitted {
+func (action *buildAction) Handle(ctx context.Context, kit *v1.IntegrationKit) (*v1.IntegrationKit, error) {
+ if kit.Status.Phase == v1.IntegrationKitPhaseBuildSubmitted {
return action.handleBuildSubmitted(ctx, kit)
- } else if kit.Status.Phase == v1alpha1.IntegrationKitPhaseBuildRunning {
+ } else if kit.Status.Phase == v1.IntegrationKitPhaseBuildRunning {
return action.handleBuildRunning(ctx, kit)
}
return nil, nil
}
-func (action *buildAction) handleBuildSubmitted(ctx context.Context, kit *v1alpha1.IntegrationKit) (*v1alpha1.IntegrationKit, error) {
+func (action *buildAction) handleBuildSubmitted(ctx context.Context, kit *v1.IntegrationKit) (*v1.IntegrationKit, error) {
build, err := kubernetes.GetBuild(ctx, action.client, kit.Name, kit.Namespace)
if err != nil && !k8serrors.IsNotFound(err) {
return nil, err
}
if err != nil && k8serrors.IsNotFound(err) ||
- build.Status.Phase == v1alpha1.BuildPhaseError ||
- build.Status.Phase == v1alpha1.BuildPhaseInterrupted ||
- build.Status.Phase == v1alpha1.BuildPhaseSucceeded {
+ build.Status.Phase == v1.BuildPhaseError ||
+ build.Status.Phase == v1.BuildPhaseInterrupted ||
+ build.Status.Phase == v1.BuildPhaseSucceeded {
env, err := trait.Apply(ctx, action.client, nil, kit)
if err != nil {
@@ -81,16 +81,16 @@ func (action *buildAction) handleBuildSubmitted(ctx context.Context, kit *v1alph
return nil, errors.New("undefined camel catalog")
}
- build = &v1alpha1.Build{
+ build = &v1.Build{
TypeMeta: metav1.TypeMeta{
- APIVersion: v1alpha1.SchemeGroupVersion.String(),
- Kind: v1alpha1.BuildKind,
+ APIVersion: v1.SchemeGroupVersion.String(),
+ Kind: v1.BuildKind,
},
ObjectMeta: metav1.ObjectMeta{
Namespace: kit.Namespace,
Name: kit.Name,
},
- Spec: v1alpha1.BuildSpec{
+ Spec: v1.BuildSpec{
Tasks: env.BuildTasks,
},
}
@@ -111,42 +111,42 @@ func (action *buildAction) handleBuildSubmitted(ctx context.Context, kit *v1alph
}
}
- if build.Status.Phase == v1alpha1.BuildPhaseRunning {
- kit.Status.Phase = v1alpha1.IntegrationKitPhaseBuildRunning
+ if build.Status.Phase == v1.BuildPhaseRunning {
+ kit.Status.Phase = v1.IntegrationKitPhaseBuildRunning
return kit, nil
}
return nil, nil
}
-func (action *buildAction) handleBuildRunning(ctx context.Context, kit *v1alpha1.IntegrationKit) (*v1alpha1.IntegrationKit, error) {
+func (action *buildAction) handleBuildRunning(ctx context.Context, kit *v1.IntegrationKit) (*v1.IntegrationKit, error) {
build, err := kubernetes.GetBuild(ctx, action.client, kit.Name, kit.Namespace)
if err != nil {
return nil, err
}
switch build.Status.Phase {
- case v1alpha1.BuildPhaseRunning:
+ case v1.BuildPhaseRunning:
action.L.Info("Build running")
- case v1alpha1.BuildPhaseSucceeded:
+ case v1.BuildPhaseSucceeded:
// we should ensure that the integration kit is still in the right phase,
// if not there is a chance that the kit has been modified by the user
- if kit.Status.Phase != v1alpha1.IntegrationKitPhaseBuildRunning {
+ if kit.Status.Phase != v1.IntegrationKitPhaseBuildRunning {
return nil, fmt.Errorf("found kit %s not in the expected phase (expectd=%s, found=%s)",
kit.Name,
- string(v1alpha1.IntegrationKitPhaseBuildRunning),
+ string(v1.IntegrationKitPhaseBuildRunning),
string(kit.Status.Phase),
)
}
kit.Status.BaseImage = build.Status.BaseImage
kit.Status.Image = build.Status.Image
- kit.Status.Phase = v1alpha1.IntegrationKitPhaseReady
- kit.Status.Artifacts = make([]v1alpha1.Artifact, 0, len(build.Status.Artifacts))
+ kit.Status.Phase = v1.IntegrationKitPhaseReady
+ kit.Status.Artifacts = make([]v1.Artifact, 0, len(build.Status.Artifacts))
for _, a := range build.Status.Artifacts {
// do not include artifact location
- kit.Status.Artifacts = append(kit.Status.Artifacts, v1alpha1.Artifact{
+ kit.Status.Artifacts = append(kit.Status.Artifacts, v1.Artifact{
ID: a.ID,
Location: "",
Target: a.Target,
@@ -154,20 +154,20 @@ func (action *buildAction) handleBuildRunning(ctx context.Context, kit *v1alpha1
}
return kit, err
- case v1alpha1.BuildPhaseError, v1alpha1.BuildPhaseInterrupted:
+ case v1.BuildPhaseError, v1.BuildPhaseInterrupted:
// we should ensure that the integration kit is still in the right phase,
// if not there is a chance that the kit has been modified by the user
- if kit.Status.Phase != v1alpha1.IntegrationKitPhaseBuildRunning {
+ if kit.Status.Phase != v1.IntegrationKitPhaseBuildRunning {
return nil, fmt.Errorf("found kit %s not the an expected phase (expectd=%s, found=%s)",
kit.Name,
- string(v1alpha1.IntegrationKitPhaseBuildRunning),
+ string(v1.IntegrationKitPhaseBuildRunning),
string(kit.Status.Phase),
)
}
// Let's copy the build failure to the integration kit status
kit.Status.Failure = build.Status.Failure
- kit.Status.Phase = v1alpha1.IntegrationKitPhaseError
+ kit.Status.Phase = v1.IntegrationKitPhaseError
return kit, nil
}
diff --git a/pkg/controller/integrationkit/error.go b/pkg/controller/integrationkit/error.go
index ac63e46..3c0a364 100644
--- a/pkg/controller/integrationkit/error.go
+++ b/pkg/controller/integrationkit/error.go
@@ -20,7 +20,7 @@ package integrationkit
import (
"context"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/util/digest"
)
@@ -37,11 +37,11 @@ func (action *errorAction) Name() string {
return "error"
}
-func (action *errorAction) CanHandle(kit *v1alpha1.IntegrationKit) bool {
- return kit.Status.Phase == v1alpha1.IntegrationKitPhaseError
+func (action *errorAction) CanHandle(kit *v1.IntegrationKit) bool {
+ return kit.Status.Phase == v1.IntegrationKitPhaseError
}
-func (action *errorAction) Handle(ctx context.Context, kit *v1alpha1.IntegrationKit) (*v1alpha1.IntegrationKit, error) {
+func (action *errorAction) Handle(ctx context.Context, kit *v1.IntegrationKit) (*v1.IntegrationKit, error) {
hash, err := digest.ComputeForIntegrationKit(kit)
if err != nil {
return nil, err
@@ -50,7 +50,7 @@ func (action *errorAction) Handle(ctx context.Context, kit *v1alpha1.Integration
action.L.Info("IntegrationKit needs a rebuild")
kit.Status.Digest = hash
- kit.Status.Phase = v1alpha1.IntegrationKitPhaseInitialization
+ kit.Status.Phase = v1.IntegrationKitPhaseInitialization
return kit, nil
}
diff --git a/pkg/controller/integrationkit/initialize.go b/pkg/controller/integrationkit/initialize.go
index 404e149..6293b43 100644
--- a/pkg/controller/integrationkit/initialize.go
+++ b/pkg/controller/integrationkit/initialize.go
@@ -20,7 +20,7 @@ package integrationkit
import (
"context"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/trait"
"github.com/apache/camel-k/pkg/util/defaults"
)
@@ -38,11 +38,11 @@ func (action *initializeAction) Name() string {
return "initialize"
}
-func (action *initializeAction) CanHandle(kit *v1alpha1.IntegrationKit) bool {
- return kit.Status.Phase == v1alpha1.IntegrationKitPhaseInitialization
+func (action *initializeAction) CanHandle(kit *v1.IntegrationKit) bool {
+ return kit.Status.Phase == v1.IntegrationKitPhaseInitialization
}
-func (action *initializeAction) Handle(ctx context.Context, kit *v1alpha1.IntegrationKit) (*v1alpha1.IntegrationKit, error) {
+func (action *initializeAction) Handle(ctx context.Context, kit *v1.IntegrationKit) (*v1.IntegrationKit, error) {
_, err := trait.Apply(ctx, action.client, nil, kit)
if err != nil {
return nil, err
@@ -50,11 +50,11 @@ func (action *initializeAction) Handle(ctx context.Context, kit *v1alpha1.Integr
if kit.Spec.Image == "" {
// by default the kit should be built
- kit.Status.Phase = v1alpha1.IntegrationKitPhaseBuildSubmitted
+ kit.Status.Phase = v1.IntegrationKitPhaseBuildSubmitted
} else {
// but in case it has been created from an image, mark the
// kit as ready
- kit.Status.Phase = v1alpha1.IntegrationKitPhaseReady
+ kit.Status.Phase = v1.IntegrationKitPhaseReady
// and set the image to be used
kit.Status.Image = kit.Spec.Image
diff --git a/pkg/controller/integrationkit/integrationkit_controller.go b/pkg/controller/integrationkit/integrationkit_controller.go
index ed84f1d..7ab3bec 100644
--- a/pkg/controller/integrationkit/integrationkit_controller.go
+++ b/pkg/controller/integrationkit/integrationkit_controller.go
@@ -38,7 +38,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/reconcile"
"sigs.k8s.io/controller-runtime/pkg/source"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/client"
)
@@ -69,10 +69,10 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
}
// Watch for changes to primary resource IntegrationKit
- err = c.Watch(&source.Kind{Type: &v1alpha1.IntegrationKit{}}, &handler.EnqueueRequestForObject{}, predicate.Funcs{
+ err = c.Watch(&source.Kind{Type: &v1.IntegrationKit{}}, &handler.EnqueueRequestForObject{}, predicate.Funcs{
UpdateFunc: func(e event.UpdateEvent) bool {
- oldIntegrationKit := e.ObjectOld.(*v1alpha1.IntegrationKit)
- newIntegrationKit := e.ObjectNew.(*v1alpha1.IntegrationKit)
+ oldIntegrationKit := e.ObjectOld.(*v1.IntegrationKit)
+ newIntegrationKit := e.ObjectNew.(*v1.IntegrationKit)
// Ignore updates to the integration kit status in which case metadata.Generation
// does not change, or except when the integration kit phase changes as it's used
// to transition from one phase to another
@@ -89,15 +89,15 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
}
// Watch for changes to secondary resource Builds and requeue the owner IntegrationKit
- err = c.Watch(&source.Kind{Type: &v1alpha1.Build{}},
+ err = c.Watch(&source.Kind{Type: &v1.Build{}},
&handler.EnqueueRequestForOwner{
IsController: true,
- OwnerType: &v1alpha1.IntegrationKit{},
+ OwnerType: &v1.IntegrationKit{},
},
predicate.Funcs{
UpdateFunc: func(e event.UpdateEvent) bool {
- oldBuild := e.ObjectOld.(*v1alpha1.Build)
- newBuild := e.ObjectNew.(*v1alpha1.Build)
+ oldBuild := e.ObjectOld.(*v1.Build)
+ newBuild := e.ObjectNew.(*v1.Build)
// Ignore updates to the build CR except when the build phase changes
// as it's used to transition the integration kit from one phase
// to another during the image build
@@ -110,13 +110,13 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
// Watch for IntegrationPlatform phase transitioning to ready and enqueue
// requests for any integrationkits that are in phase waiting for platform
- err = c.Watch(&source.Kind{Type: &v1alpha1.IntegrationPlatform{}}, &handler.EnqueueRequestsFromMapFunc{
+ err = c.Watch(&source.Kind{Type: &v1.IntegrationPlatform{}}, &handler.EnqueueRequestsFromMapFunc{
ToRequests: handler.ToRequestsFunc(func(a handler.MapObject) []reconcile.Request {
- platform := a.Object.(*v1alpha1.IntegrationPlatform)
+ platform := a.Object.(*v1.IntegrationPlatform)
var requests []reconcile.Request
- if platform.Status.Phase == v1alpha1.IntegrationPlatformPhaseReady {
- list := &v1alpha1.IntegrationKitList{}
+ if platform.Status.Phase == v1.IntegrationPlatformPhaseReady {
+ list := &v1.IntegrationKitList{}
if err := mgr.GetClient().List(context.TODO(), list, k8sclient.InNamespace(platform.Namespace)); err != nil {
log.Error(err, "Failed to retrieve integrationkit list")
@@ -124,7 +124,7 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
}
for _, kit := range list.Items {
- if kit.Status.Phase == v1alpha1.IntegrationKitPhaseWaitingForPlatform {
+ if kit.Status.Phase == v1.IntegrationKitPhaseWaitingForPlatform {
log.Infof("Platform %s ready, wake-up integrationkit: %s", platform.Name, kit.Name)
requests = append(requests, reconcile.Request{
NamespacedName: types.NamespacedName{
@@ -167,7 +167,7 @@ func (r *ReconcileIntegrationKit) Reconcile(request reconcile.Request) (reconcil
ctx := context.TODO()
- var instance v1alpha1.IntegrationKit
+ var instance v1.IntegrationKit
// Fetch the IntegrationKit instance
if err := r.client.Get(ctx, request.NamespacedName, &instance); err != nil {
@@ -184,17 +184,17 @@ func (r *ReconcileIntegrationKit) Reconcile(request reconcile.Request) (reconcil
target := instance.DeepCopy()
targetLog := rlog.ForIntegrationKit(target)
- if target.Status.Phase == v1alpha1.IntegrationKitPhaseNone || target.Status.Phase == v1alpha1.IntegrationKitPhaseWaitingForPlatform {
+ if target.Status.Phase == v1.IntegrationKitPhaseNone || target.Status.Phase == v1.IntegrationKitPhaseWaitingForPlatform {
pl, err := platform.GetOrLookupCurrent(ctx, r.client, target.Namespace, target.Status.Platform)
- if err != nil || pl.Status.Phase != v1alpha1.IntegrationPlatformPhaseReady {
- target.Status.Phase = v1alpha1.IntegrationKitPhaseWaitingForPlatform
+ if err != nil || pl.Status.Phase != v1.IntegrationPlatformPhaseReady {
+ target.Status.Phase = v1.IntegrationKitPhaseWaitingForPlatform
} else {
- target.Status.Phase = v1alpha1.IntegrationKitPhaseInitialization
+ target.Status.Phase = v1.IntegrationKitPhaseInitialization
}
if instance.Status.Phase != target.Status.Phase {
if err != nil {
- target.Status.SetErrorCondition(v1alpha1.IntegrationKitConditionPlatformAvailable, v1alpha1.IntegrationKitConditionPlatformAvailableReason, err)
+ target.Status.SetErrorCondition(v1.IntegrationKitConditionPlatformAvailable, v1.IntegrationKitConditionPlatformAvailableReason, err)
}
if pl != nil {
@@ -249,7 +249,7 @@ func (r *ReconcileIntegrationKit) Reconcile(request reconcile.Request) (reconcil
return reconcile.Result{}, nil
}
-func (r *ReconcileIntegrationKit) update(ctx context.Context, base *v1alpha1.IntegrationKit, target *v1alpha1.IntegrationKit) (reconcile.Result, error) {
+func (r *ReconcileIntegrationKit) update(ctx context.Context, base *v1.IntegrationKit, target *v1.IntegrationKit) (reconcile.Result, error) {
dgst, err := digest.ComputeForIntegrationKit(target)
if err != nil {
return reconcile.Result{}, err
diff --git a/pkg/controller/integrationkit/monitor.go b/pkg/controller/integrationkit/monitor.go
index fdcfcbc..79fe25a 100644
--- a/pkg/controller/integrationkit/monitor.go
+++ b/pkg/controller/integrationkit/monitor.go
@@ -20,7 +20,7 @@ package integrationkit
import (
"context"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/util/digest"
)
@@ -37,11 +37,11 @@ func (action *monitorAction) Name() string {
return "monitor"
}
-func (action *monitorAction) CanHandle(kit *v1alpha1.IntegrationKit) bool {
- return kit.Status.Phase == v1alpha1.IntegrationKitPhaseReady
+func (action *monitorAction) CanHandle(kit *v1.IntegrationKit) bool {
+ return kit.Status.Phase == v1.IntegrationKitPhaseReady
}
-func (action *monitorAction) Handle(ctx context.Context, kit *v1alpha1.IntegrationKit) (*v1alpha1.IntegrationKit, error) {
+func (action *monitorAction) Handle(ctx context.Context, kit *v1.IntegrationKit) (*v1.IntegrationKit, error) {
hash, err := digest.ComputeForIntegrationKit(kit)
if err != nil {
return nil, err
@@ -50,7 +50,7 @@ func (action *monitorAction) Handle(ctx context.Context, kit *v1alpha1.Integrati
action.L.Info("IntegrationKit needs a rebuild")
kit.Status.Digest = hash
- kit.Status.Phase = v1alpha1.IntegrationKitPhaseInitialization
+ kit.Status.Phase = v1.IntegrationKitPhaseInitialization
return kit, nil
}
diff --git a/pkg/controller/integrationplatform/action.go b/pkg/controller/integrationplatform/action.go
index efa33a4..667d1c7 100644
--- a/pkg/controller/integrationplatform/action.go
+++ b/pkg/controller/integrationplatform/action.go
@@ -20,7 +20,7 @@ package integrationplatform
import (
"context"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/client"
"github.com/apache/camel-k/pkg/util/log"
)
@@ -34,10 +34,10 @@ type Action interface {
Name() string
// returns true if the action can handle the integration platform
- CanHandle(platform *v1alpha1.IntegrationPlatform) bool
+ CanHandle(platform *v1.IntegrationPlatform) bool
// executes the handling function
- Handle(ctx context.Context, platform *v1alpha1.IntegrationPlatform) (*v1alpha1.IntegrationPlatform, error)
+ Handle(ctx context.Context, platform *v1.IntegrationPlatform) (*v1.IntegrationPlatform, error)
}
type baseAction struct {
diff --git a/pkg/controller/integrationplatform/create.go b/pkg/controller/integrationplatform/create.go
index 6bbe14f..16e9423 100644
--- a/pkg/controller/integrationplatform/create.go
+++ b/pkg/controller/integrationplatform/create.go
@@ -24,7 +24,7 @@ import (
"github.com/apache/camel-k/deploy"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/install"
)
@@ -41,11 +41,11 @@ func (action *createAction) Name() string {
return "create"
}
-func (action *createAction) CanHandle(platform *v1alpha1.IntegrationPlatform) bool {
- return platform.Status.Phase == v1alpha1.IntegrationPlatformPhaseCreating
+func (action *createAction) CanHandle(platform *v1.IntegrationPlatform) bool {
+ return platform.Status.Phase == v1.IntegrationPlatformPhaseCreating
}
-func (action *createAction) Handle(ctx context.Context, platform *v1alpha1.IntegrationPlatform) (*v1alpha1.IntegrationPlatform, error) {
+func (action *createAction) Handle(ctx context.Context, platform *v1.IntegrationPlatform) (*v1.IntegrationPlatform, error) {
for k := range deploy.Resources {
if strings.HasPrefix(k, "camel-catalog-") {
action.L.Infof("Installing camel catalog: %s", k)
@@ -80,7 +80,7 @@ func (action *createAction) Handle(ctx context.Context, platform *v1alpha1.Integ
}
}
- platform.Status.Phase = v1alpha1.IntegrationPlatformPhaseReady
+ platform.Status.Phase = v1.IntegrationPlatformPhaseReady
return platform, nil
}
diff --git a/pkg/controller/integrationplatform/create_test.go b/pkg/controller/integrationplatform/create_test.go
index ac2cb0e..b0b3474 100644
--- a/pkg/controller/integrationplatform/create_test.go
+++ b/pkg/controller/integrationplatform/create_test.go
@@ -23,7 +23,7 @@ import (
"testing"
"github.com/apache/camel-k/deploy"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/platform"
"github.com/apache/camel-k/pkg/util/log"
"github.com/apache/camel-k/pkg/util/test"
@@ -33,11 +33,11 @@ import (
)
func TestCreate(t *testing.T) {
- ip := v1alpha1.IntegrationPlatform{}
+ ip := v1.IntegrationPlatform{}
ip.Namespace = "ns"
ip.Name = xid.New().String()
- ip.Spec.Cluster = v1alpha1.IntegrationPlatformClusterOpenShift
- ip.Spec.Profile = v1alpha1.TraitProfileOpenShift
+ ip.Spec.Cluster = v1.IntegrationPlatformClusterOpenShift
+ ip.Spec.Profile = v1.TraitProfileOpenShift
c, err := test.NewFakeClient(&ip)
assert.Nil(t, err)
@@ -53,7 +53,7 @@ func TestCreate(t *testing.T) {
assert.Nil(t, err)
assert.NotNil(t, answer)
- list := v1alpha1.NewCamelCatalogList()
+ list := v1.NewCamelCatalogList()
err = c.List(context.TODO(), &list, k8sclient.InNamespace(ip.Namespace))
assert.Nil(t, err)
diff --git a/pkg/controller/integrationplatform/initialize.go b/pkg/controller/integrationplatform/initialize.go
index dd50ef2..4baab4a 100644
--- a/pkg/controller/integrationplatform/initialize.go
+++ b/pkg/controller/integrationplatform/initialize.go
@@ -25,7 +25,7 @@ import (
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/client"
platformutil "github.com/apache/camel-k/pkg/platform"
"github.com/apache/camel-k/pkg/util/defaults"
@@ -44,20 +44,20 @@ func (action *initializeAction) Name() string {
return "initialize"
}
-func (action *initializeAction) CanHandle(platform *v1alpha1.IntegrationPlatform) bool {
- return platform.Status.Phase == "" || platform.Status.Phase == v1alpha1.IntegrationPlatformPhaseDuplicate
+func (action *initializeAction) CanHandle(platform *v1.IntegrationPlatform) bool {
+ return platform.Status.Phase == "" || platform.Status.Phase == v1.IntegrationPlatformPhaseDuplicate
}
-func (action *initializeAction) Handle(ctx context.Context, platform *v1alpha1.IntegrationPlatform) (*v1alpha1.IntegrationPlatform, error) {
+func (action *initializeAction) Handle(ctx context.Context, platform *v1.IntegrationPlatform) (*v1.IntegrationPlatform, error) {
duplicate, err := action.isDuplicate(ctx, platform)
if err != nil {
return nil, err
}
if duplicate {
// another platform already present in the namespace
- if platform.Status.Phase != v1alpha1.IntegrationPlatformPhaseDuplicate {
+ if platform.Status.Phase != v1.IntegrationPlatformPhaseDuplicate {
platform := platform.DeepCopy()
- platform.Status.Phase = v1alpha1.IntegrationPlatformPhaseDuplicate
+ platform.Status.Phase = v1.IntegrationPlatformPhaseDuplicate
return platform, nil
}
@@ -69,7 +69,7 @@ func (action *initializeAction) Handle(ctx context.Context, platform *v1alpha1.I
return nil, err
}
- if platform.Status.Build.PublishStrategy == v1alpha1.IntegrationPlatformBuildPublishStrategyKaniko {
+ if platform.Status.Build.PublishStrategy == v1.IntegrationPlatformBuildPublishStrategyKaniko {
if platform.Status.Build.IsKanikoCacheEnabled() {
// Create the persistent volume claim used by the Kaniko cache
action.L.Info("Create persistent volume claim")
@@ -83,20 +83,20 @@ func (action *initializeAction) Handle(ctx context.Context, platform *v1alpha1.I
if err != nil {
return nil, err
}
- platform.Status.Phase = v1alpha1.IntegrationPlatformPhaseWarming
+ platform.Status.Phase = v1.IntegrationPlatformPhaseWarming
} else {
// Skip the warmer pod creation
- platform.Status.Phase = v1alpha1.IntegrationPlatformPhaseCreating
+ platform.Status.Phase = v1.IntegrationPlatformPhaseCreating
}
} else {
- platform.Status.Phase = v1alpha1.IntegrationPlatformPhaseCreating
+ platform.Status.Phase = v1.IntegrationPlatformPhaseCreating
}
platform.Status.Version = defaults.Version
return platform, nil
}
-func (action *initializeAction) isDuplicate(ctx context.Context, thisPlatform *v1alpha1.IntegrationPlatform) (bool, error) {
+func (action *initializeAction) isDuplicate(ctx context.Context, thisPlatform *v1.IntegrationPlatform) (bool, error) {
platforms, err := platformutil.ListPlatforms(ctx, action.client, thisPlatform.Namespace)
if err != nil {
return false, err
@@ -111,7 +111,7 @@ func (action *initializeAction) isDuplicate(ctx context.Context, thisPlatform *v
return false, nil
}
-func createPersistentVolumeClaim(ctx context.Context, client client.Client, platform *v1alpha1.IntegrationPlatform) error {
+func createPersistentVolumeClaim(ctx context.Context, client client.Client, platform *v1.IntegrationPlatform) error {
volumeSize, err := resource.ParseQuantity("1Gi")
if err != nil {
return err
diff --git a/pkg/controller/integrationplatform/initialize_test.go b/pkg/controller/integrationplatform/initialize_test.go
index 9f7a047..e46a1ee 100644
--- a/pkg/controller/integrationplatform/initialize_test.go
+++ b/pkg/controller/integrationplatform/initialize_test.go
@@ -25,7 +25,7 @@ import (
"github.com/apache/camel-k/pkg/platform"
"github.com/rs/xid"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/util/log"
"github.com/apache/camel-k/pkg/util/test"
@@ -35,11 +35,11 @@ import (
)
func TestTimeouts_Default(t *testing.T) {
- ip := v1alpha1.IntegrationPlatform{}
+ ip := v1.IntegrationPlatform{}
ip.Namespace = "ns"
ip.Name = xid.New().String()
- ip.Spec.Cluster = v1alpha1.IntegrationPlatformClusterOpenShift
- ip.Spec.Profile = v1alpha1.TraitProfileOpenShift
+ ip.Spec.Cluster = v1.IntegrationPlatformClusterOpenShift
+ ip.Spec.Profile = v1.TraitProfileOpenShift
c, err := test.NewFakeClient(&ip)
assert.Nil(t, err)
@@ -62,11 +62,11 @@ func TestTimeouts_Default(t *testing.T) {
}
func TestTimeouts_MavenComputedFromBuild(t *testing.T) {
- ip := v1alpha1.IntegrationPlatform{}
+ ip := v1.IntegrationPlatform{}
ip.Namespace = "ns"
ip.Name = xid.New().String()
- ip.Spec.Cluster = v1alpha1.IntegrationPlatformClusterOpenShift
- ip.Spec.Profile = v1alpha1.TraitProfileOpenShift
+ ip.Spec.Cluster = v1.IntegrationPlatformClusterOpenShift
+ ip.Spec.Profile = v1.TraitProfileOpenShift
timeout, err := time.ParseDuration("1m1ms")
assert.Nil(t, err)
@@ -96,11 +96,11 @@ func TestTimeouts_MavenComputedFromBuild(t *testing.T) {
}
func TestTimeouts_Truncated(t *testing.T) {
- ip := v1alpha1.IntegrationPlatform{}
+ ip := v1.IntegrationPlatform{}
ip.Namespace = "ns"
ip.Name = xid.New().String()
- ip.Spec.Cluster = v1alpha1.IntegrationPlatformClusterOpenShift
- ip.Spec.Profile = v1alpha1.TraitProfileOpenShift
+ ip.Spec.Cluster = v1.IntegrationPlatformClusterOpenShift
+ ip.Spec.Profile = v1.TraitProfileOpenShift
bt, err := time.ParseDuration("5m1ms")
assert.Nil(t, err)
@@ -134,11 +134,11 @@ func TestTimeouts_Truncated(t *testing.T) {
}
func TestDefaultMavenSettingsApplied(t *testing.T) {
- ip := v1alpha1.IntegrationPlatform{}
+ ip := v1.IntegrationPlatform{}
ip.Namespace = "ns"
ip.Name = "test-platform"
- ip.Spec.Cluster = v1alpha1.IntegrationPlatformClusterOpenShift
- ip.Spec.Profile = v1alpha1.TraitProfileOpenShift
+ ip.Spec.Cluster = v1.IntegrationPlatformClusterOpenShift
+ ip.Spec.Profile = v1.TraitProfileOpenShift
c, err := test.NewFakeClient(&ip)
assert.Nil(t, err)
diff --git a/pkg/controller/integrationplatform/integrationplatform_controller.go b/pkg/controller/integrationplatform/integrationplatform_controller.go
index e162d4b..cc9ec9a 100644
--- a/pkg/controller/integrationplatform/integrationplatform_controller.go
+++ b/pkg/controller/integrationplatform/integrationplatform_controller.go
@@ -33,7 +33,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/reconcile"
"sigs.k8s.io/controller-runtime/pkg/source"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/client"
)
@@ -64,10 +64,10 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
}
// Watch for changes to primary resource IntegrationPlatform
- err = c.Watch(&source.Kind{Type: &v1alpha1.IntegrationPlatform{}}, &handler.EnqueueRequestForObject{}, predicate.Funcs{
+ err = c.Watch(&source.Kind{Type: &v1.IntegrationPlatform{}}, &handler.EnqueueRequestForObject{}, predicate.Funcs{
UpdateFunc: func(e event.UpdateEvent) bool {
- oldIntegrationPlatform := e.ObjectOld.(*v1alpha1.IntegrationPlatform)
- newIntegrationPlatform := e.ObjectNew.(*v1alpha1.IntegrationPlatform)
+ oldIntegrationPlatform := e.ObjectOld.(*v1.IntegrationPlatform)
+ newIntegrationPlatform := e.ObjectNew.(*v1.IntegrationPlatform)
// Ignore updates to the integration platform status in which case metadata.Generation
// does not change, or except when the integration platform phase changes as it's used
// to transition from one phase to another
@@ -108,7 +108,7 @@ func (r *ReconcileIntegrationPlatform) Reconcile(request reconcile.Request) (rec
ctx := context.TODO()
// Fetch the IntegrationPlatform instance
- var instance v1alpha1.IntegrationPlatform
+ var instance v1.IntegrationPlatform
if err := r.client.Get(ctx, request.NamespacedName, &instance); err != nil {
if errors.IsNotFound(err) {
@@ -130,7 +130,7 @@ func (r *ReconcileIntegrationPlatform) Reconcile(request reconcile.Request) (rec
NewMonitorAction(),
}
- var targetPhase v1alpha1.IntegrationPlatformPhase
+ var targetPhase v1.IntegrationPlatformPhase
var err error
target := instance.DeepCopy()
@@ -172,7 +172,7 @@ func (r *ReconcileIntegrationPlatform) Reconcile(request reconcile.Request) (rec
}
}
- if targetPhase == v1alpha1.IntegrationPlatformPhaseReady {
+ if targetPhase == v1.IntegrationPlatformPhaseReady {
return reconcile.Result{}, nil
}
diff --git a/pkg/controller/integrationplatform/kaniko_cache.go b/pkg/controller/integrationplatform/kaniko_cache.go
index 195090e..f8883cb 100644
--- a/pkg/controller/integrationplatform/kaniko_cache.go
+++ b/pkg/controller/integrationplatform/kaniko_cache.go
@@ -27,13 +27,13 @@ import (
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/builder/kaniko"
"github.com/apache/camel-k/pkg/client"
"github.com/apache/camel-k/pkg/util/defaults"
)
-func createKanikoCacheWarmerPod(ctx context.Context, client client.Client, platform *v1alpha1.IntegrationPlatform) error {
+func createKanikoCacheWarmerPod(ctx context.Context, client client.Client, platform *v1.IntegrationPlatform) error {
// The pod will be scheduled to nodes that are selected by the persistent volume
// node affinity spec, if any, as provisioned by the persistent volume claim storage
// class provisioner.
diff --git a/pkg/controller/integrationplatform/monitor.go b/pkg/controller/integrationplatform/monitor.go
index 380f3f1..a96209c 100644
--- a/pkg/controller/integrationplatform/monitor.go
+++ b/pkg/controller/integrationplatform/monitor.go
@@ -20,7 +20,7 @@ package integrationplatform
import (
"context"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
platformutils "github.com/apache/camel-k/pkg/platform"
"github.com/apache/camel-k/pkg/util/defaults"
)
@@ -38,11 +38,11 @@ func (action *monitorAction) Name() string {
return "monitor"
}
-func (action *monitorAction) CanHandle(platform *v1alpha1.IntegrationPlatform) bool {
- return platform.Status.Phase == v1alpha1.IntegrationPlatformPhaseReady
+func (action *monitorAction) CanHandle(platform *v1.IntegrationPlatform) bool {
+ return platform.Status.Phase == v1.IntegrationPlatformPhaseReady
}
-func (action *monitorAction) Handle(ctx context.Context, platform *v1alpha1.IntegrationPlatform) (*v1alpha1.IntegrationPlatform, error) {
+func (action *monitorAction) Handle(ctx context.Context, platform *v1.IntegrationPlatform) (*v1.IntegrationPlatform, error) {
// Just track the version of the operator in the platform resource
if platform.Status.Version != defaults.Version {
platform.Status.Version = defaults.Version
diff --git a/pkg/controller/integrationplatform/warm.go b/pkg/controller/integrationplatform/warm.go
index cc3d0ef..1978347 100644
--- a/pkg/controller/integrationplatform/warm.go
+++ b/pkg/controller/integrationplatform/warm.go
@@ -25,7 +25,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
)
// NewWarmAction returns a action that creates resources needed by the platform
@@ -41,11 +41,11 @@ func (action *warmAction) Name() string {
return "warm"
}
-func (action *warmAction) CanHandle(platform *v1alpha1.IntegrationPlatform) bool {
- return platform.Status.Phase == v1alpha1.IntegrationPlatformPhaseWarming
+func (action *warmAction) CanHandle(platform *v1.IntegrationPlatform) bool {
+ return platform.Status.Phase == v1.IntegrationPlatformPhaseWarming
}
-func (action *warmAction) Handle(ctx context.Context, platform *v1alpha1.IntegrationPlatform) (*v1alpha1.IntegrationPlatform, error) {
+func (action *warmAction) Handle(ctx context.Context, platform *v1.IntegrationPlatform) (*v1.IntegrationPlatform, error) {
// Check Kaniko warmer pod status
pod := corev1.Pod{
TypeMeta: metav1.TypeMeta{
@@ -66,7 +66,7 @@ func (action *warmAction) Handle(ctx context.Context, platform *v1alpha1.Integra
switch pod.Status.Phase {
case corev1.PodSucceeded:
action.L.Info("Kaniko cache successfully warmed up")
- platform.Status.Phase = v1alpha1.IntegrationPlatformPhaseCreating
+ platform.Status.Phase = v1.IntegrationPlatformPhaseCreating
return platform, nil
case corev1.PodFailed:
return nil, errors.New("failed to warm up Kaniko cache")
diff --git a/pkg/controller/integrationplatform/warm_test.go b/pkg/controller/integrationplatform/warm_test.go
index cdaaaa9..ab2b325 100644
--- a/pkg/controller/integrationplatform/warm_test.go
+++ b/pkg/controller/integrationplatform/warm_test.go
@@ -25,7 +25,7 @@ import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/util/log"
"github.com/apache/camel-k/pkg/util/test"
"github.com/rs/xid"
@@ -33,11 +33,11 @@ import (
)
func TestWarm_Succeeded(t *testing.T) {
- ip := v1alpha1.IntegrationPlatform{}
+ ip := v1.IntegrationPlatform{}
ip.Namespace = "ns"
ip.Name = xid.New().String()
- ip.Spec.Cluster = v1alpha1.IntegrationPlatformClusterOpenShift
- ip.Spec.Profile = v1alpha1.TraitProfileOpenShift
+ ip.Spec.Cluster = v1.IntegrationPlatformClusterOpenShift
+ ip.Spec.Profile = v1.TraitProfileOpenShift
pod := corev1.Pod{
TypeMeta: metav1.TypeMeta{
@@ -68,11 +68,11 @@ func TestWarm_Succeeded(t *testing.T) {
}
func TestWarm_Failing(t *testing.T) {
- ip := v1alpha1.IntegrationPlatform{}
+ ip := v1.IntegrationPlatform{}
ip.Namespace = "ns"
ip.Name = xid.New().String()
- ip.Spec.Cluster = v1alpha1.IntegrationPlatformClusterOpenShift
- ip.Spec.Profile = v1alpha1.TraitProfileOpenShift
+ ip.Spec.Cluster = v1.IntegrationPlatformClusterOpenShift
+ ip.Spec.Profile = v1.TraitProfileOpenShift
pod := corev1.Pod{
TypeMeta: metav1.TypeMeta{
@@ -103,11 +103,11 @@ func TestWarm_Failing(t *testing.T) {
}
func TestWarm_WarmingUp(t *testing.T) {
- ip := v1alpha1.IntegrationPlatform{}
+ ip := v1.IntegrationPlatform{}
ip.Namespace = "ns"
ip.Name = xid.New().String()
- ip.Spec.Cluster = v1alpha1.IntegrationPlatformClusterOpenShift
- ip.Spec.Profile = v1alpha1.TraitProfileOpenShift
+ ip.Spec.Cluster = v1.IntegrationPlatformClusterOpenShift
+ ip.Spec.Profile = v1.TraitProfileOpenShift
pod := corev1.Pod{
TypeMeta: metav1.TypeMeta{
diff --git a/pkg/install/cluster.go b/pkg/install/cluster.go
index b2ea5c7..6ec81cb 100644
--- a/pkg/install/cluster.go
+++ b/pkg/install/cluster.go
@@ -145,7 +145,7 @@ func AreAllCRDInstalled(ctx context.Context, c client.Client) (bool, error) {
// IsCRDInstalled check if the given CRD kind is installed
func IsCRDInstalled(ctx context.Context, c client.Client, kind string) (bool, error) {
- lst, err := c.Discovery().ServerResourcesForGroupVersion("camel.apache.org/v1alpha1")
+ lst, err := c.Discovery().ServerResourcesForGroupVersion("camel.apache.org/v1")
if err != nil && k8serrors.IsNotFound(err) {
return false, nil
} else if err != nil {
diff --git a/pkg/install/common.go b/pkg/install/common.go
index f07f279..479dd50 100644
--- a/pkg/install/common.go
+++ b/pkg/install/common.go
@@ -22,7 +22,7 @@ import (
"strings"
"github.com/apache/camel-k/deploy"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/client"
"github.com/apache/camel-k/pkg/util/kubernetes"
"github.com/apache/camel-k/pkg/util/openshift"
@@ -95,16 +95,16 @@ func RuntimeObjectOrCollect(ctx context.Context, c client.Client, namespace stri
return nil
}
// Don't recreate integration kits, platforms, etc
- if obj.GetObjectKind().GroupVersionKind().Kind == v1alpha1.IntegrationKindKind {
+ if obj.GetObjectKind().GroupVersionKind().Kind == v1.IntegrationKindKind {
return nil
}
- if obj.GetObjectKind().GroupVersionKind().Kind == v1alpha1.IntegrationPlatformKind {
+ if obj.GetObjectKind().GroupVersionKind().Kind == v1.IntegrationPlatformKind {
return nil
}
- if obj.GetObjectKind().GroupVersionKind().Kind == v1alpha1.CamelCatalogKind {
+ if obj.GetObjectKind().GroupVersionKind().Kind == v1.CamelCatalogKind {
return nil
}
- if obj.GetObjectKind().GroupVersionKind().Kind == v1alpha1.BuildKind {
+ if obj.GetObjectKind().GroupVersionKind().Kind == v1.BuildKind {
return nil
}
if obj.GetObjectKind().GroupVersionKind().Kind == "PersistentVolumeClaim" {
@@ -119,7 +119,7 @@ func isOpenShift(c kube.Interface, clusterType string) (bool, error) {
var res bool
var err error
if clusterType != "" {
- res = strings.EqualFold(clusterType, string(v1alpha1.IntegrationPlatformClusterOpenShift))
+ res = strings.EqualFold(clusterType, string(v1.IntegrationPlatformClusterOpenShift))
} else {
res, err = openshift.IsOpenShift(c)
if err != nil {
diff --git a/pkg/install/operator.go b/pkg/install/operator.go
index 0d401ed..ad49517 100644
--- a/pkg/install/operator.go
+++ b/pkg/install/operator.go
@@ -22,13 +22,13 @@ import (
"errors"
"strings"
- v1 "k8s.io/api/apps/v1"
+ appsv1 "k8s.io/api/apps/v1"
"k8s.io/api/rbac/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"github.com/apache/camel-k/deploy"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/client"
"github.com/apache/camel-k/pkg/util/envvar"
"github.com/apache/camel-k/pkg/util/knative"
@@ -53,7 +53,7 @@ func Operator(ctx context.Context, c client.Client, cfg OperatorConfiguration) e
func OperatorOrCollect(ctx context.Context, c client.Client, cfg OperatorConfiguration, collection *kubernetes.Collection) error {
customizer := func(o runtime.Object) runtime.Object {
if cfg.CustomImage != "" {
- if d, ok := o.(*v1.Deployment); ok {
+ if d, ok := o.(*appsv1.Deployment); ok {
if d.Labels["camel.apache.org/component"] == "operator" {
d.Spec.Template.Spec.Containers[0].Image = cfg.CustomImage
}
@@ -61,7 +61,7 @@ func OperatorOrCollect(ctx context.Context, c client.Client, cfg OperatorConfigu
}
if cfg.Global {
- if d, ok := o.(*v1.Deployment); ok {
+ if d, ok := o.(*appsv1.Deployment); ok {
if d.Labels["camel.apache.org/component"] == "operator" {
// Make the operator watch all namespaces
envvar.SetVal(&d.Spec.Template.Spec.Containers[0].Env, "WATCH_NAMESPACE", "")
@@ -154,13 +154,13 @@ func installKnative(ctx context.Context, c client.Client, namespace string, cust
// Platform installs the platform custom resource
// nolint: lll
-func Platform(ctx context.Context, c client.Client, clusterType string, namespace string, registry v1alpha1.IntegrationPlatformRegistrySpec) (*v1alpha1.IntegrationPlatform, error) {
+func Platform(ctx context.Context, c client.Client, clusterType string, namespace string, registry v1.IntegrationPlatformRegistrySpec) (*v1.IntegrationPlatform, error) {
return PlatformOrCollect(ctx, c, clusterType, namespace, registry, nil)
}
// PlatformOrCollect --
// nolint: lll
-func PlatformOrCollect(ctx context.Context, c client.Client, clusterType string, namespace string, registry v1alpha1.IntegrationPlatformRegistrySpec, collection *kubernetes.Collection) (*v1alpha1.IntegrationPlatform, error) {
+func PlatformOrCollect(ctx context.Context, c client.Client, clusterType string, namespace string, registry v1.IntegrationPlatformRegistrySpec, collection *kubernetes.Collection) (*v1.IntegrationPlatform, error) {
isOpenshift, err := isOpenShift(c, clusterType)
if err != nil {
return nil, err
@@ -169,7 +169,7 @@ func PlatformOrCollect(ctx context.Context, c client.Client, clusterType string,
if err != nil {
return nil, err
}
- pl := platformObject.(*v1alpha1.IntegrationPlatform)
+ pl := platformObject.(*v1.IntegrationPlatform)
if !isOpenshift {
pl.Spec.Build.Registry = registry
diff --git a/pkg/metadata/http.go b/pkg/metadata/http.go
index c600340..57eed47 100644
--- a/pkg/metadata/http.go
+++ b/pkg/metadata/http.go
@@ -23,14 +23,14 @@ import (
"github.com/apache/camel-k/pkg/util/camel"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
)
var restIndicator = regexp.MustCompile(`.*rest\s*\([^)]*\).*`)
var xmlRestIndicator = regexp.MustCompile(`.*<\s*rest\s+[^>]*>.*`)
// requiresHTTPService returns true if the integration needs to expose itself through HTTP
-func requiresHTTPService(catalog *camel.RuntimeCatalog, source v1alpha1.SourceSpec, fromURIs []string) bool {
+func requiresHTTPService(catalog *camel.RuntimeCatalog, source v1.SourceSpec, fromURIs []string) bool {
if hasRestIndicator(source) {
return true
}
@@ -38,9 +38,9 @@ func requiresHTTPService(catalog *camel.RuntimeCatalog, source v1alpha1.SourceSp
}
// hasOnlyPassiveEndpoints returns true if the integration has no endpoint that needs to remain always active
-func hasOnlyPassiveEndpoints(catalog *camel.RuntimeCatalog, _ v1alpha1.SourceSpec, fromURIs []string) bool {
+func hasOnlyPassiveEndpoints(catalog *camel.RuntimeCatalog, _ v1.SourceSpec, fromURIs []string) bool {
passivePlusHTTP := make(map[string]bool)
- catalog.VisitSchemes(func(id string, scheme v1alpha1.CamelScheme) bool {
+ catalog.VisitSchemes(func(id string, scheme v1.CamelScheme) bool {
if scheme.HTTP || scheme.Passive {
passivePlusHTTP[id] = true
}
@@ -87,14 +87,14 @@ func getURIPrefix(uri string) string {
return ""
}
-func hasRestIndicator(source v1alpha1.SourceSpec) bool {
+func hasRestIndicator(source v1.SourceSpec) bool {
pat := getRestIndicatorRegexpsForLanguage(source.InferLanguage())
return pat.MatchString(source.Content)
}
-func getRestIndicatorRegexpsForLanguage(language v1alpha1.Language) *regexp.Regexp {
+func getRestIndicatorRegexpsForLanguage(language v1.Language) *regexp.Regexp {
switch language {
- case v1alpha1.LanguageXML:
+ case v1.LanguageXML:
return xmlRestIndicator
default:
return restIndicator
diff --git a/pkg/metadata/metadata.go b/pkg/metadata/metadata.go
index dd73921..3ffb27f 100644
--- a/pkg/metadata/metadata.go
+++ b/pkg/metadata/metadata.go
@@ -20,7 +20,7 @@ package metadata
import (
"github.com/scylladb/go-set/strset"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/gzip"
"github.com/apache/camel-k/pkg/util/camel"
"github.com/apache/camel-k/pkg/util/log"
@@ -29,7 +29,7 @@ import (
)
// ExtractAll returns metadata information from all listed source codes
-func ExtractAll(catalog *camel.RuntimeCatalog, sources []v1alpha1.SourceSpec) IntegrationMetadata {
+func ExtractAll(catalog *camel.RuntimeCatalog, sources []v1.SourceSpec) IntegrationMetadata {
// neutral metadata
meta := NewIntegrationMetadata()
meta.PassiveEndpoints = true
@@ -64,7 +64,7 @@ func merge(m1 IntegrationMetadata, m2 IntegrationMetadata) IntegrationMetadata {
}
// Extract returns metadata information from the source code
-func Extract(catalog *camel.RuntimeCatalog, source v1alpha1.SourceSpec) IntegrationMetadata {
+func Extract(catalog *camel.RuntimeCatalog, source v1.SourceSpec) IntegrationMetadata {
var err error
source, err = uncompress(source)
if err != nil {
@@ -85,7 +85,7 @@ func Extract(catalog *camel.RuntimeCatalog, source v1alpha1.SourceSpec) Integrat
}
// Each --
-func Each(catalog *camel.RuntimeCatalog, sources []v1alpha1.SourceSpec, consumer func(int, IntegrationMetadata) bool) {
+func Each(catalog *camel.RuntimeCatalog, sources []v1.SourceSpec, consumer func(int, IntegrationMetadata) bool) {
for i, s := range sources {
meta := Extract(catalog, s)
@@ -95,7 +95,7 @@ func Each(catalog *camel.RuntimeCatalog, sources []v1alpha1.SourceSpec, consumer
}
}
-func uncompress(spec v1alpha1.SourceSpec) (v1alpha1.SourceSpec, error) {
+func uncompress(spec v1.SourceSpec) (v1.SourceSpec, error) {
if spec.Compression {
data := []byte(spec.Content)
var uncompressed []byte
diff --git a/pkg/metadata/metadata_dependencies_test.go b/pkg/metadata/metadata_dependencies_test.go
index 381ce1e..c1d660c 100644
--- a/pkg/metadata/metadata_dependencies_test.go
+++ b/pkg/metadata/metadata_dependencies_test.go
@@ -22,13 +22,13 @@ import (
"github.com/stretchr/testify/assert"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/util/camel"
)
func TestDependenciesJavaSource(t *testing.T) {
- code := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ code := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "Request.java",
Content: `
from("telegram:bots/cippa").to("log:stash");
@@ -38,7 +38,7 @@ func TestDependenciesJavaSource(t *testing.T) {
+ "?delay={{twitterDelayMs}}");
`,
},
- Language: v1alpha1.LanguageJavaSource,
+ Language: v1.LanguageJavaSource,
}
catalog, err := camel.DefaultCatalog()
@@ -50,8 +50,8 @@ func TestDependenciesJavaSource(t *testing.T) {
}
func TestDependenciesJavaScript(t *testing.T) {
- code := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ code := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "source.js",
Content: `
from('telegram:bots/cippa').to("log:stash");
@@ -60,7 +60,7 @@ func TestDependenciesJavaScript(t *testing.T) {
'"'
`,
},
- Language: v1alpha1.LanguageJavaScript,
+ Language: v1.LanguageJavaScript,
}
catalog, err := camel.DefaultCatalog()
@@ -72,8 +72,8 @@ func TestDependenciesJavaScript(t *testing.T) {
}
func TestDependenciesGroovy(t *testing.T) {
- code := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ code := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "source.groovy",
Content: `
from('telegram:bots/cippa').to("log:stash");
@@ -84,7 +84,7 @@ func TestDependenciesGroovy(t *testing.T) {
'"
`,
},
- Language: v1alpha1.LanguageGroovy,
+ Language: v1.LanguageGroovy,
}
catalog, err := camel.DefaultCatalog()
@@ -96,8 +96,8 @@ func TestDependenciesGroovy(t *testing.T) {
}
func TestDependencies(t *testing.T) {
- code := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ code := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "Request.java",
Content: `
from("http:test").to("log:end");
@@ -105,7 +105,7 @@ func TestDependencies(t *testing.T) {
from("twitter-timeline:test").to("mock:end");
`,
},
- Language: v1alpha1.LanguageJavaSource,
+ Language: v1.LanguageJavaSource,
}
catalog, err := camel.DefaultCatalog()
@@ -117,8 +117,8 @@ func TestDependencies(t *testing.T) {
}
func TestDependenciesQuarkus(t *testing.T) {
- code := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ code := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "Request.java",
Content: `
from("http:test").to("log:end");
@@ -126,7 +126,7 @@ func TestDependenciesQuarkus(t *testing.T) {
from("twitter-timeline:test").to("mock:end");
`,
},
- Language: v1alpha1.LanguageJavaSource,
+ Language: v1.LanguageJavaSource,
}
catalog, err := camel.QuarkusCatalog()
@@ -144,14 +144,14 @@ func TestDependenciesQuarkus(t *testing.T) {
}
func TestJacksonDependency(t *testing.T) {
- code := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ code := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "Request.java",
Content: `
from("http:test").unmarshal().json(JsonLibrary.Jackson).to("log:end");
`,
},
- Language: v1alpha1.LanguageJavaSource,
+ Language: v1.LanguageJavaSource,
}
catalog, err := camel.DefaultCatalog()
@@ -163,8 +163,8 @@ func TestJacksonDependency(t *testing.T) {
}
func TestJacksonImplicitDependency(t *testing.T) {
- code := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ code := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "Request.groovy",
Content: `
from("http:test")
@@ -172,7 +172,7 @@ func TestJacksonImplicitDependency(t *testing.T) {
.to("log:end")
`,
},
- Language: v1alpha1.LanguageGroovy,
+ Language: v1.LanguageGroovy,
}
catalog, err := camel.DefaultCatalog()
@@ -184,8 +184,8 @@ func TestJacksonImplicitDependency(t *testing.T) {
}
func TestLanguageDependencies(t *testing.T) {
- code := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ code := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "Languages.java",
Content: `
from("direct:start")
@@ -199,7 +199,7 @@ func TestLanguageDependencies(t *testing.T) {
.split().xtokenize("/ns:foo/bar", new Namespaces("ns", "http://foo/bar"));
`,
},
- Language: v1alpha1.LanguageJavaSource,
+ Language: v1.LanguageJavaSource,
}
catalog, err := camel.DefaultCatalog()
@@ -211,8 +211,8 @@ func TestLanguageDependencies(t *testing.T) {
}
func TestLanguageDependenciesTransformExpression(t *testing.T) {
- code := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ code := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "Languages.java",
Content: `
from("direct:start")
@@ -222,7 +222,7 @@ func TestLanguageDependenciesTransformExpression(t *testing.T) {
.transform(jsonpath("$.foo"))
`,
},
- Language: v1alpha1.LanguageJavaSource,
+ Language: v1.LanguageJavaSource,
}
catalog, err := camel.DefaultCatalog()
@@ -233,8 +233,8 @@ func TestLanguageDependenciesTransformExpression(t *testing.T) {
}
func TestHystrixDependency(t *testing.T) {
- code := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ code := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "Request.groovy",
Content: `
from("http:test")
@@ -244,7 +244,7 @@ func TestHystrixDependency(t *testing.T) {
.to("log:fallback")
`,
},
- Language: v1alpha1.LanguageGroovy,
+ Language: v1.LanguageGroovy,
}
catalog, err := camel.DefaultCatalog()
@@ -256,8 +256,8 @@ func TestHystrixDependency(t *testing.T) {
}
func TestRestDependency(t *testing.T) {
- code := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ code := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "Request.groovy",
Content: `
rest()
@@ -267,7 +267,7 @@ func TestRestDependency(t *testing.T) {
.to("log:info")
`,
},
- Language: v1alpha1.LanguageGroovy,
+ Language: v1.LanguageGroovy,
}
catalog, err := camel.DefaultCatalog()
@@ -279,8 +279,8 @@ func TestRestDependency(t *testing.T) {
}
func TestRestWithPathDependency(t *testing.T) {
- code := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ code := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "Request.groovy",
Content: `
rest("/test")
@@ -290,7 +290,7 @@ func TestRestWithPathDependency(t *testing.T) {
.to("log:info")
`,
},
- Language: v1alpha1.LanguageGroovy,
+ Language: v1.LanguageGroovy,
}
catalog, err := camel.DefaultCatalog()
@@ -302,8 +302,8 @@ func TestRestWithPathDependency(t *testing.T) {
}
func TestRestConfigurationDependency(t *testing.T) {
- code := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ code := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "Request.groovy",
Content: `
restConfiguration()
@@ -312,7 +312,7 @@ func TestRestConfigurationDependency(t *testing.T) {
.to("log:info")
`,
},
- Language: v1alpha1.LanguageGroovy,
+ Language: v1.LanguageGroovy,
}
catalog, err := camel.DefaultCatalog()
@@ -324,8 +324,8 @@ func TestRestConfigurationDependency(t *testing.T) {
}
func TestRestClosureDependency(t *testing.T) {
- code := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ code := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "Request.groovy",
Content: `
rest {
@@ -334,7 +334,7 @@ func TestRestClosureDependency(t *testing.T) {
.to("log:info")
`,
},
- Language: v1alpha1.LanguageGroovy,
+ Language: v1.LanguageGroovy,
}
catalog, err := camel.DefaultCatalog()
@@ -346,9 +346,9 @@ func TestRestClosureDependency(t *testing.T) {
}
func TestXMLHystrixDependency(t *testing.T) {
- code := v1alpha1.SourceSpec{
+ code := v1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ DataSpec: v1.DataSpec{
Name: "routes.xml",
Content: `
<from uri="direct:ciao" />
@@ -360,7 +360,7 @@ func TestXMLHystrixDependency(t *testing.T) {
</circuitBreaker>
`,
},
- Language: v1alpha1.LanguageXML,
+ Language: v1.LanguageXML,
}
catalog, err := camel.DefaultCatalog()
@@ -372,9 +372,9 @@ func TestXMLHystrixDependency(t *testing.T) {
}
func TestXMLRestDependency(t *testing.T) {
- code := v1alpha1.SourceSpec{
+ code := v1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ DataSpec: v1.DataSpec{
Name: "routes.xml",
Content: `
<rest path="/say">
@@ -390,7 +390,7 @@ func TestXMLRestDependency(t *testing.T) {
</rest>
`,
},
- Language: v1alpha1.LanguageXML,
+ Language: v1.LanguageXML,
}
catalog, err := camel.DefaultCatalog()
@@ -402,8 +402,8 @@ func TestXMLRestDependency(t *testing.T) {
}
func TestXMLLanguageDependencies(t *testing.T) {
- code := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ code := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "routes.xml",
Content: `
<from uri="direct:start" />
@@ -439,7 +439,7 @@ func TestXMLLanguageDependencies(t *testing.T) {
</split>
`,
},
- Language: v1alpha1.LanguageXML,
+ Language: v1.LanguageXML,
}
catalog, err := camel.DefaultCatalog()
@@ -492,13 +492,13 @@ const yamlWithLanguages = `
`
func TestYAMLRestDependency(t *testing.T) {
- code := v1alpha1.SourceSpec{
+ code := v1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ DataSpec: v1.DataSpec{
Name: "routes.yaml",
Content: yamlWithRest,
},
- Language: v1alpha1.LanguageYaml,
+ Language: v1.LanguageYaml,
}
catalog, err := camel.DefaultCatalog()
@@ -510,13 +510,13 @@ func TestYAMLRestDependency(t *testing.T) {
}
func TestYAMLHystrixDependency(t *testing.T) {
- code := v1alpha1.SourceSpec{
+ code := v1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ DataSpec: v1.DataSpec{
Name: "routes.yaml",
Content: yamlWithCircuitBreaker,
},
- Language: v1alpha1.LanguageYaml,
+ Language: v1.LanguageYaml,
}
catalog, err := camel.DefaultCatalog()
@@ -528,12 +528,12 @@ func TestYAMLHystrixDependency(t *testing.T) {
}
func TestYAMLLanguageDependencies(t *testing.T) {
- code := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ code := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "routes.yaml",
Content: yamlWithLanguages,
},
- Language: v1alpha1.LanguageYaml,
+ Language: v1.LanguageYaml,
}
catalog, err := camel.DefaultCatalog()
diff --git a/pkg/metadata/metadata_http_test.go b/pkg/metadata/metadata_http_test.go
index 2bbaa3d..2a74622 100644
--- a/pkg/metadata/metadata_http_test.go
+++ b/pkg/metadata/metadata_http_test.go
@@ -22,13 +22,13 @@ import (
"github.com/stretchr/testify/assert"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/util/camel"
)
func TestHttpJavaSource(t *testing.T) {
- code := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ code := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "Request.java",
Content: `
from("telegram:bots/cippa").to("log:stash");
@@ -36,7 +36,7 @@ func TestHttpJavaSource(t *testing.T) {
from("ine:xistent").to("log:stash");
`,
},
- Language: v1alpha1.LanguageJavaSource,
+ Language: v1.LanguageJavaSource,
}
catalog, err := camel.DefaultCatalog()
@@ -49,9 +49,9 @@ func TestHttpJavaSource(t *testing.T) {
}
func TestHttpOnlyJavaSource(t *testing.T) {
- code := v1alpha1.SourceSpec{
+ code := v1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ DataSpec: v1.DataSpec{
Name: "Request.java",
Content: `
from("direct:bots/cippa").to("log:stash");
@@ -59,7 +59,7 @@ func TestHttpOnlyJavaSource(t *testing.T) {
from("seda:path").to("log:stash");
`,
},
- Language: v1alpha1.LanguageJavaSource,
+ Language: v1.LanguageJavaSource,
}
catalog, err := camel.DefaultCatalog()
@@ -72,15 +72,15 @@ func TestHttpOnlyJavaSource(t *testing.T) {
}
func TestHttpOnlyJavaSourceRest(t *testing.T) {
- code := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ code := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "Request.java",
Content: `
from("direct:bots/cippa").to("log:stash");
rest().get("").to("log:stash");
`,
},
- Language: v1alpha1.LanguageJavaSource,
+ Language: v1.LanguageJavaSource,
}
catalog, err := camel.DefaultCatalog()
@@ -93,15 +93,15 @@ func TestHttpOnlyJavaSourceRest(t *testing.T) {
}
func TestHttpOnlyJavaSourceRest2(t *testing.T) {
- code := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ code := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "Request.java",
Content: `
from("vm:bots/cippa").to("log:stash");
rest( ).get("").to("log:stash");
`,
},
- Language: v1alpha1.LanguageJavaSource,
+ Language: v1.LanguageJavaSource,
}
catalog, err := camel.DefaultCatalog()
@@ -114,8 +114,8 @@ func TestHttpOnlyJavaSourceRest2(t *testing.T) {
}
func TestNoHttpGroovySource(t *testing.T) {
- code := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ code := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "Request.groovy",
Content: `
from('direct:bots/cippa').to("log:stash");
@@ -123,7 +123,7 @@ func TestNoHttpGroovySource(t *testing.T) {
from('seda:path').to("log:stash");
`,
},
- Language: v1alpha1.LanguageGroovy,
+ Language: v1.LanguageGroovy,
}
catalog, err := camel.DefaultCatalog()
@@ -136,8 +136,8 @@ func TestNoHttpGroovySource(t *testing.T) {
}
func TestHttpOnlyGroovySource(t *testing.T) {
- code := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ code := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "Request.groovy",
Content: `
from('direct:bots/cippa').to("log:stash");
@@ -145,7 +145,7 @@ func TestHttpOnlyGroovySource(t *testing.T) {
from('seda:path').to("log:stash");
`,
},
- Language: v1alpha1.LanguageGroovy,
+ Language: v1.LanguageGroovy,
}
catalog, err := camel.DefaultCatalog()
@@ -158,8 +158,8 @@ func TestHttpOnlyGroovySource(t *testing.T) {
}
func TestHttpXMLSource(t *testing.T) {
- code := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ code := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "routes.xml",
Content: `
<from uri="telegram:ciao" />
@@ -167,7 +167,7 @@ func TestHttpXMLSource(t *testing.T) {
</rest>
`,
},
- Language: v1alpha1.LanguageXML,
+ Language: v1.LanguageXML,
}
catalog, err := camel.DefaultCatalog()
@@ -180,9 +180,9 @@ func TestHttpXMLSource(t *testing.T) {
}
func TestHttpOnlyXMLSource(t *testing.T) {
- code := v1alpha1.SourceSpec{
+ code := v1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ DataSpec: v1.DataSpec{
Name: "routes.xml",
Content: `
<from uri="direct:ciao" />
@@ -190,7 +190,7 @@ func TestHttpOnlyXMLSource(t *testing.T) {
</rest>
`,
},
- Language: v1alpha1.LanguageXML,
+ Language: v1.LanguageXML,
}
catalog, err := camel.DefaultCatalog()
@@ -203,9 +203,9 @@ func TestHttpOnlyXMLSource(t *testing.T) {
}
func TestMultilangHTTPOnlySource(t *testing.T) {
- codes := []v1alpha1.SourceSpec{
+ codes := []v1.SourceSpec{
{
- DataSpec: v1alpha1.DataSpec{
+ DataSpec: v1.DataSpec{
Name: "routes.xml",
Content: `
<from uri="direct:ciao" />
@@ -213,17 +213,17 @@ func TestMultilangHTTPOnlySource(t *testing.T) {
</rest>
`,
},
- Language: v1alpha1.LanguageXML,
+ Language: v1.LanguageXML,
},
{
- DataSpec: v1alpha1.DataSpec{
+ DataSpec: v1.DataSpec{
Name: "routes2.groovy",
Content: `
from('seda:in').to('seda:out')
`,
},
- Language: v1alpha1.LanguageGroovy,
+ Language: v1.LanguageGroovy,
},
}
@@ -237,10 +237,10 @@ func TestMultilangHTTPOnlySource(t *testing.T) {
}
func TestMultilangHTTPSource(t *testing.T) {
- codes := []v1alpha1.SourceSpec{
+ codes := []v1.SourceSpec{
{
- DataSpec: v1alpha1.DataSpec{
+ DataSpec: v1.DataSpec{
Name: "routes.xml",
Content: `
<from uri="direct:ciao" />
@@ -248,18 +248,18 @@ func TestMultilangHTTPSource(t *testing.T) {
</rest>
`,
},
- Language: v1alpha1.LanguageXML,
+ Language: v1.LanguageXML,
},
{
- DataSpec: v1alpha1.DataSpec{
+ DataSpec: v1.DataSpec{
Name: "routes2.groovy",
Content: `
from('seda:in').to('seda:out')
from('timer:tick').to('log:info')
`,
},
- Language: v1alpha1.LanguageGroovy,
+ Language: v1.LanguageGroovy,
},
}
diff --git a/pkg/metadata/metadata_uri_test.go b/pkg/metadata/metadata_uri_test.go
index 16c8e33..4e8c12d 100644
--- a/pkg/metadata/metadata_uri_test.go
+++ b/pkg/metadata/metadata_uri_test.go
@@ -22,13 +22,13 @@ import (
"github.com/stretchr/testify/assert"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/util/camel"
)
func TestJava1(t *testing.T) {
- source := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ source := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "test",
Content: `
import org.apache.camel.builder.RouteBuilder;
@@ -43,7 +43,7 @@ func TestJava1(t *testing.T) {
}
`,
},
- Language: v1alpha1.LanguageJavaSource,
+ Language: v1.LanguageJavaSource,
}
catalog, err := camel.DefaultCatalog()
@@ -58,8 +58,8 @@ func TestJava1(t *testing.T) {
}
func TestJava2(t *testing.T) {
- source := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ source := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "test",
Content: `
import org.apache.camel.builder.RouteBuilder;
@@ -80,7 +80,7 @@ func TestJava2(t *testing.T) {
}
`,
},
- Language: v1alpha1.LanguageJavaSource,
+ Language: v1.LanguageJavaSource,
}
catalog, err := camel.DefaultCatalog()
@@ -97,8 +97,8 @@ func TestJava2(t *testing.T) {
}
func TestGroovy1(t *testing.T) {
- source := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ source := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "test",
Content: `
@@ -112,7 +112,7 @@ func TestGroovy1(t *testing.T) {
.to('uri:3')
`,
},
- Language: v1alpha1.LanguageGroovy,
+ Language: v1.LanguageGroovy,
}
catalog, err := camel.DefaultCatalog()
@@ -130,8 +130,8 @@ func TestGroovy1(t *testing.T) {
}
func TestGroovy2(t *testing.T) {
- source := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ source := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "test",
Content: `
rest().get("/")
@@ -142,7 +142,7 @@ func TestGroovy2(t *testing.T) {
.toF( "f:%s", "2")
`,
},
- Language: v1alpha1.LanguageGroovy,
+ Language: v1.LanguageGroovy,
}
catalog, err := camel.DefaultCatalog()
@@ -160,8 +160,8 @@ func TestGroovy2(t *testing.T) {
}
func TestXml1(t *testing.T) {
- source := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ source := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "test",
Content: `
<routes>
@@ -177,7 +177,7 @@ func TestXml1(t *testing.T) {
</routes>
`,
},
- Language: v1alpha1.LanguageXML,
+ Language: v1.LanguageXML,
}
catalog, err := camel.DefaultCatalog()
@@ -194,8 +194,8 @@ func TestXml1(t *testing.T) {
}
func TestKotlin1(t *testing.T) {
- source := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ source := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "test",
Content: `
@@ -211,7 +211,7 @@ func TestKotlin1(t *testing.T) {
.toF("uri:%s", 5)
`,
},
- Language: v1alpha1.LanguageKotlin,
+ Language: v1.LanguageKotlin,
}
catalog, err := camel.DefaultCatalog()
@@ -231,8 +231,8 @@ func TestKotlin1(t *testing.T) {
}
func TestJavascript1(t *testing.T) {
- source := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ source := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "test",
Content: `
@@ -242,7 +242,7 @@ func TestJavascript1(t *testing.T) {
.toF("uri:%s", "3")
`,
},
- Language: v1alpha1.LanguageJavaScript,
+ Language: v1.LanguageJavaScript,
}
catalog, err := camel.DefaultCatalog()
@@ -273,12 +273,12 @@ const yaml = `
`
func TestJYaml(t *testing.T) {
- source := v1alpha1.SourceSpec{
- DataSpec: v1alpha1.DataSpec{
+ source := v1.SourceSpec{
+ DataSpec: v1.DataSpec{
Name: "test",
Content: yaml,
},
- Language: v1alpha1.LanguageYaml,
+ Language: v1.LanguageYaml,
}
catalog, err := camel.DefaultCatalog()
diff --git a/pkg/platform/defaults.go b/pkg/platform/defaults.go
index 6d6849e..067336e 100644
--- a/pkg/platform/defaults.go
+++ b/pkg/platform/defaults.go
@@ -22,7 +22,7 @@ import (
"fmt"
"time"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/client"
"github.com/apache/camel-k/pkg/util/defaults"
"github.com/apache/camel-k/pkg/util/log"
@@ -30,12 +30,12 @@ import (
"github.com/apache/camel-k/pkg/util/openshift"
corev1 "k8s.io/api/core/v1"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// ConfigureDefaults fills with default values all missing details about the integration platform.
// Defaults are set in the status->appliedConfiguration fields, not in the spec.
-func ConfigureDefaults(ctx context.Context, c client.Client, p *v1alpha1.IntegrationPlatform, verbose bool) error {
+func ConfigureDefaults(ctx context.Context, c client.Client, p *v1.IntegrationPlatform, verbose bool) error {
// Reset the state to initial values
p.ResyncStatusFullConfig()
@@ -47,17 +47,17 @@ func ConfigureDefaults(ctx context.Context, c client.Client, p *v1alpha1.Integra
case err != nil:
return err
case isOpenShift:
- p.Status.Cluster = v1alpha1.IntegrationPlatformClusterOpenShift
+ p.Status.Cluster = v1.IntegrationPlatformClusterOpenShift
default:
- p.Status.Cluster = v1alpha1.IntegrationPlatformClusterKubernetes
+ p.Status.Cluster = v1.IntegrationPlatformClusterKubernetes
}
}
if p.Status.Build.PublishStrategy == "" {
- if p.Status.Cluster == v1alpha1.IntegrationPlatformClusterOpenShift {
- p.Status.Build.PublishStrategy = v1alpha1.IntegrationPlatformBuildPublishStrategyS2I
+ if p.Status.Cluster == v1.IntegrationPlatformClusterOpenShift {
+ p.Status.Build.PublishStrategy = v1.IntegrationPlatformBuildPublishStrategyS2I
} else {
- p.Status.Build.PublishStrategy = v1alpha1.IntegrationPlatformBuildPublishStrategyKaniko
+ p.Status.Build.PublishStrategy = v1.IntegrationPlatformBuildPublishStrategyKaniko
}
}
@@ -65,13 +65,13 @@ func ConfigureDefaults(ctx context.Context, c client.Client, p *v1alpha1.Integra
// If the operator is global, a global build strategy should be used
if IsCurrentOperatorGlobal() {
// The only global strategy we have for now
- p.Status.Build.BuildStrategy = v1alpha1.IntegrationPlatformBuildStrategyPod
+ p.Status.Build.BuildStrategy = v1.IntegrationPlatformBuildStrategyPod
} else {
- if p.Status.Build.PublishStrategy == v1alpha1.IntegrationPlatformBuildPublishStrategyKaniko {
+ if p.Status.Build.PublishStrategy == v1.IntegrationPlatformBuildPublishStrategyKaniko {
// The build output has to be shared with Kaniko via a persistent volume
- p.Status.Build.BuildStrategy = v1alpha1.IntegrationPlatformBuildStrategyPod
+ p.Status.Build.BuildStrategy = v1.IntegrationPlatformBuildStrategyPod
} else {
- p.Status.Build.BuildStrategy = v1alpha1.IntegrationPlatformBuildStrategyRoutine
+ p.Status.Build.BuildStrategy = v1.IntegrationPlatformBuildStrategyRoutine
}
}
}
@@ -81,7 +81,7 @@ func ConfigureDefaults(ctx context.Context, c client.Client, p *v1alpha1.Integra
return err
}
- if verbose && p.Status.Build.PublishStrategy == v1alpha1.IntegrationPlatformBuildPublishStrategyKaniko && p.Status.Build.Registry.Address == "" {
+ if verbose && p.Status.Build.PublishStrategy == v1.IntegrationPlatformBuildPublishStrategyKaniko && p.Status.Build.Registry.Address == "" {
log.Log.Info("No registry specified for publishing images")
}
@@ -92,7 +92,7 @@ func ConfigureDefaults(ctx context.Context, c client.Client, p *v1alpha1.Integra
return nil
}
-func setPlatformDefaults(ctx context.Context, c client.Client, p *v1alpha1.IntegrationPlatform, verbose bool) error {
+func setPlatformDefaults(ctx context.Context, c client.Client, p *v1.IntegrationPlatform, verbose bool) error {
if p.Status.Build.CamelVersion == "" {
p.Status.Build.CamelVersion = defaults.DefaultCamelVersion
}
@@ -116,12 +116,12 @@ func setPlatformDefaults(ctx context.Context, c client.Client, p *v1alpha1.Integ
log.Log.Infof("Build timeout minimum unit is sec (configured: %s, truncated: %s)", p.Status.Build.GetTimeout().Duration, d)
}
- p.Status.Build.Timeout = &v1.Duration{
+ p.Status.Build.Timeout = &metav1.Duration{
Duration: d,
}
}
if p.Status.Build.GetTimeout().Duration == 0 {
- p.Status.Build.Timeout = &v1.Duration{
+ p.Status.Build.Timeout = &metav1.Duration{
Duration: 5 * time.Minute,
}
}
@@ -133,13 +133,13 @@ func setPlatformDefaults(ctx context.Context, c client.Client, p *v1alpha1.Integ
log.Log.Infof("Maven timeout minimum unit is sec (configured: %s, truncated: %s)", p.Status.Build.Maven.GetTimeout().Duration, d)
}
- p.Status.Build.Maven.Timeout = &v1.Duration{
+ p.Status.Build.Maven.Timeout = &metav1.Duration{
Duration: d,
}
}
if p.Status.Build.Maven.GetTimeout().Duration == 0 {
n := p.Status.Build.GetTimeout().Duration.Seconds() * 0.75
- p.Status.Build.Maven.Timeout = &v1.Duration{
+ p.Status.Build.Maven.Timeout = &metav1.Duration{
Duration: (time.Duration(n) * time.Second).Truncate(time.Second),
}
}
@@ -171,7 +171,7 @@ func setPlatformDefaults(ctx context.Context, c client.Client, p *v1alpha1.Integ
}
}
- if p.Status.Build.PublishStrategy == v1alpha1.IntegrationPlatformBuildPublishStrategyKaniko && p.Status.Build.KanikoBuildCache == nil {
+ if p.Status.Build.PublishStrategy == v1.IntegrationPlatformBuildPublishStrategyKaniko && p.Status.Build.KanikoBuildCache == nil {
// Default to disabling Kaniko cache warmer
// Using the cache warmer pod seems unreliable with the current Kaniko version
// and requires relying on a persistent volume.
@@ -194,7 +194,7 @@ func setPlatformDefaults(ctx context.Context, c client.Client, p *v1alpha1.Integ
return nil
}
-func createDefaultMavenSettingsConfigMap(ctx context.Context, client client.Client, p *v1alpha1.IntegrationPlatform, settings maven.Settings) error {
+func createDefaultMavenSettingsConfigMap(ctx context.Context, client client.Client, p *v1.IntegrationPlatform, settings maven.Settings) error {
cm, err := maven.CreateSettingsConfigMap(p.Namespace, p.Name, settings)
if err != nil {
return err
diff --git a/pkg/platform/platform.go b/pkg/platform/platform.go
index deb855a..e13f14a 100644
--- a/pkg/platform/platform.go
+++ b/pkg/platform/platform.go
@@ -20,7 +20,7 @@ package platform
import (
"context"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/util/kubernetes"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
k8sclient "sigs.k8s.io/controller-runtime/pkg/client"
@@ -32,7 +32,7 @@ const (
)
// GetOrLookupCurrent --
-func GetOrLookupCurrent(ctx context.Context, c k8sclient.Reader, namespace string, name string) (*v1alpha1.IntegrationPlatform, error) {
+func GetOrLookupCurrent(ctx context.Context, c k8sclient.Reader, namespace string, name string) (*v1.IntegrationPlatform, error) {
if name != "" {
return Get(ctx, c, namespace, name)
}
@@ -41,7 +41,7 @@ func GetOrLookupCurrent(ctx context.Context, c k8sclient.Reader, namespace strin
}
// GetOrLookupAny returns the named platform or any other platform in the namespace
-func GetOrLookupAny(ctx context.Context, c k8sclient.Reader, namespace string, name string) (*v1alpha1.IntegrationPlatform, error) {
+func GetOrLookupAny(ctx context.Context, c k8sclient.Reader, namespace string, name string) (*v1.IntegrationPlatform, error) {
if name != "" {
return Get(ctx, c, namespace, name)
}
@@ -50,17 +50,17 @@ func GetOrLookupAny(ctx context.Context, c k8sclient.Reader, namespace string, n
}
// Get returns the currently installed platform
-func Get(ctx context.Context, c k8sclient.Reader, namespace string, name string) (*v1alpha1.IntegrationPlatform, error) {
+func Get(ctx context.Context, c k8sclient.Reader, namespace string, name string) (*v1.IntegrationPlatform, error) {
return kubernetes.GetIntegrationPlatform(ctx, c, name, namespace)
}
// GetCurrentPlatform returns the currently installed platform
-func GetCurrentPlatform(ctx context.Context, c k8sclient.Reader, namespace string) (*v1alpha1.IntegrationPlatform, error) {
+func GetCurrentPlatform(ctx context.Context, c k8sclient.Reader, namespace string) (*v1.IntegrationPlatform, error) {
return getAnyPlatform(ctx, c, namespace, true)
}
// getAnyPlatform returns the currently installed platform or any platform existing in the namespace
-func getAnyPlatform(ctx context.Context, c k8sclient.Reader, namespace string, active bool) (*v1alpha1.IntegrationPlatform, error) {
+func getAnyPlatform(ctx context.Context, c k8sclient.Reader, namespace string, active bool) (*v1.IntegrationPlatform, error) {
lst, err := ListPlatforms(ctx, c, namespace)
if err != nil {
return nil, err
@@ -79,12 +79,12 @@ func getAnyPlatform(ctx context.Context, c k8sclient.Reader, namespace string, a
return &res, nil
}
- return nil, k8serrors.NewNotFound(v1alpha1.Resource("IntegrationPlatform"), DefaultPlatformName)
+ return nil, k8serrors.NewNotFound(v1.Resource("IntegrationPlatform"), DefaultPlatformName)
}
// ListPlatforms returns all platforms installed in a given namespace (only one will be active)
-func ListPlatforms(ctx context.Context, c k8sclient.Reader, namespace string) (*v1alpha1.IntegrationPlatformList, error) {
- lst := v1alpha1.NewIntegrationPlatformList()
+func ListPlatforms(ctx context.Context, c k8sclient.Reader, namespace string) (*v1.IntegrationPlatformList, error) {
+ lst := v1.NewIntegrationPlatformList()
if err := c.List(ctx, &lst, k8sclient.InNamespace(namespace)); err != nil {
return nil, err
}
@@ -92,31 +92,31 @@ func ListPlatforms(ctx context.Context, c k8sclient.Reader, namespace string) (*
}
// IsActive determines if the given platform is being used
-func IsActive(p *v1alpha1.IntegrationPlatform) bool {
- return p.Status.Phase != "" && p.Status.Phase != v1alpha1.IntegrationPlatformPhaseDuplicate
+func IsActive(p *v1.IntegrationPlatform) bool {
+ return p.Status.Phase != "" && p.Status.Phase != v1.IntegrationPlatformPhaseDuplicate
}
// GetProfile returns the current profile of the platform (if present) or returns the default one for the cluster
-func GetProfile(p *v1alpha1.IntegrationPlatform) v1alpha1.TraitProfile {
+func GetProfile(p *v1.IntegrationPlatform) v1.TraitProfile {
if p.Status.Profile != "" {
return p.Status.Profile
}
switch p.Status.Cluster {
- case v1alpha1.IntegrationPlatformClusterKubernetes:
- return v1alpha1.TraitProfileKubernetes
- case v1alpha1.IntegrationPlatformClusterOpenShift:
- return v1alpha1.TraitProfileOpenShift
+ case v1.IntegrationPlatformClusterKubernetes:
+ return v1.TraitProfileKubernetes
+ case v1.IntegrationPlatformClusterOpenShift:
+ return v1.TraitProfileOpenShift
}
return ""
}
// SupportsS2iPublishStrategy --
-func SupportsS2iPublishStrategy(p *v1alpha1.IntegrationPlatform) bool {
- return p.Status.Build.PublishStrategy == v1alpha1.IntegrationPlatformBuildPublishStrategyS2I
+func SupportsS2iPublishStrategy(p *v1.IntegrationPlatform) bool {
+ return p.Status.Build.PublishStrategy == v1.IntegrationPlatformBuildPublishStrategyS2I
}
// SupportsKanikoPublishStrategy --
-func SupportsKanikoPublishStrategy(p *v1alpha1.IntegrationPlatform) bool {
- return p.Status.Build.PublishStrategy == v1alpha1.IntegrationPlatformBuildPublishStrategyKaniko && p.Status.Build.Registry.Address != ""
+func SupportsKanikoPublishStrategy(p *v1.IntegrationPlatform) bool {
+ return p.Status.Build.PublishStrategy == v1.IntegrationPlatformBuildPublishStrategyKaniko && p.Status.Build.Registry.Address != ""
}
diff --git a/pkg/trait/affinity.go b/pkg/trait/affinity.go
index 1c921e4..b373ea8 100644
--- a/pkg/trait/affinity.go
+++ b/pkg/trait/affinity.go
@@ -26,7 +26,7 @@ import (
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/selection"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
)
// Allows to constrain which nodes the integration pod(s) are eligible to be scheduled on, based on labels on the node,
@@ -66,7 +66,7 @@ func (t *affinityTrait) Configure(e *Environment) (bool, error) {
return false, fmt.Errorf("both pod affinity and pod anti-affinity can't be set simultaneously")
}
- return e.IntegrationInPhase(v1alpha1.IntegrationPhaseDeploying, v1alpha1.IntegrationPhaseRunning), nil
+ return e.IntegrationInPhase(v1.IntegrationPhaseDeploying, v1.IntegrationPhaseRunning), nil
}
func (t *affinityTrait) Apply(e *Environment) (err error) {
diff --git a/pkg/trait/affinity_test.go b/pkg/trait/affinity_test.go
index 4aa7153..97bdabc 100644
--- a/pkg/trait/affinity_test.go
+++ b/pkg/trait/affinity_test.go
@@ -26,7 +26,7 @@ import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/util/kubernetes"
)
@@ -139,12 +139,12 @@ func createNominalAffinityTest() (*affinityTrait, *Environment, *appsv1.Deployme
}
environment := &Environment{
- Integration: &v1alpha1.Integration{
+ Integration: &v1.Integration{
ObjectMeta: metav1.ObjectMeta{
Name: "integration-name",
},
- Status: v1alpha1.IntegrationStatus{
- Phase: v1alpha1.IntegrationPhaseDeploying,
+ Status: v1.IntegrationStatus{
+ Phase: v1.IntegrationPhaseDeploying,
},
},
Resources: kubernetes.NewCollection(deployment),
diff --git a/pkg/trait/builder.go b/pkg/trait/builder.go
index e008c8f..cafdfe5 100644
--- a/pkg/trait/builder.go
+++ b/pkg/trait/builder.go
@@ -28,7 +28,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/builder"
"github.com/apache/camel-k/pkg/builder/kaniko"
"github.com/apache/camel-k/pkg/builder/runtime"
@@ -58,12 +58,12 @@ func (t *builderTrait) Configure(e *Environment) (bool, error) {
return false, nil
}
- return e.IntegrationKitInPhase(v1alpha1.IntegrationKitPhaseBuildSubmitted), nil
+ return e.IntegrationKitInPhase(v1.IntegrationKitPhaseBuildSubmitted), nil
}
func (t *builderTrait) Apply(e *Environment) error {
builderTask := t.builderTask(e)
- e.BuildTasks = append(e.BuildTasks, v1alpha1.Task{Builder: builderTask})
+ e.BuildTasks = append(e.BuildTasks, v1.Task{Builder: builderTask})
if platform.SupportsKanikoPublishStrategy(e.Platform) {
kanikoTask, err := t.kanikoTask(e)
@@ -139,7 +139,7 @@ func (t *builderTrait) Apply(e *Environment) error {
})
}
- e.BuildTasks = append(e.BuildTasks, v1alpha1.Task{Kaniko: kanikoTask})
+ e.BuildTasks = append(e.BuildTasks, v1.Task{Kaniko: kanikoTask})
}
return nil
@@ -155,9 +155,9 @@ func (t *builderTrait) InfluencesKit() bool {
return true
}
-func (t *builderTrait) builderTask(e *Environment) *v1alpha1.BuilderTask {
- task := &v1alpha1.BuilderTask{
- BaseTask: v1alpha1.BaseTask{
+func (t *builderTrait) builderTask(e *Environment) *v1.BuilderTask {
+ task := &v1.BuilderTask{
+ BaseTask: v1.BaseTask{
Name: "builder",
},
Meta: e.IntegrationKit.ObjectMeta,
@@ -194,7 +194,7 @@ func (t *builderTrait) builderTask(e *Environment) *v1alpha1.BuilderTask {
return task
}
-func (t *builderTrait) kanikoTask(e *Environment) (*v1alpha1.KanikoTask, error) {
+func (t *builderTrait) kanikoTask(e *Environment) (*v1.KanikoTask, error) {
organization := e.Platform.Status.Build.Registry.Organization
if organization == "" {
organization = e.Platform.Namespace
@@ -296,9 +296,9 @@ func (t *builderTrait) kanikoTask(e *Environment) (*v1alpha1.KanikoTask, error)
})
}
- return &v1alpha1.KanikoTask{
- ImageTask: v1alpha1.ImageTask{
- BaseTask: v1alpha1.BaseTask{
+ return &v1.KanikoTask{
+ ImageTask: v1.ImageTask{
+ BaseTask: v1.BaseTask{
Name: "kaniko",
Volumes: volumes,
VolumeMounts: volumeMounts,
diff --git a/pkg/trait/builder_test.go b/pkg/trait/builder_test.go
index ebe6f9f..1faf881 100644
--- a/pkg/trait/builder_test.go
+++ b/pkg/trait/builder_test.go
@@ -27,7 +27,7 @@ import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/builder/kaniko"
"github.com/apache/camel-k/pkg/builder/s2i"
"github.com/apache/camel-k/pkg/util/camel"
@@ -37,8 +37,8 @@ import (
func TestBuilderTraitNotAppliedBecauseOfNilKit(t *testing.T) {
environments := []*Environment{
- createBuilderTestEnv(v1alpha1.IntegrationPlatformClusterOpenShift, v1alpha1.IntegrationPlatformBuildPublishStrategyS2I),
- createBuilderTestEnv(v1alpha1.IntegrationPlatformClusterKubernetes, v1alpha1.IntegrationPlatformBuildPublishStrategyKaniko),
+ createBuilderTestEnv(v1.IntegrationPlatformClusterOpenShift, v1.IntegrationPlatformBuildPublishStrategyS2I),
+ createBuilderTestEnv(v1.IntegrationPlatformClusterKubernetes, v1.IntegrationPlatformBuildPublishStrategyKaniko),
}
for _, e := range environments {
@@ -58,13 +58,13 @@ func TestBuilderTraitNotAppliedBecauseOfNilKit(t *testing.T) {
func TestBuilderTraitNotAppliedBecauseOfNilPhase(t *testing.T) {
environments := []*Environment{
- createBuilderTestEnv(v1alpha1.IntegrationPlatformClusterOpenShift, v1alpha1.IntegrationPlatformBuildPublishStrategyS2I),
- createBuilderTestEnv(v1alpha1.IntegrationPlatformClusterKubernetes, v1alpha1.IntegrationPlatformBuildPublishStrategyKaniko),
+ createBuilderTestEnv(v1.IntegrationPlatformClusterOpenShift, v1.IntegrationPlatformBuildPublishStrategyS2I),
+ createBuilderTestEnv(v1.IntegrationPlatformClusterKubernetes, v1.IntegrationPlatformBuildPublishStrategyKaniko),
}
for _, e := range environments {
e := e // pin
- e.IntegrationKit.Status.Phase = v1alpha1.IntegrationKitPhaseInitialization
+ e.IntegrationKit.Status.Phase = v1.IntegrationKitPhaseInitialization
t.Run(string(e.Platform.Status.Cluster), func(t *testing.T) {
err := NewBuilderTestCatalog().apply(e)
@@ -78,7 +78,7 @@ func TestBuilderTraitNotAppliedBecauseOfNilPhase(t *testing.T) {
}
func TestS2IBuilderTrait(t *testing.T) {
- env := createBuilderTestEnv(v1alpha1.IntegrationPlatformClusterOpenShift, v1alpha1.IntegrationPlatformBuildPublishStrategyS2I)
+ env := createBuilderTestEnv(v1.IntegrationPlatformClusterOpenShift, v1.IntegrationPlatformBuildPublishStrategyS2I)
err := NewBuilderTestCatalog().apply(env)
assert.Nil(t, err)
@@ -99,7 +99,7 @@ func TestS2IBuilderTrait(t *testing.T) {
}
func TestKanikoBuilderTrait(t *testing.T) {
- env := createBuilderTestEnv(v1alpha1.IntegrationPlatformClusterKubernetes, v1alpha1.IntegrationPlatformBuildPublishStrategyKaniko)
+ env := createBuilderTestEnv(v1.IntegrationPlatformClusterKubernetes, v1.IntegrationPlatformBuildPublishStrategyKaniko)
err := NewBuilderTestCatalog().apply(env)
assert.Nil(t, err)
@@ -120,7 +120,7 @@ func TestKanikoBuilderTrait(t *testing.T) {
assert.NotNil(t, env.BuildTasks[1].Kaniko)
}
-func createBuilderTestEnv(cluster v1alpha1.IntegrationPlatformCluster, strategy v1alpha1.IntegrationPlatformBuildPublishStrategy) *Environment {
+func createBuilderTestEnv(cluster v1.IntegrationPlatformCluster, strategy v1.IntegrationPlatformBuildPublishStrategy) *Environment {
c, err := camel.DefaultCatalog()
if err != nil {
panic(err)
@@ -131,26 +131,26 @@ func createBuilderTestEnv(cluster v1alpha1.IntegrationPlatformCluster, strategy
C: context.TODO(),
CamelCatalog: c,
Catalog: NewCatalog(context.TODO(), nil),
- Integration: &v1alpha1.Integration{
+ Integration: &v1.Integration{
ObjectMeta: metav1.ObjectMeta{
Name: "test",
Namespace: "ns",
},
- Status: v1alpha1.IntegrationStatus{
- Phase: v1alpha1.IntegrationPhaseDeploying,
+ Status: v1.IntegrationStatus{
+ Phase: v1.IntegrationPhaseDeploying,
},
},
- IntegrationKit: &v1alpha1.IntegrationKit{
- Status: v1alpha1.IntegrationKitStatus{
- Phase: v1alpha1.IntegrationKitPhaseBuildSubmitted,
+ IntegrationKit: &v1.IntegrationKit{
+ Status: v1.IntegrationKitStatus{
+ Phase: v1.IntegrationKitPhaseBuildSubmitted,
},
},
- Platform: &v1alpha1.IntegrationPlatform{
- Spec: v1alpha1.IntegrationPlatformSpec{
+ Platform: &v1.IntegrationPlatform{
+ Spec: v1.IntegrationPlatformSpec{
Cluster: cluster,
- Build: v1alpha1.IntegrationPlatformBuildSpec{
+ Build: v1.IntegrationPlatformBuildSpec{
PublishStrategy: strategy,
- Registry: v1alpha1.IntegrationPlatformRegistrySpec{Address: "registry"},
+ Registry: v1.IntegrationPlatformRegistrySpec{Address: "registry"},
CamelVersion: defaults.DefaultCamelVersion,
KanikoBuildCache: &kanikoCache,
},
diff --git a/pkg/trait/camel.go b/pkg/trait/camel.go
index 9b5f2ee..37a31e4 100644
--- a/pkg/trait/camel.go
+++ b/pkg/trait/camel.go
@@ -25,7 +25,7 @@ import (
k8serrors "k8s.io/apimachinery/pkg/api/errors"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/util/camel"
)
@@ -113,7 +113,7 @@ func (t *camelTrait) loadOrCreateCatalog(e *Environment, camelVersion string, ru
// sanitize catalog name
catalogName := "camel-catalog-" + strings.ToLower(camelVersion+"-"+runtimeVersion)
- cx := v1alpha1.NewCamelCatalogWithSpecs(ns, catalogName, catalog.CamelCatalogSpec)
+ cx := v1.NewCamelCatalogWithSpecs(ns, catalogName, catalog.CamelCatalogSpec)
cx.Labels = make(map[string]string)
cx.Labels["app"] = "camel-k"
cx.Labels["camel.apache.org/catalog.version"] = camelVersion
diff --git a/pkg/trait/camel_test.go b/pkg/trait/camel_test.go
index 2b7c404..3514d94 100644
--- a/pkg/trait/camel_test.go
+++ b/pkg/trait/camel_test.go
@@ -23,7 +23,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/util/camel"
"github.com/apache/camel-k/pkg/util/test"
@@ -78,7 +78,7 @@ func createNominalCamelTest() (*camelTrait, *Environment) {
environment := &Environment{
CamelCatalog: &camel.RuntimeCatalog{
- CamelCatalogSpec: v1alpha1.CamelCatalogSpec{
+ CamelCatalogSpec: v1.CamelCatalogSpec{
Version: "1.23.0",
RuntimeVersion: "0.0.1",
},
@@ -86,16 +86,16 @@ func createNominalCamelTest() (*camelTrait, *Environment) {
Catalog: NewEnvironmentTestCatalog(),
C: context.TODO(),
Client: client,
- Integration: &v1alpha1.Integration{
+ Integration: &v1.Integration{
ObjectMeta: metav1.ObjectMeta{
Namespace: "namespace",
},
- Status: v1alpha1.IntegrationStatus{
+ Status: v1.IntegrationStatus{
CamelVersion: "1.23.0",
RuntimeVersion: "0.0.1",
},
},
- IntegrationKit: &v1alpha1.IntegrationKit{},
+ IntegrationKit: &v1.IntegrationKit{},
}
return trait, environment
diff --git a/pkg/trait/classpath.go b/pkg/trait/classpath.go
index 1a2a643..ee76d36 100644
--- a/pkg/trait/classpath.go
+++ b/pkg/trait/classpath.go
@@ -27,7 +27,7 @@ import (
k8sclient "sigs.k8s.io/controller-runtime/pkg/client"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/util/envvar"
)
@@ -49,8 +49,8 @@ func (t *classpathTrait) Configure(e *Environment) (bool, error) {
return false, nil
}
- return e.InPhase(v1alpha1.IntegrationKitPhaseReady, v1alpha1.IntegrationPhaseDeploying) ||
- e.InPhase(v1alpha1.IntegrationKitPhaseReady, v1alpha1.IntegrationPhaseRunning), nil
+ return e.InPhase(v1.IntegrationKitPhaseReady, v1.IntegrationPhaseDeploying) ||
+ e.InPhase(v1.IntegrationKitPhaseReady, v1.IntegrationPhaseRunning), nil
}
func (t *classpathTrait) Apply(e *Environment) error {
@@ -58,7 +58,7 @@ func (t *classpathTrait) Apply(e *Environment) error {
if kit == nil && e.Integration.Status.Kit != "" {
name := e.Integration.Status.Kit
- k := v1alpha1.NewIntegrationKit(e.Integration.Namespace, name)
+ k := v1.NewIntegrationKit(e.Integration.Namespace, name)
key := k8sclient.ObjectKey{
Namespace: e.Integration.Namespace,
Name: name,
@@ -91,7 +91,7 @@ func (t *classpathTrait) Apply(e *Environment) error {
}
}
- if kit.Labels["camel.apache.org/kit.type"] == v1alpha1.IntegrationKitTypeExternal {
+ if kit.Labels["camel.apache.org/kit.type"] == v1.IntegrationKitTypeExternal {
//
// In case of an external created kit, we do not have any information about
// the classpath so we assume the all jars in /deployments/dependencies/ have
diff --git a/pkg/trait/classpath_test.go b/pkg/trait/classpath_test.go
index 20d62dc..c214799 100644
--- a/pkg/trait/classpath_test.go
+++ b/pkg/trait/classpath_test.go
@@ -28,7 +28,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
serving "knative.dev/serving/pkg/apis/serving/v1"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/util/kubernetes"
"github.com/apache/camel-k/pkg/util/test"
@@ -46,7 +46,7 @@ func TestConfigureClasspathTraitInRightPhasesDoesSucceed(t *testing.T) {
func TestConfigureClasspathTraitInWrongIntegrationPhaseDoesNotSucceed(t *testing.T) {
trait, environment := createNominalClasspathTest()
- environment.Integration.Status.Phase = v1alpha1.IntegrationPhaseError
+ environment.Integration.Status.Phase = v1.IntegrationPhaseError
configured, err := trait.Configure(environment)
assert.Nil(t, err)
@@ -55,7 +55,7 @@ func TestConfigureClasspathTraitInWrongIntegrationPhaseDoesNotSucceed(t *testing
func TestConfigureClasspathTraitInWrongIntegrationKitPhaseDoesNotSucceed(t *testing.T) {
trait, environment := createNominalClasspathTest()
- environment.IntegrationKit.Status.Phase = v1alpha1.IntegrationKitPhaseWaitingForPlatform
+ environment.IntegrationKit.Status.Phase = v1.IntegrationKitPhaseWaitingForPlatform
configured, err := trait.Configure(environment)
assert.Nil(t, err)
@@ -84,7 +84,7 @@ func TestApplyClasspathTraitPlaftormIntegrationKitLazyInstantiation(t *testing.T
}
func TestApplyClasspathTraitExternalIntegrationKitLazyInstantiation(t *testing.T) {
- trait, environment := createClasspathTestWithKitType(v1alpha1.IntegrationKitTypeExternal)
+ trait, environment := createClasspathTestWithKitType(v1.IntegrationKitTypeExternal)
environment.IntegrationKit = nil
environment.Integration.Namespace = "kit-namespace"
environment.Integration.Status.Kit = "kit-name"
@@ -97,7 +97,7 @@ func TestApplyClasspathTraitExternalIntegrationKitLazyInstantiation(t *testing.T
func TestApplyClasspathTraitWithIntegrationKitStatusArtifact(t *testing.T) {
trait, environment := createNominalClasspathTest()
- environment.IntegrationKit.Status.Artifacts = []v1alpha1.Artifact{{ID: "", Location: "", Target: "/dep/target"}}
+ environment.IntegrationKit.Status.Artifacts = []v1.Artifact{{ID: "", Location: "", Target: "/dep/target"}}
err := trait.Apply(environment)
@@ -185,16 +185,16 @@ func TestApplyClasspathTraitWithNominalIntegrationKit(t *testing.T) {
}
func createNominalClasspathTest() (*classpathTrait, *Environment) {
- return createClasspathTestWithKitType(v1alpha1.IntegrationKitTypePlatform)
+ return createClasspathTestWithKitType(v1.IntegrationKitTypePlatform)
}
func createClasspathTestWithKitType(kitType string) (*classpathTrait, *Environment) {
client, _ := test.NewFakeClient(
- &v1alpha1.IntegrationKit{
+ &v1.IntegrationKit{
TypeMeta: metav1.TypeMeta{
- APIVersion: v1alpha1.SchemeGroupVersion.String(),
- Kind: v1alpha1.IntegrationKindKind,
+ APIVersion: v1.SchemeGroupVersion.String(),
+ Kind: v1.IntegrationKindKind,
},
ObjectMeta: metav1.ObjectMeta{
Namespace: "kit-namespace",
@@ -214,14 +214,14 @@ func createClasspathTestWithKitType(kitType string) (*classpathTrait, *Environme
environment := &Environment{
Catalog: NewCatalog(context.TODO(), nil),
- Integration: &v1alpha1.Integration{
- Status: v1alpha1.IntegrationStatus{
- Phase: v1alpha1.IntegrationPhaseDeploying,
+ Integration: &v1.Integration{
+ Status: v1.IntegrationStatus{
+ Phase: v1.IntegrationPhaseDeploying,
},
},
- IntegrationKit: &v1alpha1.IntegrationKit{
- Status: v1alpha1.IntegrationKitStatus{
- Phase: v1alpha1.IntegrationKitPhaseReady,
+ IntegrationKit: &v1.IntegrationKit{
+ Status: v1.IntegrationKitStatus{
+ Phase: v1.IntegrationKitPhaseReady,
},
},
Resources: kubernetes.NewCollection(),
diff --git a/pkg/trait/container.go b/pkg/trait/container.go
index 558e109..2bc6ba3 100644
--- a/pkg/trait/container.go
+++ b/pkg/trait/container.go
@@ -21,7 +21,7 @@ import (
"fmt"
"strings"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/util/envvar"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
@@ -82,7 +82,7 @@ func (t *containerTrait) Configure(e *Environment) (bool, error) {
return false, nil
}
- if !e.IntegrationInPhase(v1alpha1.IntegrationPhaseDeploying, v1alpha1.IntegrationPhaseRunning) {
+ if !e.IntegrationInPhase(v1.IntegrationPhaseDeploying, v1.IntegrationPhaseRunning) {
return false, nil
}
@@ -189,9 +189,9 @@ func (t *containerTrait) configureService(e *Environment) {
}
e.Integration.Status.SetCondition(
- v1alpha1.IntegrationConditionServiceAvailable,
+ v1.IntegrationConditionServiceAvailable,
corev1.ConditionTrue,
- v1alpha1.IntegrationConditionServiceAvailableReason,
+ v1.IntegrationConditionServiceAvailableReason,
// service -> container
fmt.Sprintf("%s(%s/%d) -> %s(%s/%d)",
@@ -203,7 +203,7 @@ func (t *containerTrait) configureService(e *Environment) {
service.Spec.Ports = append(service.Spec.Ports, servicePort)
// Mark the service as a user service
- service.Labels["camel.apache.org/service.type"] = v1alpha1.ServiceTypeUser
+ service.Labels["camel.apache.org/service.type"] = v1.ServiceTypeUser
}
func (t *containerTrait) configureResources(_ *Environment, container *corev1.Container) {
diff --git a/pkg/trait/container_test.go b/pkg/trait/container_test.go
index f66c0c8..9e86f71 100644
--- a/pkg/trait/container_test.go
+++ b/pkg/trait/container_test.go
@@ -27,7 +27,7 @@ import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/util/camel"
"github.com/apache/camel-k/pkg/util/kubernetes"
)
@@ -41,29 +41,29 @@ func TestContainerWithDefaults(t *testing.T) {
environment := Environment{
CamelCatalog: catalog,
Catalog: traitCatalog,
- Integration: &v1alpha1.Integration{
+ Integration: &v1.Integration{
ObjectMeta: metav1.ObjectMeta{
Name: ServiceTestName,
Namespace: "ns",
},
- Status: v1alpha1.IntegrationStatus{
- Phase: v1alpha1.IntegrationPhaseDeploying,
+ Status: v1.IntegrationStatus{
+ Phase: v1.IntegrationPhaseDeploying,
},
- Spec: v1alpha1.IntegrationSpec{
- Profile: v1alpha1.TraitProfileKubernetes,
+ Spec: v1.IntegrationSpec{
+ Profile: v1.TraitProfileKubernetes,
},
},
- IntegrationKit: &v1alpha1.IntegrationKit{
- Status: v1alpha1.IntegrationKitStatus{
- Phase: v1alpha1.IntegrationKitPhaseReady,
+ IntegrationKit: &v1.IntegrationKit{
+ Status: v1.IntegrationKitStatus{
+ Phase: v1.IntegrationKitPhaseReady,
},
},
- Platform: &v1alpha1.IntegrationPlatform{
- Spec: v1alpha1.IntegrationPlatformSpec{
- Cluster: v1alpha1.IntegrationPlatformClusterOpenShift,
- Build: v1alpha1.IntegrationPlatformBuildSpec{
- PublishStrategy: v1alpha1.IntegrationPlatformBuildPublishStrategyS2I,
- Registry: v1alpha1.IntegrationPlatformRegistrySpec{Address: "registry"},
+ Platform: &v1.IntegrationPlatform{
+ Spec: v1.IntegrationPlatformSpec{
+ Cluster: v1.IntegrationPlatformClusterOpenShift,
+ Build: v1.IntegrationPlatformBuildSpec{
+ PublishStrategy: v1.IntegrationPlatformBuildPublishStrategyS2I,
+ Registry: v1.IntegrationPlatformRegistrySpec{Address: "registry"},
},
},
},
@@ -97,17 +97,17 @@ func TestContainerWithCustomName(t *testing.T) {
environment := Environment{
CamelCatalog: catalog,
Catalog: traitCatalog,
- Integration: &v1alpha1.Integration{
+ Integration: &v1.Integration{
ObjectMeta: metav1.ObjectMeta{
Name: ServiceTestName,
Namespace: "ns",
},
- Status: v1alpha1.IntegrationStatus{
- Phase: v1alpha1.IntegrationPhaseDeploying,
+ Status: v1.IntegrationStatus{
+ Phase: v1.IntegrationPhaseDeploying,
},
- Spec: v1alpha1.IntegrationSpec{
- Profile: v1alpha1.TraitProfileKubernetes,
- Traits: map[string]v1alpha1.TraitSpec{
+ Spec: v1.IntegrationSpec{
+ Profile: v1.TraitProfileKubernetes,
+ Traits: map[string]v1.TraitSpec{
"container": {
Configuration: map[string]string{
"name": "my-container-name",
@@ -116,17 +116,17 @@ func TestContainerWithCustomName(t *testing.T) {
},
},
},
- IntegrationKit: &v1alpha1.IntegrationKit{
- Status: v1alpha1.IntegrationKitStatus{
- Phase: v1alpha1.IntegrationKitPhaseReady,
+ IntegrationKit: &v1.IntegrationKit{
+ Status: v1.IntegrationKitStatus{
+ Phase: v1.IntegrationKitPhaseReady,
},
},
- Platform: &v1alpha1.IntegrationPlatform{
- Spec: v1alpha1.IntegrationPlatformSpec{
- Cluster: v1alpha1.IntegrationPlatformClusterOpenShift,
- Build: v1alpha1.IntegrationPlatformBuildSpec{
- PublishStrategy: v1alpha1.IntegrationPlatformBuildPublishStrategyS2I,
- Registry: v1alpha1.IntegrationPlatformRegistrySpec{Address: "registry"},
+ Platform: &v1.IntegrationPlatform{
+ Spec: v1.IntegrationPlatformSpec{
+ Cluster: v1.IntegrationPlatformClusterOpenShift,
+ Build: v1.IntegrationPlatformBuildSpec{
+ PublishStrategy: v1.IntegrationPlatformBuildPublishStrategyS2I,
+ Registry: v1.IntegrationPlatformRegistrySpec{Address: "registry"},
},
},
},
diff --git a/pkg/trait/debug.go b/pkg/trait/debug.go
index d9d30bf..87ad9c7 100644
--- a/pkg/trait/debug.go
+++ b/pkg/trait/debug.go
@@ -18,7 +18,7 @@ limitations under the License.
package trait
import (
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/util/envvar"
)
@@ -40,7 +40,7 @@ func newDebugTrait() *debugTrait {
func (t *debugTrait) Configure(e *Environment) (bool, error) {
if t.Enabled != nil && *t.Enabled {
- return e.IntegrationInPhase(v1alpha1.IntegrationPhaseDeploying, v1alpha1.IntegrationPhaseRunning), nil
+ return e.IntegrationInPhase(v1.IntegrationPhaseDeploying, v1.IntegrationPhaseRunning), nil
}
return false, nil
diff --git a/pkg/trait/debug_test.go b/pkg/trait/debug_test.go
index 4968b1f..16b401e 100644
--- a/pkg/trait/debug_test.go
+++ b/pkg/trait/debug_test.go
@@ -24,7 +24,7 @@ import (
corev1 "k8s.io/api/core/v1"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/util/camel"
"github.com/apache/camel-k/pkg/util/envvar"
)
@@ -35,12 +35,12 @@ func TestDebugTraitApplicability(t *testing.T) {
env := Environment{
CamelCatalog: catalog,
- Integration: &v1alpha1.Integration{
- Status: v1alpha1.IntegrationStatus{
- Phase: v1alpha1.IntegrationPhaseDeploying,
+ Integration: &v1.Integration{
+ Status: v1.IntegrationStatus{
+ Phase: v1.IntegrationPhaseDeploying,
},
- Spec: v1alpha1.IntegrationSpec{
- Traits: map[string]v1alpha1.TraitSpec{
+ Spec: v1.IntegrationSpec{
+ Traits: map[string]v1.TraitSpec{
"debug": {
Configuration: map[string]string{
"enabled": "true",
@@ -58,7 +58,7 @@ func TestDebugTraitApplicability(t *testing.T) {
assert.Nil(t, err)
assert.False(t, enabled)
- env.Integration.Status.Phase = v1alpha1.IntegrationPhaseRunning
+ env.Integration.Status.Phase = v1.IntegrationPhaseRunning
enabled, err = trait.Configure(&env)
assert.Nil(t, err)
@@ -67,12 +67,12 @@ func TestDebugTraitApplicability(t *testing.T) {
func TestApplyDebugTrait(t *testing.T) {
environment := Environment{
- Integration: &v1alpha1.Integration{
- Status: v1alpha1.IntegrationStatus{
- Phase: v1alpha1.IntegrationPhaseDeploying,
+ Integration: &v1.Integration{
+ Status: v1.IntegrationStatus{
+ Phase: v1.IntegrationPhaseDeploying,
},
- Spec: v1alpha1.IntegrationSpec{
- Traits: map[string]v1alpha1.TraitSpec{
+ Spec: v1.IntegrationSpec{
+ Traits: map[string]v1.TraitSpec{
"debug": {
Configuration: map[string]string{
"enabled": "true",
diff --git a/pkg/trait/dependencies.go b/pkg/trait/dependencies.go
index 1fb7fdc..4781d4e 100644
--- a/pkg/trait/dependencies.go
+++ b/pkg/trait/dependencies.go
@@ -21,7 +21,7 @@ import (
"sort"
"strings"
- "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
+ "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/metadata"
"github.com/apache/camel-k/pkg/util"
)
@@ -45,7 +45,7 @@ func (t *dependenciesTrait) Configure(e *Environment) (bool, error) {
return false, nil
}
- return e.IntegrationInPhase(v1alpha1.IntegrationPhaseInitialization), nil
+ return e.IntegrationInPhase(v1.IntegrationPhaseInitialization), nil
}
func (t *dependenciesTrait) Apply(e *Environment) error {
@@ -86,17 +86,17 @@ func addDefaultRuntimeDependencies(e *Environment) {
meta := metadata.Extract(e.CamelCatalog, s)
switch s.InferLanguage() {
- case v1alpha1.LanguageGroovy:
+ case v1.LanguageGroovy:
util.StringSliceUniqueAdd(dependencies, "mvn:org.apache.camel.k/camel-k-loader-groovy")
- case v1alpha1.LanguageKotlin:
+ case v1.LanguageKotlin:
util.StringSliceUniqueAdd(dependencies, "mvn:org.apache.camel.k/camel-k-loader-kotlin")
- case v1alpha1.LanguageYaml:
+ case v1.LanguageYaml:
util.StringSliceUniqueAdd(dependencies, "mvn:org.apache.camel.k/camel-k-loader-yaml")
- case v1alpha1.LanguageXML:
+ case v1.LanguageXML:
util.StringSliceUniqueAdd(dependencies, "mvn:org.apache.camel.k/camel-k-loader-xml")
- case v1alpha1.LanguageJavaScript:
+ case v1.LanguageJavaScript:
util.StringSliceUniqueAdd(dependencies, "mvn:org.apache.camel.k/camel-k-loader-js")
- case v1alpha1.LanguageJavaSource:
+ case v1.LanguageJavaSource:
util.StringSliceUniqueAdd(dependencies, "mvn:org.apache.camel.k/camel-k-loader-java")
}
diff --git a/pkg/trait/dependencies_test.go b/pkg/trait/dependencies_test.go
index fe3bed8..be67117 100644
--- a/pkg/trait/dependencies_test.go
+++ b/pkg/trait/dependencies_test.go
@@ -22,14 +22,14 @@ import (
... 4327 lines suppressed ...