You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pc...@apache.org on 2023/04/26 08:51:17 UTC
[camel-k] 01/18: feat: change KameletBinding name to Binding
This is an automated email from the ASF dual-hosted git repository.
pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit bff24b7603af2fd94d7fa779cc4daa99a44e554e
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Thu Mar 23 18:02:28 2023 +0100
feat: change KameletBinding name to Binding
Closes #2625
---
.../kamel-cleanup/clean-orphan-resources.sh | 2 +-
PROJECT | 2 +-
addons/keda/keda.go | 6 +-
addons/keda/keda_test.go | 16 +-
addons/strimzi/strimzi.go | 2 +-
...indings.yaml => camel.apache.org_bindings.yaml} | 24 +-
config/crd/kustomization.yaml | 2 +-
.../bases/camel-k.clusterserviceversion.yaml | 10 +-
config/rbac/openshift/operator-role-openshift.yaml | 2 +-
config/rbac/operator-role.yaml | 6 +-
config/rbac/user-cluster-role.yaml | 6 +-
config/samples/bases/camel_v1_kameletbinding.yaml | 2 +-
config/samples/kustomization.yaml | 2 +-
.../kamelets/kameletbindings-error-handler.adoc | 36 +-
docs/modules/ROOT/pages/kamelets/kamelets-dev.adoc | 26 +-
.../modules/ROOT/pages/kamelets/kamelets-user.adoc | 36 +-
docs/modules/ROOT/pages/kamelets/kamelets.adoc | 2 +-
docs/modules/ROOT/pages/running/knative-sink.adoc | 4 +-
docs/modules/ROOT/pages/scaling/binding.adoc | 24 +-
.../ROOT/pages/troubleshooting/debugging.adoc | 4 +-
docs/modules/ROOT/partials/apis/crds-html.adoc | 154 +++----
docs/modules/ROOT/partials/apis/kamelets-crds.adoc | 444 ++++++++++-----------
e2e/common/misc/kamelet_binding_test.go | 22 +-
e2e/common/misc/scale_binding_test.go | 38 +-
e2e/common/traits/errored_trait_test.go | 12 +-
e2e/common/traits/health_test.go | 4 +-
.../operator_id_filtering_test.go | 4 +-
e2e/commonwithcustominstall/promote_test.go | 4 +-
e2e/install/kustomize/common.go | 2 +-
e2e/knative/kamelet_test.go | 22 +-
e2e/support/test_support.go | 60 +--
e2e/yaks/common/kamelet-beans/kamelet.feature | 4 +-
.../kamelet-autoload-specific.feature | 10 +-
.../kamelet-autoload.feature | 8 +-
.../common/kamelet-binding-broker/kamelet.feature | 2 +-
.../logger-sink-binding.yaml | 2 +-
.../timer-source-binding.yaml | 2 +-
.../common/kamelet-binding-broker/yaks-config.yaml | 4 +-
.../timer-source-binding-display.yaml | 2 +-
.../common/kamelet-binding-http/yaks-config.yaml | 2 +-
.../properties-binding.yaml | 2 +-
.../properties.feature | 2 +-
e2e/yaks/common/kamelet-binding/kamelet.feature | 2 +-
.../kamelet-binding/logger-sink-binding.yaml | 2 +-
.../kamelet-binding/timer-source-binding.yaml | 2 +-
e2e/yaks/common/kamelet-binding/yaks-config.yaml | 4 +-
.../common/kamelet-data-types/event-binding.yaml | 2 +-
.../kamelet-data-types/kamelet-data-types.feature | 4 +-
.../common/kamelet-data-types/timer-to-log.yaml | 2 +-
.../kamelet-no-properties/kamelet-no-props.feature | 4 +-
.../common/kamelet-steps/steps-binding.feature | 2 +-
e2e/yaks/common/kamelet-steps/steps-binding.yaml | 2 +-
e2e/yaks/common/kamelet-steps/yaks-config.yaml | 2 +-
.../camel-k/crds/crd-binding.yaml | 24 +-
helm/camel-k/crds/crd-kamelet-binding.yaml | 24 +-
helm/camel-k/templates/operator-cluster-roles.yaml | 14 +-
helm/camel-k/templates/operator-role.yaml | 8 +-
.../{kamelet_binding_types.go => binding_types.go} | 82 ++--
...g_types_support.go => binding_types_support.go} | 46 +--
...pport_test.go => binding_types_support_test.go} | 0
pkg/apis/camel/v1alpha1/register.go | 4 +-
pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go | 298 +++++++-------
.../v1alpha1/{kameletbinding.go => binding.go} | 52 +--
...eletbindingcondition.go => bindingcondition.go} | 26 +-
.../{kameletbindingspec.go => bindingspec.go} | 24 +-
.../{kameletbindingstatus.go => bindingstatus.go} | 30 +-
pkg/client/camel/applyconfiguration/utils.go | 16 +-
.../versioned/typed/camel/v1alpha1/binding.go | 290 ++++++++++++++
.../versioned/typed/camel/v1alpha1/camel_client.go | 10 +-
.../typed/camel/v1alpha1/fake/fake_binding.go | 214 ++++++++++
.../typed/camel/v1alpha1/fake/fake_camel_client.go | 8 +-
.../camel/v1alpha1/fake/fake_kameletbinding.go | 214 ----------
.../typed/camel/v1alpha1/generated_expansion.go | 4 +-
.../typed/camel/v1alpha1/kameletbinding.go | 290 --------------
.../v1alpha1/{kameletbinding.go => binding.go} | 38 +-
.../externalversions/camel/v1alpha1/interface.go | 14 +-
.../camel/informers/externalversions/generic.go | 4 +-
pkg/client/camel/listers/camel/v1alpha1/binding.go | 100 +++++
.../listers/camel/v1alpha1/expansion_generated.go | 16 +-
.../camel/listers/camel/v1alpha1/kameletbinding.go | 100 -----
pkg/cmd/bind.go | 14 +-
pkg/cmd/bind_test.go | 14 +-
pkg/cmd/delete.go | 14 +-
pkg/cmd/promote.go | 38 +-
pkg/cmd/promote_test.go | 12 +-
pkg/cmd/reset.go | 18 +-
pkg/controller/add_kameletbinding.go | 4 +-
.../{kameletbinding => binding}/action.go | 8 +-
.../binding_controller.go} | 62 +--
.../{kameletbinding => binding}/error_handler.go | 2 +-
.../error_handler_test.go | 2 +-
.../{kameletbinding => binding}/initialize.go | 36 +-
.../{kameletbinding => binding}/integration.go | 50 +--
pkg/controller/{kameletbinding => binding}/log.go | 4 +-
.../{kameletbinding => binding}/monitor.go | 78 ++--
pkg/event/manager.go | 28 +-
pkg/install/cluster.go | 10 +-
pkg/resources/resources.go | 49 ++-
pkg/resources/resources_test.go | 2 +-
pkg/trait/util.go | 14 +-
pkg/trait/util_test.go | 58 +--
pkg/util/bindings/catalog.go | 2 +-
pkg/util/bindings/kamelet.go | 14 +-
pkg/util/bindings/kamelet_test.go | 8 +-
pkg/util/log/log.go | 4 +-
script/gen_crd.sh | 2 +-
script/prepare-operators.sh | 4 +-
107 files changed, 1783 insertions(+), 1766 deletions(-)
diff --git a/.github/actions/kamel-cleanup/clean-orphan-resources.sh b/.github/actions/kamel-cleanup/clean-orphan-resources.sh
index 13c82c5c1..2b1239990 100755
--- a/.github/actions/kamel-cleanup/clean-orphan-resources.sh
+++ b/.github/actions/kamel-cleanup/clean-orphan-resources.sh
@@ -2,7 +2,7 @@
set +e
-resourcetypes="integrations integrationkits integrationplatforms camelcatalogs kamelets builds kameletbindings"
+resourcetypes="integrations integrationkits integrationplatforms camelcatalogs kamelets builds bindings"
#
# Loop through the resource types
diff --git a/PROJECT b/PROJECT
index 349993f64..9173437e1 100644
--- a/PROJECT
+++ b/PROJECT
@@ -19,7 +19,7 @@ resources:
kind: Integration
version: v1
- group: camel
- kind: KameletBinding
+ kind: Binding
version: v1alpha1
- group: camel
kind: Kamelet
diff --git a/addons/keda/keda.go b/addons/keda/keda.go
index f85fb1359..e597ce0e0 100644
--- a/addons/keda/keda.go
+++ b/addons/keda/keda.go
@@ -279,9 +279,9 @@ func (t *kedaTrait) hackControllerReplicas(e *trait.Environment) error {
if err != nil {
return err
}
- if ctrlRef.Kind == camelv1alpha1.KameletBindingKind {
+ if ctrlRef.Kind == camelv1alpha1.BindingKind {
scale.ObjectMeta.Name = ctrlRef.Name
- _, err = scalesClient.Scales(e.Integration.Namespace).Update(e.Ctx, camelv1alpha1.SchemeGroupVersion.WithResource("kameletbindings").GroupResource(), &scale, metav1.UpdateOptions{})
+ _, err = scalesClient.Scales(e.Integration.Namespace).Update(e.Ctx, camelv1alpha1.SchemeGroupVersion.WithResource("bindings").GroupResource(), &scale, metav1.UpdateOptions{})
if err != nil {
return err
}
@@ -297,7 +297,7 @@ func (t *kedaTrait) hackControllerReplicas(e *trait.Environment) error {
func (t *kedaTrait) getTopControllerReference(e *trait.Environment) *v1.ObjectReference {
for _, o := range e.Integration.OwnerReferences {
- if o.Kind == camelv1alpha1.KameletBindingKind && strings.HasPrefix(o.APIVersion, camelv1alpha1.SchemeGroupVersion.Group) {
+ if o.Kind == camelv1alpha1.BindingKind && strings.HasPrefix(o.APIVersion, camelv1alpha1.SchemeGroupVersion.Group) {
return &v1.ObjectReference{
APIVersion: o.APIVersion,
Kind: o.Kind,
diff --git a/addons/keda/keda_test.go b/addons/keda/keda_test.go
index fdfa721d9..9c64b3f1b 100644
--- a/addons/keda/keda_test.go
+++ b/addons/keda/keda_test.go
@@ -25,7 +25,7 @@ import (
"github.com/apache/camel-k/v2/addons/keda/duck/v1alpha1"
camelv1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
camelv1alpha1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1alpha1"
- "github.com/apache/camel-k/v2/pkg/controller/kameletbinding"
+ "github.com/apache/camel-k/v2/pkg/controller/binding"
"github.com/apache/camel-k/v2/pkg/trait"
"github.com/apache/camel-k/v2/pkg/util/camel"
"github.com/apache/camel-k/v2/pkg/util/kubernetes"
@@ -203,16 +203,16 @@ func TestKameletAutoDetection(t *testing.T) {
assert.Contains(t, secret.StringData, "cc")
}
-func TestKameletBindingAutoDetection(t *testing.T) {
+func TestBindingAutoDetection(t *testing.T) {
keda, _ := NewKedaTrait().(*kedaTrait)
keda.Enabled = pointer.Bool(true)
logEndpoint := "log:info"
- klb := camelv1alpha1.KameletBinding{
+ klb := camelv1alpha1.Binding{
ObjectMeta: metav1.ObjectMeta{
Namespace: "test",
Name: "my-binding",
},
- Spec: camelv1alpha1.KameletBindingSpec{
+ Spec: camelv1alpha1.BindingSpec{
Source: camelv1alpha1.Endpoint{
Ref: &corev1.ObjectReference{
Kind: "Kamelet",
@@ -277,7 +277,7 @@ func TestKameletBindingAutoDetection(t *testing.T) {
},
})
- it, err := kameletbinding.CreateIntegrationFor(env.Ctx, env.Client, &klb)
+ it, err := binding.CreateIntegrationFor(env.Ctx, env.Client, &klb)
assert.NoError(t, err)
assert.NotNil(t, it)
env.Integration = it
@@ -362,7 +362,7 @@ func TestHackKLBReplicas(t *testing.T) {
})
keda.HackControllerReplicas = pointer.Bool(true)
env := createBasicTestEnvironment(
- &camelv1alpha1.KameletBinding{
+ &camelv1alpha1.Binding{
ObjectMeta: metav1.ObjectMeta{
Namespace: "test",
Name: "my-klb",
@@ -375,7 +375,7 @@ func TestHackKLBReplicas(t *testing.T) {
OwnerReferences: []metav1.OwnerReference{
{
APIVersion: camelv1alpha1.SchemeGroupVersion.String(),
- Kind: "KameletBinding",
+ Kind: "Binding",
Name: "my-klb",
},
},
@@ -392,7 +392,7 @@ func TestHackKLBReplicas(t *testing.T) {
assert.NoError(t, keda.Apply(env))
scalesClient, err := env.Client.ScalesClient()
assert.NoError(t, err)
- sc, err := scalesClient.Scales("test").Get(env.Ctx, camelv1alpha1.SchemeGroupVersion.WithResource("kameletbindings").GroupResource(), "my-klb", metav1.GetOptions{})
+ sc, err := scalesClient.Scales("test").Get(env.Ctx, camelv1alpha1.SchemeGroupVersion.WithResource("bindings").GroupResource(), "my-klb", metav1.GetOptions{})
assert.NoError(t, err)
assert.Equal(t, int32(1), sc.Spec.Replicas)
}
diff --git a/addons/strimzi/strimzi.go b/addons/strimzi/strimzi.go
index f414afa90..d10193f07 100644
--- a/addons/strimzi/strimzi.go
+++ b/addons/strimzi/strimzi.go
@@ -30,7 +30,7 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema"
)
-// BindingProvider allows to connect to a Kafka topic via KameletBinding.
+// BindingProvider allows to connect to a Kafka topic via Binding.
type BindingProvider struct {
Client internalclientset.Interface
}
diff --git a/config/crd/bases/camel.apache.org_kameletbindings.yaml b/config/crd/bases/camel.apache.org_bindings.yaml
similarity index 99%
copy from config/crd/bases/camel.apache.org_kameletbindings.yaml
copy to config/crd/bases/camel.apache.org_bindings.yaml
index bbec3c111..b1b019aa4 100644
--- a/config/crd/bases/camel.apache.org_kameletbindings.yaml
+++ b/config/crd/bases/camel.apache.org_bindings.yaml
@@ -23,23 +23,23 @@ metadata:
creationTimestamp: null
labels:
app: camel-k
- name: kameletbindings.camel.apache.org
+ name: bindings.camel.apache.org
spec:
group: camel.apache.org
names:
categories:
- kamel
- camel
- kind: KameletBinding
- listKind: KameletBindingList
- plural: kameletbindings
+ kind: Binding
+ listKind: BindingList
+ plural: bindings
shortNames:
- klb
- singular: kameletbinding
+ singular: binding
scope: Namespaced
versions:
- additionalPrinterColumns:
- - description: The Kamelet Binding phase
+ - description: TheBinding phase
jsonPath: .status.phase
name: Phase
type: string
@@ -50,7 +50,7 @@ spec:
name: v1alpha1
schema:
openAPIV3Schema:
- description: KameletBinding is the Schema for the kamelets binding API
+ description: Binding is the Schema for the kamelets binding API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
@@ -65,7 +65,7 @@ spec:
metadata:
type: object
spec:
- description: the specification of a KameletBinding
+ description: the specification of a Binding
properties:
errorHandler:
description: ErrorHandler is an optional handler called upon an error
@@ -8410,12 +8410,12 @@ spec:
type: array
type: object
status:
- description: the status of a KameletBinding
+ description: the status of a Binding
properties:
conditions:
description: Conditions --
items:
- description: KameletBindingCondition describes the state of a resource
+ description: BindingCondition describes the state of a resource
at a certain point.
properties:
lastTransitionTime:
@@ -8498,7 +8498,7 @@ spec:
description: Status of the condition, one of True, False, Unknown.
type: string
type:
- description: Type of kameletBinding condition.
+ description: Type of binding condition.
type: string
required:
- status
@@ -8507,7 +8507,7 @@ spec:
type: array
observedGeneration:
description: ObservedGeneration is the most recent generation observed
- for this KameletBinding.
+ for this Binding.
format: int64
type: integer
phase:
diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml
index d26003e2a..be191a381 100644
--- a/config/crd/kustomization.yaml
+++ b/config/crd/kustomization.yaml
@@ -23,5 +23,5 @@ resources:
- bases/camel.apache.org_integrationkits.yaml
- bases/camel.apache.org_integrationplatforms.yaml
- bases/camel.apache.org_integrations.yaml
-- bases/camel.apache.org_kameletbindings.yaml
+- bases/camel.apache.org_bindings.yaml
- bases/camel.apache.org_kamelets.yaml
diff --git a/config/manifests/bases/camel-k.clusterserviceversion.yaml b/config/manifests/bases/camel-k.clusterserviceversion.yaml
index 6d6cdaa0a..603cfacb1 100644
--- a/config/manifests/bases/camel-k.clusterserviceversion.yaml
+++ b/config/manifests/bases/camel-k.clusterserviceversion.yaml
@@ -23,7 +23,7 @@ metadata:
categories: Integration & Delivery
certified: "false"
containerImage: docker.io/apache/camel-k:2.0.0-SNAPSHOT
- createdAt: 2023-04-03T16:32:08Z
+ createdAt: 2023-03-24T09:36:48Z
description: Apache Camel K is a lightweight integration platform, born on Kubernetes,
with serverless superpowers.
operators.operatorframework.io/builder: operator-sdk-v1.16.0
@@ -63,10 +63,10 @@ spec:
kind: Integration
name: integrations.camel.apache.org
version: v1
- - description: KameletBinding is the Schema for the kamelets binding API
- displayName: Kamelet Binding
- kind: KameletBinding
- name: kameletbindings.camel.apache.org
+ - description: Binding is the Schema for the kamelets binding API
+ displayName: Binding
+ kind: Binding
+ name: bindings.camel.apache.org
version: v1alpha1
- description: Kamelet is the Schema for the kamelets API
displayName: Kamelet
diff --git a/config/rbac/openshift/operator-role-openshift.yaml b/config/rbac/openshift/operator-role-openshift.yaml
index bebcb5900..bf99bf1ad 100644
--- a/config/rbac/openshift/operator-role-openshift.yaml
+++ b/config/rbac/openshift/operator-role-openshift.yaml
@@ -29,7 +29,7 @@ rules:
- integrationkits/finalizers
- integrationplatforms/finalizers
- integrations/finalizers
- - kameletbindings/finalizers
+ - bindings/finalizers
verbs:
- update
- apiGroups:
diff --git a/config/rbac/operator-role.yaml b/config/rbac/operator-role.yaml
index 43bfaf3bb..0c9dc702d 100644
--- a/config/rbac/operator-role.yaml
+++ b/config/rbac/operator-role.yaml
@@ -30,7 +30,7 @@ rules:
- integrationkits
- integrationplatforms
- integrations
- - kameletbindings
+ - bindings
- kamelets
verbs:
- create
@@ -54,8 +54,8 @@ rules:
- integrationplatforms/status
- integrations/scale
- integrations/status
- - kameletbindings/status
- - kameletbindings/scale
+ - bindings/status
+ - bindings/scale
- kamelets/status
verbs:
- get
diff --git a/config/rbac/user-cluster-role.yaml b/config/rbac/user-cluster-role.yaml
index ed6a661a1..86e19096b 100644
--- a/config/rbac/user-cluster-role.yaml
+++ b/config/rbac/user-cluster-role.yaml
@@ -33,7 +33,7 @@ rules:
- integrationkits
- integrationplatforms
- integrations
- - kameletbindings
+ - bindings
- kamelets
verbs:
- create
@@ -53,8 +53,8 @@ rules:
- integrationplatforms/status
- integrations/scale
- integrations/status
- - kameletbindings/scale
- - kameletbindings/status
+ - bindings/scale
+ - bindings/status
- kamelets/status
verbs:
- get
diff --git a/config/samples/bases/camel_v1_kameletbinding.yaml b/config/samples/bases/camel_v1_kameletbinding.yaml
index 2d1424bca..977bc5b4a 100644
--- a/config/samples/bases/camel_v1_kameletbinding.yaml
+++ b/config/samples/bases/camel_v1_kameletbinding.yaml
@@ -16,7 +16,7 @@
# ---------------------------------------------------------------------------
apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
name: example
spec:
diff --git a/config/samples/kustomization.yaml b/config/samples/kustomization.yaml
index e1bcc890a..707b358bf 100644
--- a/config/samples/kustomization.yaml
+++ b/config/samples/kustomization.yaml
@@ -27,7 +27,7 @@ resources:
- bases/camel_v1_camelcatalog.yaml
- bases/camel_v1_build.yaml
- bases/camel_v1_kamelet.yaml
-- bases/camel_v1_kameletbinding.yaml
+- bases/camel_v1_binding.yaml
patchesStrategicMerge:
- patch-integration-platform.yaml
diff --git a/docs/modules/ROOT/pages/kamelets/kameletbindings-error-handler.adoc b/docs/modules/ROOT/pages/kamelets/kameletbindings-error-handler.adoc
index 228e2726c..cbdcb7b52 100644
--- a/docs/modules/ROOT/pages/kamelets/kameletbindings-error-handler.adoc
+++ b/docs/modules/ROOT/pages/kamelets/kameletbindings-error-handler.adoc
@@ -1,12 +1,12 @@
-[[kameletbindings-error-handler]]
-= Kamelet Bindings Error Handler
+[[bindings-error-handler]]
+=Bindings Error Handler
Kamelet Binding`s offer a mechanism to specify an error policy to adopt in case an event produced by a `source` or consumed by a `sink`. Through the definition of an `errorHandler` you will be able to apply certain logic to the failing event, such as simply logging, ignoring the event or posting the event to a `Sink`.
[source,yaml]
----
apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
name: my-kamelet-binding
spec:
@@ -20,12 +20,12 @@ spec:
<2> Reference to the sink where data should be sent to
<3> Error Handler Configuration
-[[kameletbindings-error-handler-types]]
+[[bindings-error-handler-types]]
== Error Handler Types
We have different types of error handler: `none`, `log` and `sink`. The `errorHandler` parameter is optional.
-[[kameletbindings-error-handler-none]]
+[[bindings-error-handler-none]]
=== No error handler
There may be certain cases where you want to just ignore any failure happening on your integration. In this situation just use a `none` error handler.
@@ -33,20 +33,20 @@ There may be certain cases where you want to just ignore any failure happening o
[source,yaml]
----
apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
name: my-kamelet-binding
spec:
source:
...
- sink:
+ sink:
...
- errorHandler:
+ errorHandler:
none: # <1>
----
<1> `none` error handler does not expect any configuration
-[[kameletbindings-error-handler-log]]
+[[bindings-error-handler-log]]
=== Log error handler
Apache Camel offers a default behavior for handling any failure: log to standard output. However you can use the `log` error handler to specify other behaviors such as redelivery or delay policy.
@@ -54,15 +54,15 @@ Apache Camel offers a default behavior for handling any failure: log to standard
[source,yaml]
----
apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
name: my-kamelet-binding
spec:
source:
...
- sink:
+ sink:
...
- errorHandler:
+ errorHandler:
log:
parameters: # <1>
maximumRedeliveries: 3
@@ -70,7 +70,7 @@ spec:
----
<1> Parameters belonging to the `log` error handler type
-[[kameletbindings-error-handler-sink]]
+[[bindings-error-handler-sink]]
=== Sink error handler
The `Sink` is probably the most interesting error handler type as it allows you to redirect any failing event to any other component, such as a third party URI, a queue or even another `Kamelet` which will be performing certain logic with the failing event.
@@ -78,17 +78,17 @@ The `Sink` is probably the most interesting error handler type as it allows you
[source,yaml]
----
apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
name: my-kamelet-binding
spec:
source:
...
- sink:
+ sink:
...
- errorHandler:
+ errorHandler:
sink:
- endpoint:
+ endpoint:
ref: # <1>
kind: Kamelet
apiVersion: camel.apache.org/v1alpha1
@@ -98,7 +98,7 @@ spec:
...
parameters:
maximumRedeliveries: 1 # <3>
- ...
+ ...
----
<1> You can use `ref` or `uri`. `ref` will be interpreted by the operator according the `kind`, `apiVersion` and `name`. You can use any `Kamelet`, `KafkaTopic` channel or `Knative` destination.
<2> Properties belonging to the endpoint (in this example, to the `Kamelet` named error handler)
diff --git a/docs/modules/ROOT/pages/kamelets/kamelets-dev.adoc b/docs/modules/ROOT/pages/kamelets/kamelets-dev.adoc
index 6f675e55f..d8d221e79 100644
--- a/docs/modules/ROOT/pages/kamelets/kamelets-dev.adoc
+++ b/docs/modules/ROOT/pages/kamelets/kamelets-dev.adoc
@@ -273,7 +273,7 @@ spec:
- to: "kamelet:sink"
----
<1> An icon with an appropriate license, better using svg+base64 URL encoding. You can encode icons using services like https://dopiaza.org/tools/datauri/index.php[this one]
-<2> The dataTypes section indicates that the Kamelet is going to produce JSON data as a default. The Kamelet is able to define multiple data types for in/out/error. The user will then be able to choose on of the data types in a KameletBinding when referencing the Kamelet.
+<2> The dataTypes section indicates that the Kamelet is going to produce JSON data as a default. The Kamelet is able to define multiple data types for in/out/error. The user will then be able to choose on of the data types in a Binding when referencing the Kamelet.
<3> The previous YAML flow
The Kamelet can be shared on the Catalog and or created on a Kubernetes cluster to let users use it.
@@ -294,7 +294,7 @@ Then you can create a binding like the following one to try it out:
[source,yaml]
----
apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
name: twitter-search-source-binding
spec:
@@ -867,7 +867,7 @@ spec:
----
<1> Add an icon with an appropriate license, better using svg+base64 URL encoding. You can encode icons using services like https://dopiaza.org/tools/datauri/index.php[this one]
<2> This marks the Kamelet as dependant on Quarkus since we're specifying explicit dependencies on Quarkus artifacts in the `spec` -> `dependencies` section
-<3> The types section indicates that the Kamelet is going to produce JSON data by default. The Kamelet is able to define multiple data types for in/out/error. The user will then be able to choose on of the data types in a KameletBinding when referencing the Kamelet.
+<3> The types section indicates that the Kamelet is going to produce JSON data by default. The Kamelet is able to define multiple data types for in/out/error. The user will then be able to choose on of the data types in a Binding when referencing the Kamelet.
<4> Dependencies that we previously specified in the modeline options should be expressed now in the Kamelet spec
The Kamelet is now ready to be used!
@@ -893,7 +893,7 @@ To check if it works, you can create a simple binding:
[source,yaml]
----
apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
name: earthquake-source-binding
spec:
@@ -1217,7 +1217,7 @@ So, for example, to send a text message to a chat, we may create a binding like
[source,yaml]
----
apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
name: telegram-text-binding
spec:
@@ -1261,7 +1261,7 @@ To check if we can also receive pictures using the above Kamelet, we can create
[source,yaml]
----
apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
name: telegram-image-binding
spec:
@@ -1314,8 +1314,8 @@ Feature: Kamelet earthquake-source works
Scenario: Bind Kamelet to service
Given create Kubernetes service test-service with target port 8080
And bind Kamelet earthquake-source to uri http://test-service.${YAKS_NAMESPACE}.svc.cluster.local/test
- When create KameletBinding earthquake-source-uri
- Then KameletBinding earthquake-source-uri should be available
+ When create Binding earthquake-source-uri
+ Then Binding earthquake-source-uri should be available
And Camel K integration earthquake-source-uri should be running
Scenario: Verify binding
@@ -1323,7 +1323,7 @@ Feature: Kamelet earthquake-source works
And HTTP server timeout is 120000 ms
Then expect HTTP request header: Content-Type="application/json;charset=UTF-8"
And receive POST /test
- And delete KameletBinding earthquake-source-uri
+ And delete Binding earthquake-source-uri
----
As you see this is a declarative test that is materialized into something that actually checks that the service generates some data.
@@ -1356,7 +1356,7 @@ send data to it via HTTP. Let's create a parameterized binding like the followin
[source,yaml]
----
apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
name: webhook-to-telegram
spec:
@@ -1406,8 +1406,8 @@ Feature: Kamelet telegram-sink works
Scenario: Bind webhook to Kamelet sink
Given load variables telegram-credentials.properties
- And load KameletBinding webhook-to-telegram.yaml
- Then KameletBinding webhook-to-telegram should be available
+ And load Binding webhook-to-telegram.yaml
+ Then Binding webhook-to-telegram should be available
And Camel K integration webhook-to-telegram should be running
@@ -1423,7 +1423,7 @@ Feature: Kamelet telegram-sink works
"""
When send POST /message
Then receive HTTP 200 OK
- And delete KameletBinding webhook-to-telegram
+ And delete Binding webhook-to-telegram
----
diff --git a/docs/modules/ROOT/pages/kamelets/kamelets-user.adoc b/docs/modules/ROOT/pages/kamelets/kamelets-user.adoc
index 64e6c6250..5fe4f2d77 100644
--- a/docs/modules/ROOT/pages/kamelets/kamelets-user.adoc
+++ b/docs/modules/ROOT/pages/kamelets/kamelets-user.adoc
@@ -256,7 +256,7 @@ These Kamelets are installed by default when you install Camel K operator. You w
[[kamelets-custom-catalog]]
=== Use a custom Catalog
-You can overwrite the default catalog by adding certain configuration to the `IntegrationPlatform`. In order to add a new repository, you must edit the `IntegrationPlatfom` and edit the `.spec.kamelet.repositories[].uri` field, which expects an array of repository URIs where you can host your catalog of Kamelets, ie:
+You can overwrite the default catalog by adding certain configuration to the `IntegrationPlatform`. In order to add a new repository, you must edit the `IntegrationPlatfom` and edit the `.spec.kamelet.repositories[].uri` field, which expects an array of repository URIs where you can host your catalog of Kamelets, ie:
[source,yaml]
----
spec:
@@ -278,11 +278,11 @@ In some contexts (for example **"serverless"**) users often want to leverage the
doing additional processing (such as tranformations or other enterprise integration patterns).
A common use case is that of **Knative Sources**, for which the Apache Camel developers maintain the https://knative.dev/docs/eventing/samples/apache-camel-source/[Knative CamelSources].
-Kamelets represent an **evolution** of the model proposed in CamelSources, but they allow using the same declarative style of binding, via a resource named **KameletBinding**.
+Kamelets represent an **evolution** of the model proposed in CamelSources, but they allow using the same declarative style of binding, via a resource named **Binding**.
=== Binding to a Knative Destination
-A KameletBinding allows to declaratively move data from a system described by a Kamelet towards a Knative destination (or other kind of destinations, in the future), or from
+A Binding allows to declaratively move data from a system described by a Kamelet towards a Knative destination (or other kind of destinations, in the future), or from
a Knative channel/broker to another external system described by a Kamelet.
For example, here's an example of binding:
@@ -290,7 +290,7 @@ For example, here's an example of binding:
[source,yaml]
----
apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
name: telegram-text-source-to-channel
spec:
@@ -315,11 +315,11 @@ makes sure that messages produced by the Kamelet are forwarded to the Knative **
Note that source and sink are specified declaratively as standard **Kubernetes object references**.
-The example shows how we can reference the "telegram-text-source" resource in a KameletBinding. It's contained in the `source` section
+The example shows how we can reference the "telegram-text-source" resource in a Binding. It's contained in the `source` section
because it's a Kamelet of type "source".
-A Kamelet of type "sink", by contrast, can only be used in the `sink` section of a `KameletBinding`.
+A Kamelet of type "sink", by contrast, can only be used in the `sink` section of a `Binding`.
-**Under the covers, a KameletBinding creates an Integration** resource that implements the binding, but this is transparent to the end user.
+**Under the covers, a Binding creates an Integration** resource that implements the binding, but this is transparent to the end user.
=== Binding to a Kafka Topic
@@ -338,7 +338,7 @@ The following binding can be created to push data into the `my-topic` topic:
[source,yaml]
----
apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
name: telegram-text-source-to-kafka
spec:
@@ -361,13 +361,13 @@ After creating it, messages will flow from Telegram to Kafka.
=== Binding to an explicit URI
-An alternative way to use a KameletBinding is to configure the source/sink to be an explicit Camel URI.
+An alternative way to use a Binding is to configure the source/sink to be an explicit Camel URI.
For example, the following binding is allowed:
[source,yaml]
----
apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
name: telegram-text-source-to-channel
spec:
@@ -381,25 +381,25 @@ spec:
sink:
uri: https://mycompany.com/the-service # <1>
----
-<1> KameletBinding with explicitly URI
+<1> Binding with explicitly URI
-This KameletBinding explicitly defines an URI where data is going to be pushed.
+This Binding explicitly defines an URI where data is going to be pushed.
NOTE: the `uri` option is also conventionally used in Knative to specify a non-kubernetes destination.
To comply with the Knative specifications, in case an "http" or "https" URI is used, Camel will send https://cloudevents.io/[CloudEvents] to the destination.
=== Error Handling
-You can configure an error handler in order to specify what to do when some event ends up with failure. See xref:kamelets/kameletbindings-error-handler.adoc[Kamelet Bindings Error Handler User Guide] for more detail.
+You can configure an error handler in order to specify what to do when some event ends up with failure. See xref:kamelets/bindings-error-handler.adoc[Kamelet Bindings Error Handler User Guide] for more detail.
=== Trait via annotations
-You can easily tune your `KameletBinding` with xref:traits:traits.adoc[traits] configuration adding `.metadata.annotations`. Let's have a look at the following example:
+You can easily tune your `Binding` with xref:traits:traits.adoc[traits] configuration adding `.metadata.annotations`. Let's have a look at the following example:
[source,yaml]
----
apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
name: timer-2-log-annotation
annotations: # <1>
@@ -578,7 +578,7 @@ Data shapes contain the following information:
|E.g. `aws2-s3`
|`format`
-|The data shape name used to identify and reference the data type in a KameletBinding when choosing from multiple data type options.
+|The data shape name used to identify and reference the data type in a Binding when choosing from multiple data type options.
|`string`
|E.g. `json`
@@ -653,13 +653,13 @@ which is set to the name of a specific KEDA autoscaler.
A KEDA enabled Kamelet can be used in the same way as any other Kamelet, in a binding or in an integration.
KEDA autoscalers are not enabled by default: they need to be manually enabled by the user via the `keda` trait.
-In a KameletBinding, the KEDA trait can be enabled using annotations:
+In a Binding, the KEDA trait can be enabled using annotations:
.my-keda-binding.yaml
[source,yaml]
----
apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
name: my-keda-binding
annotations:
diff --git a/docs/modules/ROOT/pages/kamelets/kamelets.adoc b/docs/modules/ROOT/pages/kamelets/kamelets.adoc
index c0d0327b7..a4622c7c8 100644
--- a/docs/modules/ROOT/pages/kamelets/kamelets.adoc
+++ b/docs/modules/ROOT/pages/kamelets/kamelets.adoc
@@ -4,5 +4,5 @@
This section of the documentation contains information about Kamelets from both a user and a developer point of view:
- The xref:kamelets/kamelets-user.adoc[Kamelets User Guide] is for users that want to use Kamelets for connecting systems with their applications
-- The xref:kamelets/kameletbindings-error-handler.adoc[Kamelet Bindings Error Handler User Guide] explains how to configure an error handler on a `Kamelet Binding`
+- The xref:kamelets/bindings-error-handler.adoc[Kamelet Bindings Error Handler User Guide] explains how to configure an error handler on a `Kamelet Binding`
- The xref:kamelets/kamelets-dev.adoc[Kamelets Developer Guide] is a reference for developers that want to create new Kamelets and share them with users
diff --git a/docs/modules/ROOT/pages/running/knative-sink.adoc b/docs/modules/ROOT/pages/running/knative-sink.adoc
index a67d6ca6b..890de244f 100644
--- a/docs/modules/ROOT/pages/running/knative-sink.adoc
+++ b/docs/modules/ROOT/pages/running/knative-sink.adoc
@@ -10,12 +10,12 @@ from('timer:tick')
.to('knative:event/broker')
----
-Or as the value of the `sink` field in a `KameletBinding` resource, e.g.:
+Or as the value of the `sink` field in a `Binding` resource, e.g.:
[source,yaml]
----
apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
name: timer-source-binding
spec:
diff --git a/docs/modules/ROOT/pages/scaling/binding.adoc b/docs/modules/ROOT/pages/scaling/binding.adoc
index 60d1b781b..08d7a47bc 100644
--- a/docs/modules/ROOT/pages/scaling/binding.adoc
+++ b/docs/modules/ROOT/pages/scaling/binding.adoc
@@ -1,23 +1,23 @@
[[binding-scaling]]
-= Camel K KameletBinding Scaling
+= Camel K Binding Scaling
== Manual Scaling
-A KameletBinding can be scaled using the `kubectl scale` command, e.g.:
+A Binding can be scaled using the `kubectl scale` command, e.g.:
[source,console]
----
$ kubectl scale klb <kamelet_binding_name> --replicas <number_of_replicas>
----
-This can also be achieved by editing the KameletBinding resource directly, e.g.:
+This can also be achieved by editing the Binding resource directly, e.g.:
[source,console]
----
$ kubectl patch klb <kamelet_binding_name> -p '{"spec":{"replicas":<number_of_replicas>}}'
----
-The KameletBinding also reports its number of replicas in the `.status.replicas` field, e.g.:
+The Binding also reports its number of replicas in the `.status.replicas` field, e.g.:
[source,console]
----
@@ -26,19 +26,19 @@ $ kubectl get klb <kamelet_binding_name> -o jsonpath='{.status.replicas}'
== Autoscaling with Knative
-A KameletBinding that binds an HTTP-based source Kamelet can automatically scale based on _incoming_ traffic when installed on a cluster with _Knative_ enabled, including scaling to zero.
+A Binding that binds an HTTP-based source Kamelet can automatically scale based on _incoming_ traffic when installed on a cluster with _Knative_ enabled, including scaling to zero.
The _incoming_ traffic measures either as:
* The number of simultaneous requests, that are processed by each replica at any given time;
* Or the number of requests that are processed per second, per replica.
-The `webhook-source` Kamelet is one of the sources that enables auto-scaling when used in a KameletBinding:
+The `webhook-source` Kamelet is one of the sources that enables auto-scaling when used in a Binding:
[source,yaml]
----
apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
name: webhook-binding
spec:
@@ -59,7 +59,7 @@ The Knative https://knative.dev/docs/serving/autoscaling/autoscaling-concepts/#s
[source,yaml]
----
apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
name: webhook-binding
spec:
@@ -84,8 +84,8 @@ More information can be found in the Knative https://knative.dev/docs/serving/au
[NOTE]
====
-When <<Manual Scaling,manually scaling>> a KameletBinding that deploys as a Knative Service, both https://knative.dev/docs/serving/autoscaling/scale-bounds/[scale bounds], i.e., `minScale` and `maxScale`, are set to the specified number of replicas.
-Scale bounds can be reset by removing the `.spec.replicas` field from the KameletBinding, e.g., with:
+When <<Manual Scaling,manually scaling>> a Binding that deploys as a Knative Service, both https://knative.dev/docs/serving/autoscaling/scale-bounds/[scale bounds], i.e., `minScale` and `maxScale`, are set to the specified number of replicas.
+Scale bounds can be reset by removing the `.spec.replicas` field from the Binding, e.g., with:
[source,console]
----
@@ -95,9 +95,9 @@ $ kubectl patch klb <kamelet_binding_name> --type=json -p='[{"op": "remove", "pa
== Autoscaling with HPA
-A KameletBinding can automatically scale based on its CPU utilization and custom metrics using https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/[horizontal pod autoscaling (HPA)].
+A Binding can automatically scale based on its CPU utilization and custom metrics using https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/[horizontal pod autoscaling (HPA)].
-For example, executing the following command creates an _autoscaler_ for the KameletBinding, with target CPU utilization set to 80%, and the number of replicas between 2 and 5:
+For example, executing the following command creates an _autoscaler_ for the Binding, with target CPU utilization set to 80%, and the number of replicas between 2 and 5:
[source,console]
----
diff --git a/docs/modules/ROOT/pages/troubleshooting/debugging.adoc b/docs/modules/ROOT/pages/troubleshooting/debugging.adoc
index 51d0c7446..255a7e747 100644
--- a/docs/modules/ROOT/pages/troubleshooting/debugging.adoc
+++ b/docs/modules/ROOT/pages/troubleshooting/debugging.adoc
@@ -57,8 +57,8 @@ When the debugging session is done, hitting kbd:[Ctrl+c] on the terminal where t
[[debugging-kamelets]]
== Debugging Kamelets
-As we've seen in the previous section, all `Integration` created in Camel K are finally bundled as a Java application, hence, the possibility to debug via JVM debugger. Any `Kamelet` you will be using directly in your `Route` definition or in a `KameletBinding` is automatically converted in a `yaml` route and injected in the Camel Context to be executed. That means that you cannot directly debug a `Kamelet` as you would do with a Java or any other JVM language `Route`.
+As we've seen in the previous section, all `Integration` created in Camel K are finally bundled as a Java application, hence, the possibility to debug via JVM debugger. Any `Kamelet` you will be using directly in your `Route` definition or in a `Binding` is automatically converted in a `yaml` route and injected in the Camel Context to be executed. That means that you cannot directly debug a `Kamelet` as you would do with a Java or any other JVM language `Route`.
However, you can troubleshoot individually each `Kamelet` definition by focusing on the specification xref:kamelets/kamelets-user.adoc#_flow[`Flow`]. As an example, you can create a simple `yaml` test `Route` substituting the `kamelet:source` or `kamelet:sink` with any mock endpoint that can help you in debugging the single `Kamelet` flow. Even using a `timer` and a `log` component may be enough for a basic check.
-NOTE: the same idea applies for a `KameletBinding` which translates to an `Integration` type under the hood. If you need to debug a `KameletBinding` just apply the same troubleshooting technique that you would apply on an `Integration`.
+NOTE: the same idea applies for a `Binding` which translates to an `Integration` type under the hood. If you need to debug a `Binding` just apply the same troubleshooting technique that you would apply on an `Integration`.
diff --git a/docs/modules/ROOT/partials/apis/crds-html.adoc b/docs/modules/ROOT/partials/apis/crds-html.adoc
index 3a4dadc90..d4d44ebe2 100644
--- a/docs/modules/ROOT/partials/apis/crds-html.adoc
+++ b/docs/modules/ROOT/partials/apis/crds-html.adoc
@@ -769,7 +769,7 @@ IntegrationPlatformStatus
</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1.BuildStatus">BuildStatus</a>,
+<a href="#camel.apache.org/v1.BuildStatus">BuildStatus</a>,
<a href="#camel.apache.org/v1.IntegrationKitStatus">IntegrationKitStatus</a>)
</p>
<div>
@@ -829,10 +829,10 @@ string
</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1.BuildahTask">BuildahTask</a>,
-<a href="#camel.apache.org/v1.BuilderTask">BuilderTask</a>,
-<a href="#camel.apache.org/v1.KanikoTask">KanikoTask</a>,
-<a href="#camel.apache.org/v1.S2iTask">S2iTask</a>,
+<a href="#camel.apache.org/v1.BuildahTask">BuildahTask</a>,
+<a href="#camel.apache.org/v1.BuilderTask">BuilderTask</a>,
+<a href="#camel.apache.org/v1.KanikoTask">KanikoTask</a>,
+<a href="#camel.apache.org/v1.S2iTask">S2iTask</a>,
<a href="#camel.apache.org/v1.SpectrumTask">SpectrumTask</a>)
</p>
<div>
@@ -1165,7 +1165,7 @@ string
(<code>string</code> alias)</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1.BuildSpec">BuildSpec</a>,
+<a href="#camel.apache.org/v1.BuildSpec">BuildSpec</a>,
<a href="#camel.apache.org/v1.IntegrationPlatformBuildSpec">IntegrationPlatformBuildSpec</a>)
</p>
<div>
@@ -1444,7 +1444,7 @@ CamelArtifactDependency
</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1.CamelArtifact">CamelArtifact</a>,
+<a href="#camel.apache.org/v1.CamelArtifact">CamelArtifact</a>,
<a href="#camel.apache.org/v1.CamelSchemeScope">CamelSchemeScope</a>)
</p>
<div>
@@ -1800,9 +1800,9 @@ map[string]string
</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1.IntegrationKitSpec">IntegrationKitSpec</a>,
-<a href="#camel.apache.org/v1.IntegrationPlatformSpec">IntegrationPlatformSpec</a>,
-<a href="#camel.apache.org/v1.IntegrationSpec">IntegrationSpec</a>,
+<a href="#camel.apache.org/v1.IntegrationKitSpec">IntegrationKitSpec</a>,
+<a href="#camel.apache.org/v1.IntegrationPlatformSpec">IntegrationPlatformSpec</a>,
+<a href="#camel.apache.org/v1.IntegrationSpec">IntegrationSpec</a>,
<a href="#camel.apache.org/v1.IntegrationStatus">IntegrationStatus</a>)
</p>
<div>
@@ -1872,7 +1872,7 @@ string
</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1.ResourceSpec">ResourceSpec</a>,
+<a href="#camel.apache.org/v1.ResourceSpec">ResourceSpec</a>,
<a href="#camel.apache.org/v1.SourceSpec">SourceSpec</a>)
</p>
<div>
@@ -1972,7 +1972,7 @@ bool
</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1.BuildStatus">BuildStatus</a>,
+<a href="#camel.apache.org/v1.BuildStatus">BuildStatus</a>,
<a href="#camel.apache.org/v1.IntegrationKitStatus">IntegrationKitStatus</a>)
</p>
<div>
@@ -2900,7 +2900,7 @@ string
</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1.IntegrationPlatform">IntegrationPlatform</a>,
+<a href="#camel.apache.org/v1.IntegrationPlatform">IntegrationPlatform</a>,
<a href="#camel.apache.org/v1.IntegrationPlatformStatus">IntegrationPlatformStatus</a>)
</p>
<div>
@@ -3082,8 +3082,8 @@ map[string]string
</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1.Integration">Integration</a>,
-<a href="#camel.apache.org/v1alpha1.KameletBindingSpec">KameletBindingSpec</a>)
+<a href="#camel.apache.org/v1.Integration">Integration</a>,
+<a href="#camel.apache.org/v1alpha1.BindingSpec">BindingSpec</a>)
</p>
<div>
<p>IntegrationSpec defines the desired state of Integration</p>
@@ -3583,10 +3583,10 @@ string
</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1.CamelArtifactDependency">CamelArtifactDependency</a>,
-<a href="#camel.apache.org/v1.CamelLoader">CamelLoader</a>,
-<a href="#camel.apache.org/v1.Capability">Capability</a>,
-<a href="#camel.apache.org/v1.MavenSpec">MavenSpec</a>,
+<a href="#camel.apache.org/v1.CamelArtifactDependency">CamelArtifactDependency</a>,
+<a href="#camel.apache.org/v1.CamelLoader">CamelLoader</a>,
+<a href="#camel.apache.org/v1.Capability">Capability</a>,
+<a href="#camel.apache.org/v1.MavenSpec">MavenSpec</a>,
<a href="#camel.apache.org/v1.RuntimeSpec">RuntimeSpec</a>)
</p>
<div>
@@ -3683,7 +3683,7 @@ MavenSpec
</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1.IntegrationPlatformBuildSpec">IntegrationPlatformBuildSpec</a>,
+<a href="#camel.apache.org/v1.IntegrationPlatformBuildSpec">IntegrationPlatformBuildSpec</a>,
<a href="#camel.apache.org/v1.MavenBuildSpec">MavenBuildSpec</a>)
</p>
<div>
@@ -4077,8 +4077,8 @@ map[string]string
</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1.BuildahTask">BuildahTask</a>,
-<a href="#camel.apache.org/v1.KanikoTask">KanikoTask</a>,
+<a href="#camel.apache.org/v1.BuildahTask">BuildahTask</a>,
+<a href="#camel.apache.org/v1.KanikoTask">KanikoTask</a>,
<a href="#camel.apache.org/v1.SpectrumTask">SpectrumTask</a>)
</p>
<div>
@@ -4140,12 +4140,12 @@ RegistrySpec
(<code>[]byte</code> alias)</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1alpha1.BeanProperties">BeanProperties</a>,
-<a href="#camel.apache.org/v1alpha1.EndpointProperties">EndpointProperties</a>,
-<a href="#camel.apache.org/v1alpha1.ErrorHandlerParameters">ErrorHandlerParameters</a>,
-<a href="#camel.apache.org/v1alpha1.ErrorHandlerSpec">ErrorHandlerSpec</a>,
-<a href="#camel.apache.org/v1.Flow">Flow</a>,
-<a href="#camel.apache.org/v1.Template">Template</a>,
+<a href="#camel.apache.org/v1alpha1.BeanProperties">BeanProperties</a>,
+<a href="#camel.apache.org/v1alpha1.EndpointProperties">EndpointProperties</a>,
+<a href="#camel.apache.org/v1alpha1.ErrorHandlerParameters">ErrorHandlerParameters</a>,
+<a href="#camel.apache.org/v1alpha1.ErrorHandlerSpec">ErrorHandlerSpec</a>,
+<a href="#camel.apache.org/v1.Flow">Flow</a>,
+<a href="#camel.apache.org/v1.Template">Template</a>,
<a href="#camel.apache.org/v1.TraitConfiguration">TraitConfiguration</a>)
</p>
<div>
@@ -4157,7 +4157,7 @@ be used to delay JSON decoding or precompute a JSON encoding.</p>
</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1.IntegrationPlatformBuildSpec">IntegrationPlatformBuildSpec</a>,
+<a href="#camel.apache.org/v1.IntegrationPlatformBuildSpec">IntegrationPlatformBuildSpec</a>,
<a href="#camel.apache.org/v1.PublishTask">PublishTask</a>)
</p>
<div>
@@ -4354,8 +4354,8 @@ string
</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1.BuilderTask">BuilderTask</a>,
-<a href="#camel.apache.org/v1.IntegrationSpec">IntegrationSpec</a>,
+<a href="#camel.apache.org/v1.BuilderTask">BuilderTask</a>,
+<a href="#camel.apache.org/v1.IntegrationSpec">IntegrationSpec</a>,
<a href="#camel.apache.org/v1.IntegrationStatus">IntegrationStatus</a>)
</p>
<div>
@@ -4421,9 +4421,9 @@ string
(<code>string</code> alias)</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1.IntegrationKitStatus">IntegrationKitStatus</a>,
-<a href="#camel.apache.org/v1.IntegrationPlatformBuildSpec">IntegrationPlatformBuildSpec</a>,
-<a href="#camel.apache.org/v1.IntegrationStatus">IntegrationStatus</a>,
+<a href="#camel.apache.org/v1.IntegrationKitStatus">IntegrationKitStatus</a>,
+<a href="#camel.apache.org/v1.IntegrationPlatformBuildSpec">IntegrationPlatformBuildSpec</a>,
+<a href="#camel.apache.org/v1.IntegrationStatus">IntegrationStatus</a>,
<a href="#camel.apache.org/v1.RuntimeSpec">RuntimeSpec</a>)
</p>
<div>
@@ -4433,7 +4433,7 @@ string
</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1.BuilderTask">BuilderTask</a>,
+<a href="#camel.apache.org/v1.BuilderTask">BuilderTask</a>,
<a href="#camel.apache.org/v1.CamelCatalogSpec">CamelCatalogSpec</a>)
</p>
<div>
@@ -4573,9 +4573,9 @@ string
</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1.BuilderTask">BuilderTask</a>,
-<a href="#camel.apache.org/v1.IntegrationSpec">IntegrationSpec</a>,
-<a href="#camel.apache.org/v1.IntegrationStatus">IntegrationStatus</a>,
+<a href="#camel.apache.org/v1.BuilderTask">BuilderTask</a>,
+<a href="#camel.apache.org/v1.IntegrationSpec">IntegrationSpec</a>,
+<a href="#camel.apache.org/v1.IntegrationStatus">IntegrationStatus</a>,
<a href="#camel.apache.org/v1alpha1.KameletSpec">KameletSpec</a>)
</p>
<div>
@@ -4873,9 +4873,9 @@ RawMessage
(<code>string</code> alias)</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1.IntegrationKitSpec">IntegrationKitSpec</a>,
-<a href="#camel.apache.org/v1.IntegrationPlatformSpec">IntegrationPlatformSpec</a>,
-<a href="#camel.apache.org/v1.IntegrationSpec">IntegrationSpec</a>,
+<a href="#camel.apache.org/v1.IntegrationKitSpec">IntegrationKitSpec</a>,
+<a href="#camel.apache.org/v1.IntegrationPlatformSpec">IntegrationPlatformSpec</a>,
+<a href="#camel.apache.org/v1.IntegrationSpec">IntegrationSpec</a>,
<a href="#camel.apache.org/v1.IntegrationStatus">IntegrationStatus</a>)
</p>
<div>
@@ -4885,8 +4885,8 @@ RawMessage
</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1.IntegrationKitSpec">IntegrationKitSpec</a>,
-<a href="#camel.apache.org/v1.IntegrationPlatformSpec">IntegrationPlatformSpec</a>,
+<a href="#camel.apache.org/v1.IntegrationKitSpec">IntegrationKitSpec</a>,
+<a href="#camel.apache.org/v1.IntegrationPlatformSpec">IntegrationPlatformSpec</a>,
<a href="#camel.apache.org/v1.IntegrationSpec">IntegrationSpec</a>)
</p>
<div>
@@ -4968,7 +4968,7 @@ Resource Types:
<ul><li>
<a href="#camel.apache.org/v1alpha1.Kamelet">Kamelet</a>
</li><li>
-<a href="#camel.apache.org/v1alpha1.KameletBinding">KameletBinding</a>
+<a href="#camel.apache.org/v1alpha1.Binding">Binding</a>
</li></ul>
<h3 id="camel.apache.org/v1alpha1.Kamelet">Kamelet
</h3>
@@ -5114,10 +5114,10 @@ KameletStatus
</tr>
</tbody>
</table>
-<h3 id="camel.apache.org/v1alpha1.KameletBinding">KameletBinding
+<h3 id="camel.apache.org/v1alpha1.Binding">Binding
</h3>
<div>
-<p>KameletBinding is the Schema for the kamelets binding API</p>
+<p>Binding is the Schema for the kamelets binding API</p>
</div>
<table>
<thead>
@@ -5142,7 +5142,7 @@ camel.apache.org/v1alpha1
<code>kind</code></br>
string
</td>
-<td><code>KameletBinding</code></td>
+<td><code>Binding</code></td>
</tr>
<tr>
<td>
@@ -5162,8 +5162,8 @@ Refer to the Kubernetes API documentation for the fields of the
<td>
<code>spec</code><br/>
<em>
-<a href="#camel.apache.org/v1alpha1.KameletBindingSpec">
-KameletBindingSpec
+<a href="#camel.apache.org/v1alpha1.BindingSpec">
+BindingSpec
</a>
</em>
</td>
@@ -5254,8 +5254,8 @@ int32
<td>
<code>status</code><br/>
<em>
-<a href="#camel.apache.org/v1alpha1.KameletBindingStatus">
-KameletBindingStatus
+<a href="#camel.apache.org/v1alpha1.BindingStatus">
+BindingStatus
</a>
</em>
</td>
@@ -5304,8 +5304,8 @@ RawMessage
</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1alpha1.ErrorHandlerSink">ErrorHandlerSink</a>,
-<a href="#camel.apache.org/v1alpha1.KameletBindingSpec">KameletBindingSpec</a>)
+<a href="#camel.apache.org/v1alpha1.ErrorHandlerSink">ErrorHandlerSink</a>,
+<a href="#camel.apache.org/v1alpha1.BindingSpec">BindingSpec</a>)
</p>
<div>
<p>Endpoint represents a source/sink external entity</p>
@@ -5549,7 +5549,7 @@ Endpoint
</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1alpha1.KameletBindingSpec">KameletBindingSpec</a>)
+<a href="#camel.apache.org/v1alpha1.BindingSpec">BindingSpec</a>)
</p>
<div>
<p>ErrorHandlerSpec represents an unstructured object for an error handler</p>
@@ -5589,7 +5589,7 @@ RawMessage
</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1alpha1.Endpoint">Endpoint</a>,
+<a href="#camel.apache.org/v1alpha1.Endpoint">Endpoint</a>,
<a href="#camel.apache.org/v1alpha1.KameletSpec">KameletSpec</a>)
</p>
<div>
@@ -5669,7 +5669,7 @@ string
</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1alpha1.JSONSchemaProp">JSONSchemaProp</a>,
+<a href="#camel.apache.org/v1alpha1.JSONSchemaProp">JSONSchemaProp</a>,
<a href="#camel.apache.org/v1alpha1.JSONSchemaProps">JSONSchemaProps</a>)
</p>
<div>
@@ -5988,7 +5988,7 @@ bool
</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1alpha1.EventTypeSpec">EventTypeSpec</a>,
+<a href="#camel.apache.org/v1alpha1.EventTypeSpec">EventTypeSpec</a>,
<a href="#camel.apache.org/v1alpha1.KameletSpec">KameletSpec</a>)
</p>
<div>
@@ -6111,14 +6111,14 @@ string
<div>
<p>JSONSchemaURL represents a schema url.</p>
</div>
-<h3 id="camel.apache.org/v1alpha1.KameletBindingCondition">KameletBindingCondition
+<h3 id="camel.apache.org/v1alpha1.BindingCondition">BindingCondition
</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1alpha1.KameletBindingStatus">KameletBindingStatus</a>)
+<a href="#camel.apache.org/v1alpha1.BindingStatus">BindingStatus</a>)
</p>
<div>
-<p>KameletBindingCondition describes the state of a resource at a certain point.</p>
+<p>BindingCondition describes the state of a resource at a certain point.</p>
</div>
<table>
<thead>
@@ -6132,13 +6132,13 @@ string
<td>
<code>type</code><br/>
<em>
-<a href="#camel.apache.org/v1alpha1.KameletBindingConditionType">
-KameletBindingConditionType
+<a href="#camel.apache.org/v1alpha1.BindingConditionType">
+BindingConditionType
</a>
</em>
</td>
<td>
-<p>Type of kameletBinding condition.</p>
+<p>Type of binding condition.</p>
</td>
</tr>
<tr>
@@ -6204,30 +6204,30 @@ string
</tr>
</tbody>
</table>
-<h3 id="camel.apache.org/v1alpha1.KameletBindingConditionType">KameletBindingConditionType
+<h3 id="camel.apache.org/v1alpha1.BindingConditionType">BindingConditionType
(<code>string</code> alias)</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1alpha1.KameletBindingCondition">KameletBindingCondition</a>)
+<a href="#camel.apache.org/v1alpha1.BindingCondition">BindingCondition</a>)
</p>
<div>
</div>
-<h3 id="camel.apache.org/v1alpha1.KameletBindingPhase">KameletBindingPhase
+<h3 id="camel.apache.org/v1alpha1.BindingPhase">BindingPhase
(<code>string</code> alias)</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1alpha1.KameletBindingStatus">KameletBindingStatus</a>)
+<a href="#camel.apache.org/v1alpha1.BindingStatus">BindingStatus</a>)
</p>
<div>
</div>
-<h3 id="camel.apache.org/v1alpha1.KameletBindingSpec">KameletBindingSpec
+<h3 id="camel.apache.org/v1alpha1.BindingSpec">BindingSpec
</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1alpha1.KameletBinding">KameletBinding</a>)
+<a href="#camel.apache.org/v1alpha1.Binding">Binding</a>)
</p>
<div>
-<p>KameletBindingSpec –</p>
+<p>BindingSpec –</p>
</div>
<table>
<thead>
@@ -6315,14 +6315,14 @@ int32
</tr>
</tbody>
</table>
-<h3 id="camel.apache.org/v1alpha1.KameletBindingStatus">KameletBindingStatus
+<h3 id="camel.apache.org/v1alpha1.BindingStatus">BindingStatus
</h3>
<p>
(<em>Appears on:</em>
-<a href="#camel.apache.org/v1alpha1.KameletBinding">KameletBinding</a>)
+<a href="#camel.apache.org/v1alpha1.Binding">Binding</a>)
</p>
<div>
-<p>KameletBindingStatus –</p>
+<p>BindingStatus –</p>
</div>
<table>
<thead>
@@ -6336,8 +6336,8 @@ int32
<td>
<code>phase</code><br/>
<em>
-<a href="#camel.apache.org/v1alpha1.KameletBindingPhase">
-KameletBindingPhase
+<a href="#camel.apache.org/v1alpha1.BindingPhase">
+BindingPhase
</a>
</em>
</td>
@@ -6349,8 +6349,8 @@ KameletBindingPhase
<td>
<code>conditions</code><br/>
<em>
-<a href="#camel.apache.org/v1alpha1.KameletBindingCondition">
-[]KameletBindingCondition
+<a href="#camel.apache.org/v1alpha1.BindingCondition">
+[]BindingCondition
</a>
</em>
</td>
diff --git a/docs/modules/ROOT/partials/apis/kamelets-crds.adoc b/docs/modules/ROOT/partials/apis/kamelets-crds.adoc
index 36d7aea89..f0f444fab 100644
--- a/docs/modules/ROOT/partials/apis/kamelets-crds.adoc
+++ b/docs/modules/ROOT/partials/apis/kamelets-crds.adoc
@@ -5,10 +5,10 @@ Package v1alpha1 contains API Schema definitions for the camel v1alpha1 API grou
== Resource Types
-[#_camel_apache_org_v1alpha1_Kamelet]
-=== Kamelet
+[#_camel_apache_org_v1alpha1_Binding]
+=== Binding
-Kamelet is the Schema for the kamelets API
+Binding is the Schema for the kamelets binding API
[cols="2,2a",options="header"]
|===
@@ -21,7 +21,7 @@ string
|`kind` +
string
-|`Kamelet`
+|`Binding`
|`metadata` +
*https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#objectmeta-v1-meta[Kubernetes meta/v1.ObjectMeta]*
|
@@ -31,26 +31,26 @@ string
Refer to the Kubernetes API documentation for the fields of the `metadata` field.
|`spec` +
-*xref:#_camel_apache_org_v1alpha1_KameletSpec[KameletSpec]*
+*xref:#_camel_apache_org_v1alpha1_BindingSpec[BindingSpec]*
|
-the desired specification
+the specification of a Binding
|`status` +
-*xref:#_camel_apache_org_v1alpha1_KameletStatus[KameletStatus]*
+*xref:#_camel_apache_org_v1alpha1_BindingStatus[BindingStatus]*
|
-the actual status of the resource
+the status of a Binding
|===
-[#_camel_apache_org_v1alpha1_KameletBinding]
-=== KameletBinding
+[#_camel_apache_org_v1alpha1_Kamelet]
+=== Kamelet
-KameletBinding is the Schema for the kamelets binding API
+Kamelet is the Schema for the kamelets API
[cols="2,2a",options="header"]
|===
@@ -63,7 +63,7 @@ string
|`kind` +
string
-|`KameletBinding`
+|`Kamelet`
|`metadata` +
*https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#objectmeta-v1-meta[Kubernetes meta/v1.ObjectMeta]*
|
@@ -73,18 +73,18 @@ string
Refer to the Kubernetes API documentation for the fields of the `metadata` field.
|`spec` +
-*xref:#_camel_apache_org_v1alpha1_KameletBindingSpec[KameletBindingSpec]*
+*xref:#_camel_apache_org_v1alpha1_KameletSpec[KameletSpec]*
|
-the specification of a KameletBinding
+the desired specification
|`status` +
-*xref:#_camel_apache_org_v1alpha1_KameletBindingStatus[KameletBindingStatus]*
+*xref:#_camel_apache_org_v1alpha1_KameletStatus[KameletStatus]*
|
-the status of a KameletBinding
+the actual status of the resource
|===
@@ -109,6 +109,210 @@ BeanProperties represent an unstructured object properties to be set on a bean
+|===
+
+[#_camel_apache_org_v1alpha1_BindingCondition]
+=== BindingCondition
+
+*Appears on:*
+
+* <<#_camel_apache_org_v1alpha1_BindingStatus, BindingStatus>>
+
+BindingCondition describes the state of a resource at a certain point.
+
+[cols="2,2a",options="header"]
+|===
+|Field
+|Description
+
+|`type` +
+*xref:#_camel_apache_org_v1alpha1_BindingConditionType[BindingConditionType]*
+|
+
+
+Type of binding condition.
+
+|`status` +
+*https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#conditionstatus-v1-core[Kubernetes core/v1.ConditionStatus]*
+|
+
+
+Status of the condition, one of True, False, Unknown.
+
+|`lastUpdateTime` +
+*https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#time-v1-meta[Kubernetes meta/v1.Time]*
+|
+
+
+The last time this condition was updated.
+
+|`lastTransitionTime` +
+*https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#time-v1-meta[Kubernetes meta/v1.Time]*
+|
+
+
+Last time the condition transitioned from one status to another.
+
+|`reason` +
+string
+|
+
+
+The reason for the condition's last transition.
+
+|`message` +
+string
+|
+
+
+A human readable message indicating details about the transition.
+
+|`pods` +
+[]github.com/apache/camel-k/v2/pkg/apis/camel/v1.PodCondition
+|
+
+
+Pods collect health and conditions information from the owned PODs
+
+
+|===
+
+[#_camel_apache_org_v1alpha1_BindingConditionType]
+=== BindingConditionType(`string` alias)
+
+*Appears on:*
+
+* <<#_camel_apache_org_v1alpha1_BindingCondition, BindingCondition>>
+
+BindingConditionType --
+
+
+[#_camel_apache_org_v1alpha1_BindingPhase]
+=== BindingPhase(`string` alias)
+
+*Appears on:*
+
+* <<#_camel_apache_org_v1alpha1_BindingStatus, BindingStatus>>
+
+BindingPhase --
+
+
+[#_camel_apache_org_v1alpha1_BindingSpec]
+=== BindingSpec
+
+*Appears on:*
+
+* <<#_camel_apache_org_v1alpha1_Binding, Binding>>
+
+BindingSpec defines the binding between a source and a sink. It can include custom parameters and additional intermediate steps and error handling.
+
+[cols="2,2a",options="header"]
+|===
+|Field
+|Description
+
+|`integration` +
+github.com/apache/camel-k/v2/pkg/apis/camel/v1.IntegrationSpec
+|
+
+
+Integration is an optional integration used to specify custom parameters
+
+|`source` +
+*xref:#_camel_apache_org_v1alpha1_Endpoint[Endpoint]*
+|
+
+
+Source is the starting point of the integration defined by this binding
+
+|`sink` +
+*xref:#_camel_apache_org_v1alpha1_Endpoint[Endpoint]*
+|
+
+
+Sink is the destination of the integration defined by this binding
+
+|`errorHandler` +
+*xref:#_camel_apache_org_v1alpha1_ErrorHandlerSpec[ErrorHandlerSpec]*
+|
+
+
+ErrorHandler is an optional handler called upon an error occuring in the integration
+
+|`steps` +
+*xref:#_camel_apache_org_v1alpha1_Endpoint[[\]Endpoint]*
+|
+
+
+Steps contains an optional list of intermediate steps that are executed between the Source and the Sink
+
+|`replicas` +
+int32
+|
+
+
+Replicas is the number of desired replicas for the binding
+
+|`serviceAccountName` +
+string
+|
+
+
+Custom SA to use for the binding
+
+
+|===
+
+[#_camel_apache_org_v1alpha1_BindingStatus]
+=== BindingStatus
+
+*Appears on:*
+
+* <<#_camel_apache_org_v1alpha1_Binding, Binding>>
+
+BindingStatus specify the status of a binding
+
+[cols="2,2a",options="header"]
+|===
+|Field
+|Description
+
+|`observedGeneration` +
+int64
+|
+
+
+ObservedGeneration is the most recent generation observed for this Binding.
+
+|`phase` +
+*xref:#_camel_apache_org_v1alpha1_BindingPhase[BindingPhase]*
+|
+
+
+Phase --
+
+|`conditions` +
+*xref:#_camel_apache_org_v1alpha1_BindingCondition[[\]BindingCondition]*
+|
+
+
+Conditions --
+
+|`replicas` +
+int32
+|
+
+
+Replicas is the number of actual replicas of the binding
+
+|`selector` +
+string
+|
+
+
+Selector allows to identify pods belonging to the binding
+
+
|===
[#_camel_apache_org_v1alpha1_DataTypeReference]
@@ -251,8 +455,8 @@ one to many header specifications
*Appears on:*
+* <<#_camel_apache_org_v1alpha1_BindingSpec, BindingSpec>>
* <<#_camel_apache_org_v1alpha1_ErrorHandlerSink, ErrorHandlerSink>>
-* <<#_camel_apache_org_v1alpha1_KameletBindingSpec, KameletBindingSpec>>
Endpoint represents a source/sink external entity (could be any Kubernetes resource or Camel URI)
@@ -440,7 +644,7 @@ ErrorHandlerSink represents a sink error handler type which behave like a dead l
*Appears on:*
-* <<#_camel_apache_org_v1alpha1_KameletBindingSpec, KameletBindingSpec>>
+* <<#_camel_apache_org_v1alpha1_BindingSpec, BindingSpec>>
ErrorHandlerSpec represents an unstructured object for an error handler
@@ -910,210 +1114,6 @@ string
JSONSchemaURL represents a schema url.
-[#_camel_apache_org_v1alpha1_KameletBindingCondition]
-=== KameletBindingCondition
-
-*Appears on:*
-
-* <<#_camel_apache_org_v1alpha1_KameletBindingStatus, KameletBindingStatus>>
-
-KameletBindingCondition describes the state of a resource at a certain point.
-
-[cols="2,2a",options="header"]
-|===
-|Field
-|Description
-
-|`type` +
-*xref:#_camel_apache_org_v1alpha1_KameletBindingConditionType[KameletBindingConditionType]*
-|
-
-
-Type of kameletBinding condition.
-
-|`status` +
-*https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#conditionstatus-v1-core[Kubernetes core/v1.ConditionStatus]*
-|
-
-
-Status of the condition, one of True, False, Unknown.
-
-|`lastUpdateTime` +
-*https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#time-v1-meta[Kubernetes meta/v1.Time]*
-|
-
-
-The last time this condition was updated.
-
-|`lastTransitionTime` +
-*https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#time-v1-meta[Kubernetes meta/v1.Time]*
-|
-
-
-Last time the condition transitioned from one status to another.
-
-|`reason` +
-string
-|
-
-
-The reason for the condition's last transition.
-
-|`message` +
-string
-|
-
-
-A human readable message indicating details about the transition.
-
-|`pods` +
-[]github.com/apache/camel-k/v2/pkg/apis/camel/v1.PodCondition
-|
-
-
-Pods collect health and conditions information from the owned PODs
-
-
-|===
-
-[#_camel_apache_org_v1alpha1_KameletBindingConditionType]
-=== KameletBindingConditionType(`string` alias)
-
-*Appears on:*
-
-* <<#_camel_apache_org_v1alpha1_KameletBindingCondition, KameletBindingCondition>>
-
-KameletBindingConditionType --
-
-
-[#_camel_apache_org_v1alpha1_KameletBindingPhase]
-=== KameletBindingPhase(`string` alias)
-
-*Appears on:*
-
-* <<#_camel_apache_org_v1alpha1_KameletBindingStatus, KameletBindingStatus>>
-
-KameletBindingPhase --
-
-
-[#_camel_apache_org_v1alpha1_KameletBindingSpec]
-=== KameletBindingSpec
-
-*Appears on:*
-
-* <<#_camel_apache_org_v1alpha1_KameletBinding, KameletBinding>>
-
-KameletBindingSpec defines the binding between a source and a sink. It can include custom parameters and additional intermediate steps and error handling.
-
-[cols="2,2a",options="header"]
-|===
-|Field
-|Description
-
-|`integration` +
-github.com/apache/camel-k/v2/pkg/apis/camel/v1.IntegrationSpec
-|
-
-
-Integration is an optional integration used to specify custom parameters
-
-|`source` +
-*xref:#_camel_apache_org_v1alpha1_Endpoint[Endpoint]*
-|
-
-
-Source is the starting point of the integration defined by this binding
-
-|`sink` +
-*xref:#_camel_apache_org_v1alpha1_Endpoint[Endpoint]*
-|
-
-
-Sink is the destination of the integration defined by this binding
-
-|`errorHandler` +
-*xref:#_camel_apache_org_v1alpha1_ErrorHandlerSpec[ErrorHandlerSpec]*
-|
-
-
-ErrorHandler is an optional handler called upon an error occuring in the integration
-
-|`steps` +
-*xref:#_camel_apache_org_v1alpha1_Endpoint[[\]Endpoint]*
-|
-
-
-Steps contains an optional list of intermediate steps that are executed between the Source and the Sink
-
-|`replicas` +
-int32
-|
-
-
-Replicas is the number of desired replicas for the binding
-
-|`serviceAccountName` +
-string
-|
-
-
-Custom SA to use for the binding
-
-
-|===
-
-[#_camel_apache_org_v1alpha1_KameletBindingStatus]
-=== KameletBindingStatus
-
-*Appears on:*
-
-* <<#_camel_apache_org_v1alpha1_KameletBinding, KameletBinding>>
-
-KameletBindingStatus specify the status of a binding
-
-[cols="2,2a",options="header"]
-|===
-|Field
-|Description
-
-|`observedGeneration` +
-int64
-|
-
-
-ObservedGeneration is the most recent generation observed for this KameletBinding.
-
-|`phase` +
-*xref:#_camel_apache_org_v1alpha1_KameletBindingPhase[KameletBindingPhase]*
-|
-
-
-Phase --
-
-|`conditions` +
-*xref:#_camel_apache_org_v1alpha1_KameletBindingCondition[[\]KameletBindingCondition]*
-|
-
-
-Conditions --
-
-|`replicas` +
-int32
-|
-
-
-Replicas is the number of actual replicas of the binding
-
-|`selector` +
-string
-|
-
-
-Selector allows to identify pods belonging to the binding
-
-
-|===
-
[#_camel_apache_org_v1alpha1_KameletCondition]
=== KameletCondition
diff --git a/e2e/common/misc/kamelet_binding_test.go b/e2e/common/misc/kamelet_binding_test.go
index 79584263e..dfe3fb502 100644
--- a/e2e/common/misc/kamelet_binding_test.go
+++ b/e2e/common/misc/kamelet_binding_test.go
@@ -34,7 +34,7 @@ import (
"github.com/apache/camel-k/v2/pkg/util/kubernetes"
)
-func TestKameletBinding(t *testing.T) {
+func TestBinding(t *testing.T) {
RegisterTestingT(t)
// Error Handler testing
@@ -91,8 +91,8 @@ func TestKameletBinding(t *testing.T) {
})
})
- // Kamelet binding with traits testing
- t.Run("test kamelet binding with trait", func(t *testing.T) {
+ //Binding with traits testing
+ t.Run("testBinding with trait", func(t *testing.T) {
Expect(CreateTimerKamelet(ns, "my-own-timer-source")()).To(Succeed())
// Log sink kamelet exists from previous test
@@ -119,17 +119,17 @@ func TestKameletBinding(t *testing.T) {
Eventually(IntegrationLogs(ns, "kb-with-traits"), TestTimeoutShort).Should(ContainSubstring("integrationLogger"))
})
- // KameletBinding with wrong spec
- t.Run("test KameletBinding with wrong spec", func(t *testing.T) {
+ // Binding with wrong spec
+ t.Run("test Binding with wrong spec", func(t *testing.T) {
name := "bad-klb"
- kb := v1alpha1.NewKameletBinding(ns, name)
- kb.Spec = v1alpha1.KameletBindingSpec{}
+ kb := v1alpha1.NewBinding(ns, name)
+ kb.Spec = v1alpha1.BindingSpec{}
_, err := kubernetes.ReplaceResource(TestContext, TestClient(), &kb)
Eventually(err).Should(BeNil())
- Eventually(KameletBindingPhase(ns, name), TestTimeoutShort).Should(Equal(v1alpha1.KameletBindingPhaseError))
- Eventually(KameletBindingConditionStatus(ns, name, v1alpha1.KameletBindingConditionReady), TestTimeoutShort).ShouldNot(Equal(corev1.ConditionTrue))
- Eventually(KameletBindingCondition(ns, name, v1alpha1.KameletBindingIntegrationConditionError), TestTimeoutShort).Should(
- WithTransform(KameletBindingConditionMessage, And(
+ Eventually(BindingPhase(ns, name), TestTimeoutShort).Should(Equal(v1alpha1.BindingPhaseError))
+ Eventually(BindingConditionStatus(ns, name, v1alpha1.BindingConditionReady), TestTimeoutShort).ShouldNot(Equal(corev1.ConditionTrue))
+ Eventually(BindingCondition(ns, name, v1alpha1.BindingIntegrationConditionError), TestTimeoutShort).Should(
+ WithTransform(BindingConditionMessage, And(
ContainSubstring("could not determine source URI"),
ContainSubstring("no ref or URI specified in endpoint"),
)))
diff --git a/e2e/common/misc/scale_binding_test.go b/e2e/common/misc/scale_binding_test.go
index 0cc2b98cc..bb5b62db7 100644
--- a/e2e/common/misc/scale_binding_test.go
+++ b/e2e/common/misc/scale_binding_test.go
@@ -40,7 +40,7 @@ import (
"github.com/apache/camel-k/v2/pkg/util/openshift"
)
-func TestKameletBindingScale(t *testing.T) {
+func TestBindingScale(t *testing.T) {
RegisterTestingT(t)
ocp, err := openshift.IsOpenShift(TestClient())
@@ -54,36 +54,36 @@ func TestKameletBindingScale(t *testing.T) {
Expect(KamelBindWithID(operatorID, ns, "timer-source?message=HelloBinding", "log-sink", "--name", name).Execute()).To(Succeed())
Eventually(IntegrationPodPhase(ns, name), TestTimeoutLong).Should(Equal(corev1.PodRunning))
Eventually(IntegrationConditionStatus(ns, name, v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
- Eventually(KameletBindingConditionStatus(ns, name, v1alpha1.KameletBindingConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
+ Eventually(BindingConditionStatus(ns, name, v1alpha1.BindingConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
Eventually(IntegrationLogs(ns, name), TestTimeoutShort).Should(ContainSubstring("HelloBinding"))
t.Run("Update binding scale spec", func(t *testing.T) {
- Expect(ScaleKameletBinding(ns, name, 3)).To(Succeed())
+ Expect(ScaleBinding(ns, name, 3)).To(Succeed())
// Check the scale cascades into the Deployment scale
Eventually(IntegrationPods(ns, name), TestTimeoutShort).Should(HaveLen(3))
// Check it also cascades into the Integration scale subresource Status field
Eventually(IntegrationStatusReplicas(ns, name), TestTimeoutShort).
Should(gstruct.PointTo(BeNumerically("==", 3)))
- // Check it also cascades into the KameletBinding scale subresource Status field
- Eventually(KameletBindingStatusReplicas(ns, name), TestTimeoutShort).
+ // Check it also cascades into the Binding scale subresource Status field
+ Eventually(BindingStatusReplicas(ns, name), TestTimeoutShort).
Should(gstruct.PointTo(BeNumerically("==", 3)))
// Check the readiness condition becomes truthy back
Eventually(IntegrationConditionStatus(ns, name, v1.IntegrationConditionReady), TestTimeoutMedium).Should(Equal(corev1.ConditionTrue))
- // Finally check the readiness condition becomes truthy back on kamelet binding
- Eventually(KameletBindingConditionStatus(ns, name, v1alpha1.KameletBindingConditionReady), TestTimeoutMedium).Should(Equal(corev1.ConditionTrue))
+ // Finally check the readiness condition becomes truthy back onBinding
+ Eventually(BindingConditionStatus(ns, name, v1alpha1.BindingConditionReady), TestTimeoutMedium).Should(Equal(corev1.ConditionTrue))
})
- t.Run("Scale kamelet binding with polymorphic client", func(t *testing.T) {
+ t.Run("ScaleBinding with polymorphic client", func(t *testing.T) {
scaleClient, err := TestClient().ScalesClient()
Expect(err).To(BeNil())
// Patch the integration scale subresource
patch := "{\"spec\":{\"replicas\":2}}"
- _, err = scaleClient.Scales(ns).Patch(TestContext, v1alpha1.SchemeGroupVersion.WithResource("kameletbindings"), name, types.MergePatchType, []byte(patch), metav1.PatchOptions{})
+ _, err = scaleClient.Scales(ns).Patch(TestContext, v1alpha1.SchemeGroupVersion.WithResource("bindings"), name, types.MergePatchType, []byte(patch), metav1.PatchOptions{})
Expect(err).To(BeNil())
// Check the readiness condition is still truthy as down-scaling
- Expect(KameletBindingConditionStatus(ns, name, v1alpha1.KameletBindingConditionReady)()).To(Equal(corev1.ConditionTrue))
+ Expect(BindingConditionStatus(ns, name, v1alpha1.BindingConditionReady)()).To(Equal(corev1.ConditionTrue))
// Check the Integration scale subresource Spec field
Eventually(IntegrationSpecReplicas(ns, name), TestTimeoutShort).
Should(gstruct.PointTo(BeNumerically("==", 2)))
@@ -92,30 +92,30 @@ func TestKameletBindingScale(t *testing.T) {
// Check it cascades into the Integration scale subresource Status field
Eventually(IntegrationStatusReplicas(ns, name), TestTimeoutShort).
Should(gstruct.PointTo(BeNumerically("==", 2)))
- // Finally check it cascades into the KameletBinding scale subresource Status field
- Eventually(KameletBindingStatusReplicas(ns, name), TestTimeoutShort).
+ // Finally check it cascades into the Binding scale subresource Status field
+ Eventually(BindingStatusReplicas(ns, name), TestTimeoutShort).
Should(gstruct.PointTo(BeNumerically("==", 2)))
})
- t.Run("Scale kamelet binding with Camel K client", func(t *testing.T) {
+ t.Run("ScaleBinding with Camel K client", func(t *testing.T) {
camel, err := versioned.NewForConfig(TestClient().GetConfig())
Expect(err).To(BeNil())
// Getter
- bindingScale, err := camel.CamelV1alpha1().KameletBindings(ns).GetScale(TestContext, name, metav1.GetOptions{})
+ bindingScale, err := camel.CamelV1alpha1().Bindings(ns).GetScale(TestContext, name, metav1.GetOptions{})
Expect(err).To(BeNil())
Expect(bindingScale.Spec.Replicas).To(BeNumerically("==", 2))
Expect(bindingScale.Status.Replicas).To(BeNumerically("==", 2))
// Setter
bindingScale.Spec.Replicas = 1
- _, err = camel.CamelV1alpha1().KameletBindings(ns).UpdateScale(TestContext, name, bindingScale, metav1.UpdateOptions{})
+ _, err = camel.CamelV1alpha1().Bindings(ns).UpdateScale(TestContext, name, bindingScale, metav1.UpdateOptions{})
Expect(err).To(BeNil())
- // Check the readiness condition is still truthy as down-scaling in kamelet binding
- Expect(KameletBindingConditionStatus(ns, name, v1alpha1.KameletBindingConditionReady)()).To(Equal(corev1.ConditionTrue))
- // Check the KameletBinding scale subresource Spec field
- Eventually(KameletBindingSpecReplicas(ns, name), TestTimeoutShort).
+ // Check the readiness condition is still truthy as down-scaling inBinding
+ Expect(BindingConditionStatus(ns, name, v1alpha1.BindingConditionReady)()).To(Equal(corev1.ConditionTrue))
+ // Check the Binding scale subresource Spec field
+ Eventually(BindingSpecReplicas(ns, name), TestTimeoutShort).
Should(gstruct.PointTo(BeNumerically("==", 1)))
// Check the readiness condition is still truthy as down-scaling
Expect(IntegrationConditionStatus(ns, name, v1.IntegrationConditionReady)()).To(Equal(corev1.ConditionTrue))
diff --git a/e2e/common/traits/errored_trait_test.go b/e2e/common/traits/errored_trait_test.go
index cffc8f8be..4ddf3c108 100644
--- a/e2e/common/traits/errored_trait_test.go
+++ b/e2e/common/traits/errored_trait_test.go
@@ -51,17 +51,17 @@ func TestErroredTrait(t *testing.T) {
))
})
- t.Run("KameletBinding trait should fail", func(t *testing.T) {
+ t.Run("Binding trait should fail", func(t *testing.T) {
name := "kb-errored"
Expect(KamelBindWithID(operatorID, ns, "timer:foo", "log:bar",
"--name", name,
"-t", "kamelets.list=missing",
).Execute()).To(Succeed())
- // KameletBinding
- Eventually(KameletBindingPhase(ns, name), TestTimeoutShort).Should(Equal(v1alpha1.KameletBindingPhaseError))
- Eventually(KameletBindingConditionStatus(ns, name, v1alpha1.KameletBindingConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionFalse))
- Eventually(KameletBindingCondition(ns, name, v1alpha1.KameletBindingConditionReady), TestTimeoutShort).Should(
- WithTransform(KameletBindingConditionMessage, And(
+ // Binding
+ Eventually(BindingPhase(ns, name), TestTimeoutShort).Should(Equal(v1alpha1.BindingPhaseError))
+ Eventually(BindingConditionStatus(ns, name, v1alpha1.BindingConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionFalse))
+ Eventually(BindingCondition(ns, name, v1alpha1.BindingConditionReady), TestTimeoutShort).Should(
+ WithTransform(BindingConditionMessage, And(
ContainSubstring("error during trait customization"),
ContainSubstring("[missing] not found"),
)))
diff --git a/e2e/common/traits/health_test.go b/e2e/common/traits/health_test.go
index 9577b3658..918dc49ae 100644
--- a/e2e/common/traits/health_test.go
+++ b/e2e/common/traits/health_test.go
@@ -239,8 +239,8 @@ func TestHealthTrait(t *testing.T) {
return data["check.kind"].(string) == "READINESS" && data["route.status"].(string) == "Stopped" && data["route.id"].(string) == "binding"
}))
- Eventually(KameletBindingCondition(ns, name, camelv1alpha1.KameletBindingConditionReady), TestTimeoutLong).Should(
- Satisfy(func(c *camelv1alpha1.KameletBindingCondition) bool {
+ Eventually(BindingCondition(ns, name, camelv1alpha1.BindingConditionReady), TestTimeoutLong).Should(
+ Satisfy(func(c *camelv1alpha1.BindingCondition) bool {
if c.Status != corev1.ConditionFalse {
return false
}
diff --git a/e2e/commonwithcustominstall/operator_id_filtering_test.go b/e2e/commonwithcustominstall/operator_id_filtering_test.go
index 6a056e808..0ac5b6231 100644
--- a/e2e/commonwithcustominstall/operator_id_filtering_test.go
+++ b/e2e/commonwithcustominstall/operator_id_filtering_test.go
@@ -120,12 +120,12 @@ func TestOperatorIDFiltering(t *testing.T) {
Expect(Kamel("delete", "pre-built", "-n", ns).Execute()).To(Succeed())
})
- t.Run("Operators can run scoped kamelet bindings", func(t *testing.T) {
+ t.Run("Operators can run scopedBindings", func(t *testing.T) {
Expect(KamelBind(ns, "timer-source?message=Hello", "log-sink",
"--name", "klb", "--force").Execute()).To(Succeed())
Consistently(Integration(ns, "klb"), 10*time.Second).Should(BeNil())
- Expect(AssignKameletBindingToOperator(ns, "klb", operator1)).To(Succeed())
+ Expect(AssignBindingToOperator(ns, "klb", operator1)).To(Succeed())
Eventually(Integration(ns, "klb"), TestTimeoutShort).ShouldNot(BeNil())
Eventually(IntegrationPhase(ns, "klb"), TestTimeoutMedium).Should(Equal(v1.IntegrationPhaseRunning))
Eventually(IntegrationPodPhase(ns, "klb"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
diff --git a/e2e/commonwithcustominstall/promote_test.go b/e2e/commonwithcustominstall/promote_test.go
index 7b2936702..942603bca 100644
--- a/e2e/commonwithcustominstall/promote_test.go
+++ b/e2e/commonwithcustominstall/promote_test.go
@@ -148,7 +148,7 @@ func TestKamelCLIPromote(t *testing.T) {
Expect(IntegrationPodImage(nsProd, "timer-kamelet-usage")()).Should(Equal(IntegrationPodImage(nsDev, "timer-kamelet-usage")()))
})
- t.Run("no kamelet for kameletbinding in destination", func(t *testing.T) {
+ t.Run("no kamelet for binding in destination", func(t *testing.T) {
Expect(Kamel("promote", "-n", nsDev, "kb-timer-source-to-log", "--to", nsProd).Execute()).NotTo(Succeed())
})
@@ -160,7 +160,7 @@ func TestKamelCLIPromote(t *testing.T) {
// They must use the same image
Expect(IntegrationPodImage(nsProd, "kb-timer-source-to-log")()).Should(Equal(IntegrationPodImage(nsDev, "kb-timer-source-to-log")()))
- // Kamelet Binding update
+ //Binding update
Expect(KamelBindWithID(operatorDevID, nsDev, "kb-timer-source", "log:info", "-p", "source.message=my-kamelet-binding-rocks-again").Execute()).To(Succeed())
Eventually(IntegrationPodPhase(nsDev, "kb-timer-source-to-log"), TestTimeoutMedium).Should(Equal(corev1.PodRunning))
Eventually(IntegrationLogs(nsDev, "kb-timer-source-to-log"), TestTimeoutShort).Should(ContainSubstring("my-kamelet-binding-rocks-again"))
diff --git a/e2e/install/kustomize/common.go b/e2e/install/kustomize/common.go
index 64f9d9992..c58655b1d 100644
--- a/e2e/install/kustomize/common.go
+++ b/e2e/install/kustomize/common.go
@@ -36,7 +36,7 @@ import (
const (
// v1.Build, v1.Integration
// v1.IntegrationKit, v1.IntegrationPlatform
- // v1alpha1.Kamelet, v1alpha1.KameletBinding
+ // v1alpha1.Kamelet, v1alpha1.Binding
ExpectedCRDs = 6
// camel-k-operator, camel-k-operator-events,
diff --git a/e2e/knative/kamelet_test.go b/e2e/knative/kamelet_test.go
index 6f174a3ae..541d3614f 100644
--- a/e2e/knative/kamelet_test.go
+++ b/e2e/knative/kamelet_test.go
@@ -37,7 +37,7 @@ import (
"github.com/apache/camel-k/v2/pkg/apis/camel/v1alpha1"
)
-// Test that a KameletBinding can be changed and the changes are propagated to the Integration
+// Test that a Binding can be changed and the changes are propagated to the Integration
func TestKameletChange(t *testing.T) {
RegisterTestingT(t)
@@ -65,31 +65,31 @@ func TestKameletChange(t *testing.T) {
"trait.camel.apache.org/health.readiness-initial-delay": "10",
}
- // Create the KameletBinding
+ // Create the Binding
Expect(BindKameletTo(ns, timerBinding, annotations, from, to, map[string]string{"message": "message is Hello"}, map[string]string{})()).To(Succeed())
Eventually(IntegrationPodPhase(ns, timerBinding), TestTimeoutLong).Should(Equal(corev1.PodRunning))
Eventually(IntegrationConditionStatus(ns, "timer-binding", v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
Eventually(IntegrationLogs(ns, "test-kamelet-display"), TestTimeoutShort).Should(ContainSubstring("message is Hello"))
- Eventually(KameletBindingCondition(ns, timerBinding, v1alpha1.KameletBindingConditionReady), TestTimeoutMedium).Should(And(
- WithTransform(KameletBindingConditionStatusExtract, Equal(corev1.ConditionTrue)),
- WithTransform(KameletBindingConditionReason, Equal(v1.IntegrationConditionDeploymentReadyReason)),
- WithTransform(KameletBindingConditionMessage, Equal(fmt.Sprintf("1/1 ready replicas"))),
+ Eventually(BindingCondition(ns, timerBinding, v1alpha1.BindingConditionReady), TestTimeoutMedium).Should(And(
+ WithTransform(BindingConditionStatusExtract, Equal(corev1.ConditionTrue)),
+ WithTransform(BindingConditionReason, Equal(v1.IntegrationConditionDeploymentReadyReason)),
+ WithTransform(BindingConditionMessage, Equal(fmt.Sprintf("1/1 ready replicas"))),
))
- // Update the KameletBinding
+ // Update the Binding
Expect(BindKameletTo(ns, "timer-binding", annotations, from, to, map[string]string{"message": "message is Hi"}, map[string]string{})()).To(Succeed())
Eventually(IntegrationPodPhase(ns, "timer-binding"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
Eventually(IntegrationConditionStatus(ns, "timer-binding", v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
Eventually(IntegrationLogs(ns, "test-kamelet-display"), TestTimeoutShort).Should(ContainSubstring("message is Hi"))
- Eventually(KameletBindingCondition(ns, timerBinding, v1alpha1.KameletBindingConditionReady), TestTimeoutMedium).
+ Eventually(BindingCondition(ns, timerBinding, v1alpha1.BindingConditionReady), TestTimeoutMedium).
Should(And(
- WithTransform(KameletBindingConditionStatusExtract, Equal(corev1.ConditionTrue)),
- WithTransform(KameletBindingConditionReason, Equal(v1.IntegrationConditionDeploymentReadyReason)),
- WithTransform(KameletBindingConditionMessage, Equal("1/1 ready replicas")),
+ WithTransform(BindingConditionStatusExtract, Equal(corev1.ConditionTrue)),
+ WithTransform(BindingConditionReason, Equal(v1.IntegrationConditionDeploymentReadyReason)),
+ WithTransform(BindingConditionMessage, Equal("1/1 ready replicas")),
))
Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed())
diff --git a/e2e/support/test_support.go b/e2e/support/test_support.go
index 438272cc4..cf19f771e 100644
--- a/e2e/support/test_support.go
+++ b/e2e/support/test_support.go
@@ -1068,9 +1068,9 @@ func ScaleIntegration(ns string, name string, replicas int32) error {
})
}
-func KameletBinding(ns string, name string) func() *v1alpha1.KameletBinding {
- return func() *v1alpha1.KameletBinding {
- klb := v1alpha1.NewKameletBinding(ns, name)
+func Binding(ns string, name string) func() *v1alpha1.Binding {
+ return func() *v1alpha1.Binding {
+ klb := v1alpha1.NewBinding(ns, name)
key := ctrl.ObjectKey{
Namespace: ns,
Name: name,
@@ -1084,9 +1084,9 @@ func KameletBinding(ns string, name string) func() *v1alpha1.KameletBinding {
}
}
-func KameletBindingPhase(ns string, name string) func() v1alpha1.KameletBindingPhase {
- return func() v1alpha1.KameletBindingPhase {
- klb := KameletBinding(ns, name)()
+func BindingPhase(ns string, name string) func() v1alpha1.BindingPhase {
+ return func() v1alpha1.BindingPhase {
+ klb := Binding(ns, name)()
if klb == nil {
return ""
}
@@ -1094,9 +1094,9 @@ func KameletBindingPhase(ns string, name string) func() v1alpha1.KameletBindingP
}
}
-func KameletBindingSpecReplicas(ns string, name string) func() *int32 {
+func BindingSpecReplicas(ns string, name string) func() *int32 {
return func() *int32 {
- klb := KameletBinding(ns, name)()
+ klb := Binding(ns, name)()
if klb == nil {
return nil
}
@@ -1104,9 +1104,9 @@ func KameletBindingSpecReplicas(ns string, name string) func() *int32 {
}
}
-func KameletBindingStatusReplicas(ns string, name string) func() *int32 {
+func BindingStatusReplicas(ns string, name string) func() *int32 {
return func() *int32 {
- klb := KameletBinding(ns, name)()
+ klb := Binding(ns, name)()
if klb == nil {
return nil
}
@@ -1114,9 +1114,9 @@ func KameletBindingStatusReplicas(ns string, name string) func() *int32 {
}
}
-func KameletBindingCondition(ns string, name string, conditionType v1alpha1.KameletBindingConditionType) func() *v1alpha1.KameletBindingCondition {
- return func() *v1alpha1.KameletBindingCondition {
- kb := KameletBinding(ns, name)()
+func BindingCondition(ns string, name string, conditionType v1alpha1.BindingConditionType) func() *v1alpha1.BindingCondition {
+ return func() *v1alpha1.BindingCondition {
+ kb := Binding(ns, name)()
if kb == nil {
return nil
}
@@ -1128,32 +1128,32 @@ func KameletBindingCondition(ns string, name string, conditionType v1alpha1.Kame
}
}
-func KameletBindingConditionStatusExtract(c *v1alpha1.KameletBindingCondition) corev1.ConditionStatus {
+func BindingConditionStatusExtract(c *v1alpha1.BindingCondition) corev1.ConditionStatus {
if c == nil {
return ""
}
return c.Status
}
-func KameletBindingConditionReason(c *v1alpha1.KameletBindingCondition) string {
+func BindingConditionReason(c *v1alpha1.BindingCondition) string {
if c == nil {
return ""
}
return c.Reason
}
-func KameletBindingConditionMessage(c *v1alpha1.KameletBindingCondition) string {
+func BindingConditionMessage(c *v1alpha1.BindingCondition) string {
if c == nil {
return ""
}
return c.Message
}
-func KameletBindingConditionStatus(ns string, name string, conditionType v1alpha1.KameletBindingConditionType) func() corev1.ConditionStatus {
+func BindingConditionStatus(ns string, name string, conditionType v1alpha1.BindingConditionType) func() corev1.ConditionStatus {
return func() corev1.ConditionStatus {
- klb := KameletBinding(ns, name)()
+ klb := Binding(ns, name)()
if klb == nil {
- return "KameletBindingMissing"
+ return "BindingMissing"
}
c := klb.Status.GetCondition(conditionType)
if c == nil {
@@ -1163,10 +1163,10 @@ func KameletBindingConditionStatus(ns string, name string, conditionType v1alpha
}
}
-func UpdateKameletBinding(ns string, name string, upd func(it *v1alpha1.KameletBinding)) error {
- klb := KameletBinding(ns, name)()
+func UpdateBinding(ns string, name string, upd func(it *v1alpha1.Binding)) error {
+ klb := Binding(ns, name)()
if klb == nil {
- return fmt.Errorf("no kamelet binding named %s found", name)
+ return fmt.Errorf("noBinding named %s found", name)
}
target := klb.DeepCopy()
upd(target)
@@ -1180,16 +1180,16 @@ func UpdateKameletBinding(ns string, name string, upd func(it *v1alpha1.KameletB
return TestClient().Patch(TestContext, target, ctrl.RawPatch(types.MergePatchType, p))
}
-func ScaleKameletBinding(ns string, name string, replicas int32) error {
- return UpdateKameletBinding(ns, name, func(klb *v1alpha1.KameletBinding) {
+func ScaleBinding(ns string, name string, replicas int32) error {
+ return UpdateBinding(ns, name, func(klb *v1alpha1.Binding) {
klb.Spec.Replicas = &replicas
})
}
-func AssignKameletBindingToOperator(ns, name, operator string) error {
- klb := KameletBinding(ns, name)()
+func AssignBindingToOperator(ns, name, operator string) error {
+ klb := Binding(ns, name)()
if klb == nil {
- return fmt.Errorf("cannot assign kamelet binding %q to operator: kamelet binding not found", name)
+ return fmt.Errorf("cannot assignBinding %q to operator:Binding not found", name)
}
klb.SetOperatorID(operator)
@@ -1863,7 +1863,7 @@ func CRDs() func() []metav1.APIResource {
reflect.TypeOf(v1.IntegrationKit{}).Name(),
reflect.TypeOf(v1.IntegrationPlatform{}).Name(),
reflect.TypeOf(v1alpha1.Kamelet{}).Name(),
- reflect.TypeOf(v1alpha1.KameletBinding{}).Name(),
+ reflect.TypeOf(v1alpha1.Binding{}).Name(),
}
versions := []string{"v1", "v1alpha1"}
@@ -2308,9 +2308,9 @@ func BindKameletTo(ns, name string, annotations map[string]string, from, to core
func BindKameletToWithErrorHandler(ns, name string, annotations map[string]string, from, to corev1.ObjectReference,
sourceProperties, sinkProperties map[string]string, errorHandler map[string]interface{}) func() error {
return func() error {
- kb := v1alpha1.NewKameletBinding(ns, name)
+ kb := v1alpha1.NewBinding(ns, name)
kb.Annotations = annotations
- kb.Spec = v1alpha1.KameletBindingSpec{
+ kb.Spec = v1alpha1.BindingSpec{
Source: v1alpha1.Endpoint{
Ref: &from,
Properties: asEndpointProperties(sourceProperties),
diff --git a/e2e/yaks/common/kamelet-beans/kamelet.feature b/e2e/yaks/common/kamelet-beans/kamelet.feature
index 892f534ef..25fcb9e97 100644
--- a/e2e/yaks/common/kamelet-beans/kamelet.feature
+++ b/e2e/yaks/common/kamelet-beans/kamelet.feature
@@ -9,7 +9,7 @@ Feature: Kamelets can declare local beans
Scenario: Kamelets templates can use beans
Given bind Kamelet beans-source to uri log:info
- When create KameletBinding binding
- Then KameletBinding binding should be available
+ When create Binding binding
+ Then Binding binding should be available
Then Camel K integration binding should be running
Then Camel K integration binding should print Bean time is 0!
diff --git a/e2e/yaks/common/kamelet-binding-autoload/kamelet-autoload-specific.feature b/e2e/yaks/common/kamelet-binding-autoload/kamelet-autoload-specific.feature
index 635bbee13..6cc3c633a 100644
--- a/e2e/yaks/common/kamelet-binding-autoload/kamelet-autoload-specific.feature
+++ b/e2e/yaks/common/kamelet-binding-autoload/kamelet-autoload-specific.feature
@@ -7,17 +7,17 @@ Feature: Camel K can load specific secrets for Kamelets
| maxAttempts | 40 |
| delayBetweenAttempts | 3000 |
- Scenario: KameletBinding can load specific settings for Kamelet
+ Scenario: Binding can load specific settings for Kamelet
Given create Kubernetes service stub-service-2 with target port 8080
And bind Kamelet timer-source to uri http://stub-service-2.${YAKS_NAMESPACE}.svc.cluster.local/specific
- And KameletBinding source properties
+ And Binding source properties
| id | specific |
- When create KameletBinding binding-specific
- Then KameletBinding binding-specific should be available
+ When create Binding binding-specific
+ Then Binding binding-specific should be available
Scenario: Verify specific binding
Given HTTP server "stub-service-2"
And HTTP server timeout is 600000 ms
Then expect HTTP request body: specific
And receive POST /specific
- And delete KameletBinding binding-specific
+ And delete Binding binding-specific
diff --git a/e2e/yaks/common/kamelet-binding-autoload/kamelet-autoload.feature b/e2e/yaks/common/kamelet-binding-autoload/kamelet-autoload.feature
index d5cc6ba81..0c567d1e6 100644
--- a/e2e/yaks/common/kamelet-binding-autoload/kamelet-autoload.feature
+++ b/e2e/yaks/common/kamelet-binding-autoload/kamelet-autoload.feature
@@ -7,15 +7,15 @@ Feature: Camel K can load default secrets for Kamelets
| maxAttempts | 40 |
| delayBetweenAttempts | 3000 |
- Scenario: KameletBinding can load default settings for Kamelet
+ Scenario: Binding can load default settings for Kamelet
Given create Kubernetes service stub-service with target port 8080
And bind Kamelet timer-source to uri http://stub-service.${YAKS_NAMESPACE}.svc.cluster.local/default
- When create KameletBinding binding
- Then KameletBinding binding should be available
+ When create Binding binding
+ Then Binding binding should be available
Scenario: Verify default binding
Given HTTP server "stub-service"
And HTTP server timeout is 600000 ms
Then expect HTTP request body: default
And receive POST /default
- And delete KameletBinding binding
+ And delete Binding binding
diff --git a/e2e/yaks/common/kamelet-binding-broker/kamelet.feature b/e2e/yaks/common/kamelet-binding-broker/kamelet.feature
index c4d10c636..110cbd889 100644
--- a/e2e/yaks/common/kamelet-binding-broker/kamelet.feature
+++ b/e2e/yaks/common/kamelet-binding-broker/kamelet.feature
@@ -5,6 +5,6 @@ Feature: Camel K can bind Kamelets to the broker
| maxAttempts | 40 |
| delayBetweenAttempts | 3000 |
- Scenario: Sending event to the custom broker with KameletBinding
+ Scenario: Sending event to the custom broker with Binding
Given Camel K integration logger-sink-binding is running
Then Camel K integration logger-sink-binding should print message: Hello Custom Event from sample-broker
diff --git a/e2e/yaks/common/kamelet-binding-broker/logger-sink-binding.yaml b/e2e/yaks/common/kamelet-binding-broker/logger-sink-binding.yaml
index f155cb71a..a3393a426 100644
--- a/e2e/yaks/common/kamelet-binding-broker/logger-sink-binding.yaml
+++ b/e2e/yaks/common/kamelet-binding-broker/logger-sink-binding.yaml
@@ -16,7 +16,7 @@
# ---------------------------------------------------------------------------
apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
name: logger-sink-binding
spec:
diff --git a/e2e/yaks/common/kamelet-binding-broker/timer-source-binding.yaml b/e2e/yaks/common/kamelet-binding-broker/timer-source-binding.yaml
index d14bd263c..45cc64084 100644
--- a/e2e/yaks/common/kamelet-binding-broker/timer-source-binding.yaml
+++ b/e2e/yaks/common/kamelet-binding-broker/timer-source-binding.yaml
@@ -16,7 +16,7 @@
# ---------------------------------------------------------------------------
apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
name: timer-source-binding
spec:
diff --git a/e2e/yaks/common/kamelet-binding-broker/yaks-config.yaml b/e2e/yaks/common/kamelet-binding-broker/yaks-config.yaml
index 3369a0076..ff595de99 100644
--- a/e2e/yaks/common/kamelet-binding-broker/yaks-config.yaml
+++ b/e2e/yaks/common/kamelet-binding-broker/yaks-config.yaml
@@ -27,8 +27,8 @@ pre:
kubectl apply -f timer-source-binding.yaml -n $YAKS_NAMESPACE
kubectl apply -f logger-sink-binding.yaml -n $YAKS_NAMESPACE
- kubectl wait kameletbinding timer-source-binding --for=condition=Ready --timeout=15m -n $YAKS_NAMESPACE
- kubectl wait kameletbinding logger-sink-binding --for=condition=Ready --timeout=15m -n $YAKS_NAMESPACE
+ kubectl wait binding timer-source-binding --for=condition=Ready --timeout=15m -n $YAKS_NAMESPACE
+ kubectl wait binding logger-sink-binding --for=condition=Ready --timeout=15m -n $YAKS_NAMESPACE
post:
- name: print dump
if: env:CI=true && failure()
diff --git a/e2e/yaks/common/kamelet-binding-http/timer-source-binding-display.yaml b/e2e/yaks/common/kamelet-binding-http/timer-source-binding-display.yaml
index 91cbf376e..b4efc7684 100644
--- a/e2e/yaks/common/kamelet-binding-http/timer-source-binding-display.yaml
+++ b/e2e/yaks/common/kamelet-binding-http/timer-source-binding-display.yaml
@@ -16,7 +16,7 @@
# ---------------------------------------------------------------------------
apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
name: timer-source-binding-display
spec:
diff --git a/e2e/yaks/common/kamelet-binding-http/yaks-config.yaml b/e2e/yaks/common/kamelet-binding-http/yaks-config.yaml
index 1922bf7bb..c292a9a11 100644
--- a/e2e/yaks/common/kamelet-binding-http/yaks-config.yaml
+++ b/e2e/yaks/common/kamelet-binding-http/yaks-config.yaml
@@ -25,7 +25,7 @@ pre:
kamel run display.groovy -w -n $YAKS_NAMESPACE
cat timer-source-binding-display.yaml | sed 's/{namespace}/'"${YAKS_NAMESPACE}"'/' | kubectl apply -n $YAKS_NAMESPACE -f -
- kubectl wait kameletbinding timer-source-binding-display --for=condition=Ready --timeout=15m -n $YAKS_NAMESPACE
+ kubectl wait binding timer-source-binding-display --for=condition=Ready --timeout=15m -n $YAKS_NAMESPACE
post:
- name: print dump
if: env:CI=true && failure()
diff --git a/e2e/yaks/common/kamelet-binding-property-encoding/properties-binding.yaml b/e2e/yaks/common/kamelet-binding-property-encoding/properties-binding.yaml
index b4b39cb05..8a67c48df 100644
--- a/e2e/yaks/common/kamelet-binding-property-encoding/properties-binding.yaml
+++ b/e2e/yaks/common/kamelet-binding-property-encoding/properties-binding.yaml
@@ -15,7 +15,7 @@
# limitations under the License.
# ---------------------------------------------------------------------------
-kind: KameletBinding
+kind: Binding
apiVersion: camel.apache.org/v1alpha1
metadata:
name: properties-binding
diff --git a/e2e/yaks/common/kamelet-binding-property-encoding/properties.feature b/e2e/yaks/common/kamelet-binding-property-encoding/properties.feature
index c3afc634f..7b1b961f8 100644
--- a/e2e/yaks/common/kamelet-binding-property-encoding/properties.feature
+++ b/e2e/yaks/common/kamelet-binding-property-encoding/properties.feature
@@ -23,4 +23,4 @@ Feature: Ensure that Kamelets support multiline configuration
"""
And expect HTTP request header: Content-Type="application/json;charset=UTF-8"
And receive POST /events
- And delete KameletBinding properties-binding
+ And delete Binding properties-binding
diff --git a/e2e/yaks/common/kamelet-binding/kamelet.feature b/e2e/yaks/common/kamelet-binding/kamelet.feature
index 107a80c92..c8e1c1402 100644
--- a/e2e/yaks/common/kamelet-binding/kamelet.feature
+++ b/e2e/yaks/common/kamelet-binding/kamelet.feature
@@ -5,6 +5,6 @@ Feature: Camel K can bind Kamelets
| maxAttempts | 40 |
| delayBetweenAttempts | 3000 |
- Scenario: Running integration using a simple Kamelet with KameletBinding
+ Scenario: Running integration using a simple Kamelet with Binding
Given Camel K integration logger-sink-binding is running
Then Camel K integration logger-sink-binding should print message: Hello Kamelets
diff --git a/e2e/yaks/common/kamelet-binding/logger-sink-binding.yaml b/e2e/yaks/common/kamelet-binding/logger-sink-binding.yaml
index 237f8ca01..34c9f8bf5 100644
--- a/e2e/yaks/common/kamelet-binding/logger-sink-binding.yaml
+++ b/e2e/yaks/common/kamelet-binding/logger-sink-binding.yaml
@@ -16,7 +16,7 @@
# ---------------------------------------------------------------------------
apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
name: logger-sink-binding
spec:
diff --git a/e2e/yaks/common/kamelet-binding/timer-source-binding.yaml b/e2e/yaks/common/kamelet-binding/timer-source-binding.yaml
index 536e63296..eb7b7048b 100644
--- a/e2e/yaks/common/kamelet-binding/timer-source-binding.yaml
+++ b/e2e/yaks/common/kamelet-binding/timer-source-binding.yaml
@@ -16,7 +16,7 @@
# ---------------------------------------------------------------------------
apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
name: timer-source-binding
spec:
diff --git a/e2e/yaks/common/kamelet-binding/yaks-config.yaml b/e2e/yaks/common/kamelet-binding/yaks-config.yaml
index b236c3435..0c95cc4d0 100644
--- a/e2e/yaks/common/kamelet-binding/yaks-config.yaml
+++ b/e2e/yaks/common/kamelet-binding/yaks-config.yaml
@@ -29,8 +29,8 @@ pre:
kubectl apply -f timer-source-binding.yaml -n $YAKS_NAMESPACE
kubectl apply -f logger-sink-binding.yaml -n $YAKS_NAMESPACE
- kubectl wait kameletbinding timer-source-binding --for=condition=Ready --timeout=10m -n $YAKS_NAMESPACE
- kubectl wait kameletbinding logger-sink-binding --for=condition=Ready --timeout=10m -n $YAKS_NAMESPACE
+ kubectl wait binding timer-source-binding --for=condition=Ready --timeout=10m -n $YAKS_NAMESPACE
+ kubectl wait binding logger-sink-binding --for=condition=Ready --timeout=10m -n $YAKS_NAMESPACE
post:
- name: print dump
if: env:CI=true && failure()
diff --git a/e2e/yaks/common/kamelet-data-types/event-binding.yaml b/e2e/yaks/common/kamelet-data-types/event-binding.yaml
index feb20a7c3..c08362f3c 100644
--- a/e2e/yaks/common/kamelet-data-types/event-binding.yaml
+++ b/e2e/yaks/common/kamelet-data-types/event-binding.yaml
@@ -16,7 +16,7 @@
# ---------------------------------------------------------------------------
apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
name: event-binding
spec:
diff --git a/e2e/yaks/common/kamelet-data-types/kamelet-data-types.feature b/e2e/yaks/common/kamelet-data-types/kamelet-data-types.feature
index 443366db0..2ea9c2ff9 100644
--- a/e2e/yaks/common/kamelet-data-types/kamelet-data-types.feature
+++ b/e2e/yaks/common/kamelet-data-types/kamelet-data-types.feature
@@ -6,13 +6,13 @@ Feature: Kamelets with data types
| delayBetweenAttempts | 4000 |
Scenario: Kamelet event data type conversion
- Given load KameletBinding event-binding.yaml
+ Given load Binding event-binding.yaml
Given Camel K integration event-binding is running
Then Camel K integration event-binding should print BodyType: byte[], Body: Hello from Camel K!
Then Camel K integration event-binding should print BodyType: String, Body: Hello from Camel K!
Scenario: Kamelet timer-to-log conversion
- Given load KameletBinding timer-to-log.yaml
+ Given load Binding timer-to-log.yaml
Given Camel K integration timer-to-log is running
Then Camel K integration timer-to-log should print BodyType: byte[], Body: Hello from Camel K!
Then Camel K integration timer-to-log should print BodyType: String, Body: Hello from Camel K!
diff --git a/e2e/yaks/common/kamelet-data-types/timer-to-log.yaml b/e2e/yaks/common/kamelet-data-types/timer-to-log.yaml
index 8e544ae81..cbff3417b 100644
--- a/e2e/yaks/common/kamelet-data-types/timer-to-log.yaml
+++ b/e2e/yaks/common/kamelet-data-types/timer-to-log.yaml
@@ -16,7 +16,7 @@
# ---------------------------------------------------------------------------
apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
name: timer-to-log
spec:
diff --git a/e2e/yaks/common/kamelet-no-properties/kamelet-no-props.feature b/e2e/yaks/common/kamelet-no-properties/kamelet-no-props.feature
index 6f6b42afc..7815a17d3 100644
--- a/e2e/yaks/common/kamelet-no-properties/kamelet-no-props.feature
+++ b/e2e/yaks/common/kamelet-no-properties/kamelet-no-props.feature
@@ -22,7 +22,7 @@ from:
Scenario: Bind Kamelet to service
Given create Kubernetes service greeting-service with target port 8080
And bind Kamelet no-props-source to uri log:info
- When create KameletBinding no-props-source-uri
- Then KameletBinding no-props-source-uri should be available
+ When create Binding no-props-source-uri
+ Then Binding no-props-source-uri should be available
Then Camel K integration no-props-source-uri should be running
Then Camel K integration no-props-source-uri should print Hello World
diff --git a/e2e/yaks/common/kamelet-steps/steps-binding.feature b/e2e/yaks/common/kamelet-steps/steps-binding.feature
index a9980cfc3..35d71fced 100644
--- a/e2e/yaks/common/kamelet-steps/steps-binding.feature
+++ b/e2e/yaks/common/kamelet-steps/steps-binding.feature
@@ -1,4 +1,4 @@
-Feature: KameletBindings can have multiple processing steps
+Feature: Bindings can have multiple processing steps
Background:
Given Camel K resource polling configuration
diff --git a/e2e/yaks/common/kamelet-steps/steps-binding.yaml b/e2e/yaks/common/kamelet-steps/steps-binding.yaml
index b2956bfbb..17d6d3903 100644
--- a/e2e/yaks/common/kamelet-steps/steps-binding.yaml
+++ b/e2e/yaks/common/kamelet-steps/steps-binding.yaml
@@ -16,7 +16,7 @@
# ---------------------------------------------------------------------------
apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
name: steps-binding
spec:
diff --git a/e2e/yaks/common/kamelet-steps/yaks-config.yaml b/e2e/yaks/common/kamelet-steps/yaks-config.yaml
index 2314a59fb..1b4d1a6fa 100644
--- a/e2e/yaks/common/kamelet-steps/yaks-config.yaml
+++ b/e2e/yaks/common/kamelet-steps/yaks-config.yaml
@@ -25,7 +25,7 @@ pre:
kubectl apply -f prefix-action.kamelet.yaml -n $YAKS_NAMESPACE
kubectl apply -f steps-binding.yaml -n $YAKS_NAMESPACE
- kubectl wait kameletbinding steps-binding --for=condition=Ready --timeout=10m -n $YAKS_NAMESPACE
+ kubectl wait binding steps-binding --for=condition=Ready --timeout=10m -n $YAKS_NAMESPACE
post:
- name: print dump
if: env:CI=true && failure()
diff --git a/config/crd/bases/camel.apache.org_kameletbindings.yaml b/helm/camel-k/crds/crd-binding.yaml
similarity index 99%
rename from config/crd/bases/camel.apache.org_kameletbindings.yaml
rename to helm/camel-k/crds/crd-binding.yaml
index bbec3c111..b1b019aa4 100644
--- a/config/crd/bases/camel.apache.org_kameletbindings.yaml
+++ b/helm/camel-k/crds/crd-binding.yaml
@@ -23,23 +23,23 @@ metadata:
creationTimestamp: null
labels:
app: camel-k
- name: kameletbindings.camel.apache.org
+ name: bindings.camel.apache.org
spec:
group: camel.apache.org
names:
categories:
- kamel
- camel
- kind: KameletBinding
- listKind: KameletBindingList
- plural: kameletbindings
+ kind: Binding
+ listKind: BindingList
+ plural: bindings
shortNames:
- klb
- singular: kameletbinding
+ singular: binding
scope: Namespaced
versions:
- additionalPrinterColumns:
- - description: The Kamelet Binding phase
+ - description: TheBinding phase
jsonPath: .status.phase
name: Phase
type: string
@@ -50,7 +50,7 @@ spec:
name: v1alpha1
schema:
openAPIV3Schema:
- description: KameletBinding is the Schema for the kamelets binding API
+ description: Binding is the Schema for the kamelets binding API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
@@ -65,7 +65,7 @@ spec:
metadata:
type: object
spec:
- description: the specification of a KameletBinding
+ description: the specification of a Binding
properties:
errorHandler:
description: ErrorHandler is an optional handler called upon an error
@@ -8410,12 +8410,12 @@ spec:
type: array
type: object
status:
- description: the status of a KameletBinding
+ description: the status of a Binding
properties:
conditions:
description: Conditions --
items:
- description: KameletBindingCondition describes the state of a resource
+ description: BindingCondition describes the state of a resource
at a certain point.
properties:
lastTransitionTime:
@@ -8498,7 +8498,7 @@ spec:
description: Status of the condition, one of True, False, Unknown.
type: string
type:
- description: Type of kameletBinding condition.
+ description: Type of binding condition.
type: string
required:
- status
@@ -8507,7 +8507,7 @@ spec:
type: array
observedGeneration:
description: ObservedGeneration is the most recent generation observed
- for this KameletBinding.
+ for this Binding.
format: int64
type: integer
phase:
diff --git a/helm/camel-k/crds/crd-kamelet-binding.yaml b/helm/camel-k/crds/crd-kamelet-binding.yaml
index bbec3c111..b1b019aa4 100644
--- a/helm/camel-k/crds/crd-kamelet-binding.yaml
+++ b/helm/camel-k/crds/crd-kamelet-binding.yaml
@@ -23,23 +23,23 @@ metadata:
creationTimestamp: null
labels:
app: camel-k
- name: kameletbindings.camel.apache.org
+ name: bindings.camel.apache.org
spec:
group: camel.apache.org
names:
categories:
- kamel
- camel
- kind: KameletBinding
- listKind: KameletBindingList
- plural: kameletbindings
+ kind: Binding
+ listKind: BindingList
+ plural: bindings
shortNames:
- klb
- singular: kameletbinding
+ singular: binding
scope: Namespaced
versions:
- additionalPrinterColumns:
- - description: The Kamelet Binding phase
+ - description: TheBinding phase
jsonPath: .status.phase
name: Phase
type: string
@@ -50,7 +50,7 @@ spec:
name: v1alpha1
schema:
openAPIV3Schema:
- description: KameletBinding is the Schema for the kamelets binding API
+ description: Binding is the Schema for the kamelets binding API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
@@ -65,7 +65,7 @@ spec:
metadata:
type: object
spec:
- description: the specification of a KameletBinding
+ description: the specification of a Binding
properties:
errorHandler:
description: ErrorHandler is an optional handler called upon an error
@@ -8410,12 +8410,12 @@ spec:
type: array
type: object
status:
- description: the status of a KameletBinding
+ description: the status of a Binding
properties:
conditions:
description: Conditions --
items:
- description: KameletBindingCondition describes the state of a resource
+ description: BindingCondition describes the state of a resource
at a certain point.
properties:
lastTransitionTime:
@@ -8498,7 +8498,7 @@ spec:
description: Status of the condition, one of True, False, Unknown.
type: string
type:
- description: Type of kameletBinding condition.
+ description: Type of binding condition.
type: string
required:
- status
@@ -8507,7 +8507,7 @@ spec:
type: array
observedGeneration:
description: ObservedGeneration is the most recent generation observed
- for this KameletBinding.
+ for this Binding.
format: int64
type: integer
phase:
diff --git a/helm/camel-k/templates/operator-cluster-roles.yaml b/helm/camel-k/templates/operator-cluster-roles.yaml
index 46ca9c777..e1dccd478 100644
--- a/helm/camel-k/templates/operator-cluster-roles.yaml
+++ b/helm/camel-k/templates/operator-cluster-roles.yaml
@@ -35,7 +35,7 @@ rules:
- integrationkits
- integrationplatforms
- integrations
- - kameletbindings
+ - bindings
- kamelets
verbs:
- create
@@ -55,8 +55,8 @@ rules:
- integrationplatforms/status
- integrations/scale
- integrations/status
- - kameletbindings/scale
- - kameletbindings/status
+ - bindings/scale
+ - bindings/status
- kamelets/status
verbs:
- get
@@ -81,7 +81,7 @@ rules:
- integrationkits
- integrationplatforms
- integrations
- - kameletbindings
+ - bindings
- kamelets
verbs:
- create
@@ -105,8 +105,8 @@ rules:
- integrationplatforms/status
- integrations/scale
- integrations/status
- - kameletbindings/status
- - kameletbindings/scale
+ - bindings/status
+ - bindings/scale
- kamelets/status
verbs:
- get
@@ -403,7 +403,7 @@ rules:
- integrationkits/finalizers
- integrationplatforms/finalizers
- integrations/finalizers
- - kameletbindings/finalizers
+ - bindings/finalizers
verbs:
- update
- apiGroups:
diff --git a/helm/camel-k/templates/operator-role.yaml b/helm/camel-k/templates/operator-role.yaml
index 8b6badcda..0c52d01d0 100644
--- a/helm/camel-k/templates/operator-role.yaml
+++ b/helm/camel-k/templates/operator-role.yaml
@@ -32,7 +32,7 @@ rules:
- integrationkits
- integrationplatforms
- integrations
- - kameletbindings
+ - bindings
- kamelets
verbs:
- create
@@ -56,8 +56,8 @@ rules:
- integrationplatforms/status
- integrations/scale
- integrations/status
- - kameletbindings/status
- - kameletbindings/scale
+ - bindings/status
+ - bindings/scale
- kamelets/status
verbs:
- get
@@ -256,7 +256,7 @@ rules:
- integrationkits/finalizers
- integrationplatforms/finalizers
- integrations/finalizers
- - kameletbindings/finalizers
+ - bindings/finalizers
verbs:
- update
- apiGroups:
diff --git a/pkg/apis/camel/v1alpha1/kamelet_binding_types.go b/pkg/apis/camel/v1alpha1/binding_types.go
similarity index 71%
rename from pkg/apis/camel/v1alpha1/kamelet_binding_types.go
rename to pkg/apis/camel/v1alpha1/binding_types.go
index fb1e44bc4..8e2857df5 100644
--- a/pkg/apis/camel/v1alpha1/kamelet_binding_types.go
+++ b/pkg/apis/camel/v1alpha1/binding_types.go
@@ -26,27 +26,27 @@ import (
// +genclient
// +kubebuilder:object:root=true
-// +kubebuilder:resource:path=kameletbindings,scope=Namespaced,shortName=klb,categories=kamel;camel
+// +kubebuilder:resource:path=bindings,scope=Namespaced,shortName=klb,categories=kamel;camel
// +kubebuilder:subresource:status
// +genclient:method=GetScale,verb=get,subresource=scale,result=k8s.io/api/autoscaling/v1.Scale
// +genclient:method=UpdateScale,verb=update,subresource=scale,input=k8s.io/api/autoscaling/v1.Scale,result=k8s.io/api/autoscaling/v1.Scale
// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector
-// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`,description="The Kamelet Binding phase"
+// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`,description="TheBinding phase"
// +kubebuilder:printcolumn:name="Replicas",type=integer,JSONPath=`.status.replicas`,description="The number of pods"
-// KameletBinding is the Schema for the kamelets binding API
-type KameletBinding struct {
+// Binding is the Schema for the kamelets binding API
+type Binding struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
- // the specification of a KameletBinding
- Spec KameletBindingSpec `json:"spec,omitempty"`
- // the status of a KameletBinding
- Status KameletBindingStatus `json:"status,omitempty"`
+ // the specification of a Binding
+ Spec BindingSpec `json:"spec,omitempty"`
+ // the status of a Binding
+ Status BindingStatus `json:"status,omitempty"`
}
-// KameletBindingSpec defines the binding between a source and a sink. It can include custom parameters and additional intermediate steps and error handling.
-type KameletBindingSpec struct {
+// BindingSpec defines the binding between a source and a sink. It can include custom parameters and additional intermediate steps and error handling.
+type BindingSpec struct {
// Integration is an optional integration used to specify custom parameters
Integration *v1.IntegrationSpec `json:"integration,omitempty"`
// Source is the starting point of the integration defined by this binding
@@ -97,24 +97,24 @@ type EndpointProperties struct {
RawMessage `json:",inline"`
}
-// KameletBindingStatus specify the status of a binding
-type KameletBindingStatus struct {
- // ObservedGeneration is the most recent generation observed for this KameletBinding.
+// BindingStatus specify the status of a binding
+type BindingStatus struct {
+ // ObservedGeneration is the most recent generation observed for this Binding.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Phase --
- Phase KameletBindingPhase `json:"phase,omitempty"`
+ Phase BindingPhase `json:"phase,omitempty"`
// Conditions --
- Conditions []KameletBindingCondition `json:"conditions,omitempty"`
+ Conditions []BindingCondition `json:"conditions,omitempty"`
// Replicas is the number of actual replicas of the binding
Replicas *int32 `json:"replicas,omitempty"`
// Selector allows to identify pods belonging to the binding
Selector string `json:"selector,omitempty"`
}
-// KameletBindingCondition describes the state of a resource at a certain point.
-type KameletBindingCondition struct {
- // Type of kameletBinding condition.
- Type KameletBindingConditionType `json:"type"`
+// BindingCondition describes the state of a resource at a certain point.
+type BindingCondition struct {
+ // Type of binding condition.
+ Type BindingConditionType `json:"type"`
// Status of the condition, one of True, False, Unknown.
Status corev1.ConditionStatus `json:"status"`
// The last time this condition was updated.
@@ -129,38 +129,38 @@ type KameletBindingCondition struct {
Pods []v1.PodCondition `json:"pods,omitempty"`
}
-// KameletBindingConditionType --
-type KameletBindingConditionType string
+// BindingConditionType --
+type BindingConditionType string
const (
- // KameletBindingConditionReady --
- KameletBindingConditionReady KameletBindingConditionType = "Ready"
- // KameletBindingIntegrationConditionError is used to report the error on the generated Integration
- KameletBindingIntegrationConditionError KameletBindingConditionType = "IntegrationError"
+ // BindingConditionReady --
+ BindingConditionReady BindingConditionType = "Ready"
+ // BindingIntegrationConditionError is used to report the error on the generated Integration
+ BindingIntegrationConditionError BindingConditionType = "IntegrationError"
)
-// KameletBindingPhase --
-type KameletBindingPhase string
+// BindingPhase --
+type BindingPhase string
const (
- // KameletBindingKind --
- KameletBindingKind string = "KameletBinding"
-
- // KameletBindingPhaseNone --
- KameletBindingPhaseNone KameletBindingPhase = ""
- // KameletBindingPhaseCreating --
- KameletBindingPhaseCreating KameletBindingPhase = "Creating"
- // KameletBindingPhaseError --
- KameletBindingPhaseError KameletBindingPhase = "Error"
- // KameletBindingPhaseReady --
- KameletBindingPhaseReady KameletBindingPhase = "Ready"
+ // BindingKind --
+ BindingKind string = "Binding"
+
+ // BindingPhaseNone --
+ BindingPhaseNone BindingPhase = ""
+ // BindingPhaseCreating --
+ BindingPhaseCreating BindingPhase = "Creating"
+ // BindingPhaseError --
+ BindingPhaseError BindingPhase = "Error"
+ // BindingPhaseReady --
+ BindingPhaseReady BindingPhase = "Ready"
)
// +kubebuilder:object:root=true
-// KameletBindingList contains a list of KameletBinding
-type KameletBindingList struct {
+// BindingList contains a list of Binding
+type BindingList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
- Items []KameletBinding `json:"items"`
+ Items []Binding `json:"items"`
}
diff --git a/pkg/apis/camel/v1alpha1/kamelet_binding_types_support.go b/pkg/apis/camel/v1alpha1/binding_types_support.go
similarity index 74%
rename from pkg/apis/camel/v1alpha1/kamelet_binding_types_support.go
rename to pkg/apis/camel/v1alpha1/binding_types_support.go
index 20d55df1b..c44b8a2d3 100644
--- a/pkg/apis/camel/v1alpha1/kamelet_binding_types_support.go
+++ b/pkg/apis/camel/v1alpha1/binding_types_support.go
@@ -28,7 +28,7 @@ import (
)
// GetConditions --
-func (in *KameletBindingStatus) GetConditions() []v1.ResourceCondition {
+func (in *BindingStatus) GetConditions() []v1.ResourceCondition {
res := make([]v1.ResourceCondition, 0, len(in.Conditions))
for _, c := range in.Conditions {
res = append(res, c)
@@ -37,42 +37,42 @@ func (in *KameletBindingStatus) GetConditions() []v1.ResourceCondition {
}
// GetType --
-func (c KameletBindingCondition) GetType() string {
+func (c BindingCondition) GetType() string {
return string(c.Type)
}
// GetStatus --
-func (c KameletBindingCondition) GetStatus() corev1.ConditionStatus {
+func (c BindingCondition) GetStatus() corev1.ConditionStatus {
return c.Status
}
// GetLastUpdateTime --
-func (c KameletBindingCondition) GetLastUpdateTime() metav1.Time {
+func (c BindingCondition) GetLastUpdateTime() metav1.Time {
return c.LastUpdateTime
}
// GetLastTransitionTime --
-func (c KameletBindingCondition) GetLastTransitionTime() metav1.Time {
+func (c BindingCondition) GetLastTransitionTime() metav1.Time {
return c.LastTransitionTime
}
// GetReason --
-func (c KameletBindingCondition) GetReason() string {
+func (c BindingCondition) GetReason() string {
return c.Reason
}
// GetMessage --
-func (c KameletBindingCondition) GetMessage() string {
+func (c BindingCondition) GetMessage() string {
return c.Message
}
// SetOperatorID sets the given operator id as an annotation
-func (in *KameletBinding) SetOperatorID(operatorID string) {
+func (in *Binding) SetOperatorID(operatorID string) {
v1.SetAnnotation(&in.ObjectMeta, v1.OperatorIDAnnotation, operatorID)
}
// GetCondition returns the condition with the provided type.
-func (in *KameletBindingStatus) GetCondition(condType KameletBindingConditionType) *KameletBindingCondition {
+func (in *BindingStatus) GetCondition(condType BindingConditionType) *BindingCondition {
for i := range in.Conditions {
c := in.Conditions[i]
if c.Type == condType {
@@ -83,8 +83,8 @@ func (in *KameletBindingStatus) GetCondition(condType KameletBindingConditionTyp
}
// SetCondition --
-func (in *KameletBindingStatus) SetCondition(condType KameletBindingConditionType, status corev1.ConditionStatus, reason string, message string) {
- in.SetConditions(KameletBindingCondition{
+func (in *BindingStatus) SetCondition(condType BindingConditionType, status corev1.ConditionStatus, reason string, message string) {
+ in.SetConditions(BindingCondition{
Type: condType,
Status: status,
LastUpdateTime: metav1.Now(),
@@ -95,8 +95,8 @@ func (in *KameletBindingStatus) SetCondition(condType KameletBindingConditionTyp
}
// SetErrorCondition --
-func (in *KameletBindingStatus) SetErrorCondition(condType KameletBindingConditionType, reason string, err error) {
- in.SetConditions(KameletBindingCondition{
+func (in *BindingStatus) SetErrorCondition(condType BindingConditionType, reason string, err error) {
+ in.SetConditions(BindingCondition{
Type: condType,
Status: corev1.ConditionFalse,
LastUpdateTime: metav1.Now(),
@@ -110,7 +110,7 @@ func (in *KameletBindingStatus) SetErrorCondition(condType KameletBindingConditi
//
// If a condition that we are about to add already exists and has the same status and
// reason then we are not going to update.
-func (in *KameletBindingStatus) SetConditions(conditions ...KameletBindingCondition) {
+func (in *BindingStatus) SetConditions(conditions ...BindingCondition) {
for _, condition := range conditions {
if condition.LastUpdateTime.IsZero() {
condition.LastUpdateTime = metav1.Now()
@@ -135,7 +135,7 @@ func (in *KameletBindingStatus) SetConditions(conditions ...KameletBindingCondit
}
// RemoveCondition removes the resource condition with the provided type.
-func (in *KameletBindingStatus) RemoveCondition(condType KameletBindingConditionType) {
+func (in *BindingStatus) RemoveCondition(condType BindingConditionType) {
newConditions := in.Conditions[:0]
for _, c := range in.Conditions {
if c.Type != condType {
@@ -169,12 +169,12 @@ func (p *EndpointProperties) GetPropertyMap() (map[string]string, error) {
return stringProps, nil
}
-// NewKameletBinding --
-func NewKameletBinding(namespace string, name string) KameletBinding {
- return KameletBinding{
+// NewBinding --
+func NewBinding(namespace string, name string) Binding {
+ return Binding{
TypeMeta: metav1.TypeMeta{
APIVersion: SchemeGroupVersion.String(),
- Kind: KameletBindingKind,
+ Kind: BindingKind,
},
ObjectMeta: metav1.ObjectMeta{
Namespace: namespace,
@@ -183,12 +183,12 @@ func NewKameletBinding(namespace string, name string) KameletBinding {
}
}
-// NewKameletBindingList --
-func NewKameletBindingList() KameletBindingList {
- return KameletBindingList{
+// NewBindingList --
+func NewBindingList() BindingList {
+ return BindingList{
TypeMeta: metav1.TypeMeta{
APIVersion: SchemeGroupVersion.String(),
- Kind: KameletBindingKind,
+ Kind: BindingKind,
},
}
}
diff --git a/pkg/apis/camel/v1alpha1/kamelet_binding_types_support_test.go b/pkg/apis/camel/v1alpha1/binding_types_support_test.go
similarity index 100%
rename from pkg/apis/camel/v1alpha1/kamelet_binding_types_support_test.go
rename to pkg/apis/camel/v1alpha1/binding_types_support_test.go
diff --git a/pkg/apis/camel/v1alpha1/register.go b/pkg/apis/camel/v1alpha1/register.go
index f472e4d78..6676d3b1a 100644
--- a/pkg/apis/camel/v1alpha1/register.go
+++ b/pkg/apis/camel/v1alpha1/register.go
@@ -47,8 +47,8 @@ func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&Kamelet{},
&KameletList{},
- &KameletBinding{},
- &KameletBindingList{},
+ &Binding{},
+ &BindingList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
diff --git a/pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go
index ee2885294..5bd413b4a 100644
--- a/pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go
+++ b/pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go
@@ -32,6 +32,155 @@ func (in *BeanProperties) DeepCopy() *BeanProperties {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *Binding) DeepCopyInto(out *Binding) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ in.Spec.DeepCopyInto(&out.Spec)
+ in.Status.DeepCopyInto(&out.Status)
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Binding.
+func (in *Binding) DeepCopy() *Binding {
+ if in == nil {
+ return nil
+ }
+ out := new(Binding)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *Binding) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *BindingCondition) DeepCopyInto(out *BindingCondition) {
+ *out = *in
+ in.LastUpdateTime.DeepCopyInto(&out.LastUpdateTime)
+ in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
+ if in.Pods != nil {
+ in, out := &in.Pods, &out.Pods
+ *out = make([]v1.PodCondition, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BindingCondition.
+func (in *BindingCondition) DeepCopy() *BindingCondition {
+ if in == nil {
+ return nil
+ }
+ out := new(BindingCondition)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *BindingList) DeepCopyInto(out *BindingList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Binding, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BindingList.
+func (in *BindingList) DeepCopy() *BindingList {
+ if in == nil {
+ return nil
+ }
+ out := new(BindingList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *BindingList) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *BindingSpec) DeepCopyInto(out *BindingSpec) {
+ *out = *in
+ if in.Integration != nil {
+ in, out := &in.Integration, &out.Integration
+ *out = new(v1.IntegrationSpec)
+ (*in).DeepCopyInto(*out)
+ }
+ in.Source.DeepCopyInto(&out.Source)
+ in.Sink.DeepCopyInto(&out.Sink)
+ if in.ErrorHandler != nil {
+ in, out := &in.ErrorHandler, &out.ErrorHandler
+ *out = new(ErrorHandlerSpec)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.Steps != nil {
+ in, out := &in.Steps, &out.Steps
+ *out = make([]Endpoint, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.Replicas != nil {
+ in, out := &in.Replicas, &out.Replicas
+ *out = new(int32)
+ **out = **in
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BindingSpec.
+func (in *BindingSpec) DeepCopy() *BindingSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(BindingSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *BindingStatus) DeepCopyInto(out *BindingStatus) {
+ *out = *in
+ if in.Conditions != nil {
+ in, out := &in.Conditions, &out.Conditions
+ *out = make([]BindingCondition, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.Replicas != nil {
+ in, out := &in.Replicas, &out.Replicas
+ *out = new(int32)
+ **out = **in
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BindingStatus.
+func (in *BindingStatus) DeepCopy() *BindingStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(BindingStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DataTypeReference) DeepCopyInto(out *DataTypeReference) {
*out = *in
@@ -486,155 +635,6 @@ func (in *Kamelet) DeepCopyObject() runtime.Object {
return nil
}
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *KameletBinding) DeepCopyInto(out *KameletBinding) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KameletBinding.
-func (in *KameletBinding) DeepCopy() *KameletBinding {
- if in == nil {
- return nil
- }
- out := new(KameletBinding)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *KameletBinding) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *KameletBindingCondition) DeepCopyInto(out *KameletBindingCondition) {
- *out = *in
- in.LastUpdateTime.DeepCopyInto(&out.LastUpdateTime)
- in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
- if in.Pods != nil {
- in, out := &in.Pods, &out.Pods
- *out = make([]v1.PodCondition, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KameletBindingCondition.
-func (in *KameletBindingCondition) DeepCopy() *KameletBindingCondition {
- if in == nil {
- return nil
- }
- out := new(KameletBindingCondition)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *KameletBindingList) DeepCopyInto(out *KameletBindingList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ListMeta.DeepCopyInto(&out.ListMeta)
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]KameletBinding, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KameletBindingList.
-func (in *KameletBindingList) DeepCopy() *KameletBindingList {
- if in == nil {
- return nil
- }
- out := new(KameletBindingList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *KameletBindingList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *KameletBindingSpec) DeepCopyInto(out *KameletBindingSpec) {
- *out = *in
- if in.Integration != nil {
- in, out := &in.Integration, &out.Integration
- *out = new(v1.IntegrationSpec)
- (*in).DeepCopyInto(*out)
- }
- in.Source.DeepCopyInto(&out.Source)
- in.Sink.DeepCopyInto(&out.Sink)
- if in.ErrorHandler != nil {
- in, out := &in.ErrorHandler, &out.ErrorHandler
- *out = new(ErrorHandlerSpec)
- (*in).DeepCopyInto(*out)
- }
- if in.Steps != nil {
- in, out := &in.Steps, &out.Steps
- *out = make([]Endpoint, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.Replicas != nil {
- in, out := &in.Replicas, &out.Replicas
- *out = new(int32)
- **out = **in
- }
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KameletBindingSpec.
-func (in *KameletBindingSpec) DeepCopy() *KameletBindingSpec {
- if in == nil {
- return nil
- }
- out := new(KameletBindingSpec)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *KameletBindingStatus) DeepCopyInto(out *KameletBindingStatus) {
- *out = *in
- if in.Conditions != nil {
- in, out := &in.Conditions, &out.Conditions
- *out = make([]KameletBindingCondition, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
- if in.Replicas != nil {
- in, out := &in.Replicas, &out.Replicas
- *out = new(int32)
- **out = **in
- }
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KameletBindingStatus.
-func (in *KameletBindingStatus) DeepCopy() *KameletBindingStatus {
- if in == nil {
- return nil
- }
- out := new(KameletBindingStatus)
- in.DeepCopyInto(out)
- return out
-}
-
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *KameletCondition) DeepCopyInto(out *KameletCondition) {
*out = *in
diff --git a/pkg/client/camel/applyconfiguration/camel/v1alpha1/kameletbinding.go b/pkg/client/camel/applyconfiguration/camel/v1alpha1/binding.go
similarity index 75%
rename from pkg/client/camel/applyconfiguration/camel/v1alpha1/kameletbinding.go
rename to pkg/client/camel/applyconfiguration/camel/v1alpha1/binding.go
index 794bed9d5..0c8e09fc7 100644
--- a/pkg/client/camel/applyconfiguration/camel/v1alpha1/kameletbinding.go
+++ b/pkg/client/camel/applyconfiguration/camel/v1alpha1/binding.go
@@ -25,22 +25,22 @@ import (
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
-// KameletBindingApplyConfiguration represents an declarative configuration of the KameletBinding type for use
+// BindingApplyConfiguration represents an declarative configuration of the Binding type for use
// with apply.
-type KameletBindingApplyConfiguration struct {
+type BindingApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
- Spec *KameletBindingSpecApplyConfiguration `json:"spec,omitempty"`
- Status *KameletBindingStatusApplyConfiguration `json:"status,omitempty"`
+ Spec *BindingSpecApplyConfiguration `json:"spec,omitempty"`
+ Status *BindingStatusApplyConfiguration `json:"status,omitempty"`
}
-// KameletBinding constructs an declarative configuration of the KameletBinding type for use with
+// Binding constructs an declarative configuration of the Binding type for use with
// apply.
-func KameletBinding(name, namespace string) *KameletBindingApplyConfiguration {
- b := &KameletBindingApplyConfiguration{}
+func Binding(name, namespace string) *BindingApplyConfiguration {
+ b := &BindingApplyConfiguration{}
b.WithName(name)
b.WithNamespace(namespace)
- b.WithKind("KameletBinding")
+ b.WithKind("Binding")
b.WithAPIVersion("camel.apache.org/v1alpha1")
return b
}
@@ -48,7 +48,7 @@ func KameletBinding(name, namespace string) *KameletBindingApplyConfiguration {
// WithKind sets the Kind field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Kind field is set to the value of the last call.
-func (b *KameletBindingApplyConfiguration) WithKind(value string) *KameletBindingApplyConfiguration {
+func (b *BindingApplyConfiguration) WithKind(value string) *BindingApplyConfiguration {
b.Kind = &value
return b
}
@@ -56,7 +56,7 @@ func (b *KameletBindingApplyConfiguration) WithKind(value string) *KameletBindin
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the APIVersion field is set to the value of the last call.
-func (b *KameletBindingApplyConfiguration) WithAPIVersion(value string) *KameletBindingApplyConfiguration {
+func (b *BindingApplyConfiguration) WithAPIVersion(value string) *BindingApplyConfiguration {
b.APIVersion = &value
return b
}
@@ -64,7 +64,7 @@ func (b *KameletBindingApplyConfiguration) WithAPIVersion(value string) *Kamelet
// WithName sets the Name field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Name field is set to the value of the last call.
-func (b *KameletBindingApplyConfiguration) WithName(value string) *KameletBindingApplyConfiguration {
+func (b *BindingApplyConfiguration) WithName(value string) *BindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Name = &value
return b
@@ -73,7 +73,7 @@ func (b *KameletBindingApplyConfiguration) WithName(value string) *KameletBindin
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the GenerateName field is set to the value of the last call.
-func (b *KameletBindingApplyConfiguration) WithGenerateName(value string) *KameletBindingApplyConfiguration {
+func (b *BindingApplyConfiguration) WithGenerateName(value string) *BindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.GenerateName = &value
return b
@@ -82,7 +82,7 @@ func (b *KameletBindingApplyConfiguration) WithGenerateName(value string) *Kamel
// WithNamespace sets the Namespace field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Namespace field is set to the value of the last call.
-func (b *KameletBindingApplyConfiguration) WithNamespace(value string) *KameletBindingApplyConfiguration {
+func (b *BindingApplyConfiguration) WithNamespace(value string) *BindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Namespace = &value
return b
@@ -91,7 +91,7 @@ func (b *KameletBindingApplyConfiguration) WithNamespace(value string) *KameletB
// WithUID sets the UID field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the UID field is set to the value of the last call.
-func (b *KameletBindingApplyConfiguration) WithUID(value types.UID) *KameletBindingApplyConfiguration {
+func (b *BindingApplyConfiguration) WithUID(value types.UID) *BindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.UID = &value
return b
@@ -100,7 +100,7 @@ func (b *KameletBindingApplyConfiguration) WithUID(value types.UID) *KameletBind
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ResourceVersion field is set to the value of the last call.
-func (b *KameletBindingApplyConfiguration) WithResourceVersion(value string) *KameletBindingApplyConfiguration {
+func (b *BindingApplyConfiguration) WithResourceVersion(value string) *BindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ResourceVersion = &value
return b
@@ -109,7 +109,7 @@ func (b *KameletBindingApplyConfiguration) WithResourceVersion(value string) *Ka
// WithGeneration sets the Generation field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Generation field is set to the value of the last call.
-func (b *KameletBindingApplyConfiguration) WithGeneration(value int64) *KameletBindingApplyConfiguration {
+func (b *BindingApplyConfiguration) WithGeneration(value int64) *BindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Generation = &value
return b
@@ -118,7 +118,7 @@ func (b *KameletBindingApplyConfiguration) WithGeneration(value int64) *KameletB
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
-func (b *KameletBindingApplyConfiguration) WithCreationTimestamp(value metav1.Time) *KameletBindingApplyConfiguration {
+func (b *BindingApplyConfiguration) WithCreationTimestamp(value metav1.Time) *BindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.CreationTimestamp = &value
return b
@@ -127,7 +127,7 @@ func (b *KameletBindingApplyConfiguration) WithCreationTimestamp(value metav1.Ti
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
-func (b *KameletBindingApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *KameletBindingApplyConfiguration {
+func (b *BindingApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *BindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionTimestamp = &value
return b
@@ -136,7 +136,7 @@ func (b *KameletBindingApplyConfiguration) WithDeletionTimestamp(value metav1.Ti
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
-func (b *KameletBindingApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *KameletBindingApplyConfiguration {
+func (b *BindingApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *BindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionGracePeriodSeconds = &value
return b
@@ -146,7 +146,7 @@ func (b *KameletBindingApplyConfiguration) WithDeletionGracePeriodSeconds(value
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Labels field,
// overwriting an existing map entries in Labels field with the same key.
-func (b *KameletBindingApplyConfiguration) WithLabels(entries map[string]string) *KameletBindingApplyConfiguration {
+func (b *BindingApplyConfiguration) WithLabels(entries map[string]string) *BindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
@@ -161,7 +161,7 @@ func (b *KameletBindingApplyConfiguration) WithLabels(entries map[string]string)
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Annotations field,
// overwriting an existing map entries in Annotations field with the same key.
-func (b *KameletBindingApplyConfiguration) WithAnnotations(entries map[string]string) *KameletBindingApplyConfiguration {
+func (b *BindingApplyConfiguration) WithAnnotations(entries map[string]string) *BindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
@@ -175,7 +175,7 @@ func (b *KameletBindingApplyConfiguration) WithAnnotations(entries map[string]st
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
-func (b *KameletBindingApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *KameletBindingApplyConfiguration {
+func (b *BindingApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *BindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
@@ -189,7 +189,7 @@ func (b *KameletBindingApplyConfiguration) WithOwnerReferences(values ...*v1.Own
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Finalizers field.
-func (b *KameletBindingApplyConfiguration) WithFinalizers(values ...string) *KameletBindingApplyConfiguration {
+func (b *BindingApplyConfiguration) WithFinalizers(values ...string) *BindingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
@@ -197,7 +197,7 @@ func (b *KameletBindingApplyConfiguration) WithFinalizers(values ...string) *Kam
return b
}
-func (b *KameletBindingApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
+func (b *BindingApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
@@ -206,7 +206,7 @@ func (b *KameletBindingApplyConfiguration) ensureObjectMetaApplyConfigurationExi
// WithSpec sets the Spec field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Spec field is set to the value of the last call.
-func (b *KameletBindingApplyConfiguration) WithSpec(value *KameletBindingSpecApplyConfiguration) *KameletBindingApplyConfiguration {
+func (b *BindingApplyConfiguration) WithSpec(value *BindingSpecApplyConfiguration) *BindingApplyConfiguration {
b.Spec = value
return b
}
@@ -214,7 +214,7 @@ func (b *KameletBindingApplyConfiguration) WithSpec(value *KameletBindingSpecApp
// WithStatus sets the Status field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Status field is set to the value of the last call.
-func (b *KameletBindingApplyConfiguration) WithStatus(value *KameletBindingStatusApplyConfiguration) *KameletBindingApplyConfiguration {
+func (b *BindingApplyConfiguration) WithStatus(value *BindingStatusApplyConfiguration) *BindingApplyConfiguration {
b.Status = value
return b
}
diff --git a/pkg/client/camel/applyconfiguration/camel/v1alpha1/kameletbindingcondition.go b/pkg/client/camel/applyconfiguration/camel/v1alpha1/bindingcondition.go
similarity index 73%
rename from pkg/client/camel/applyconfiguration/camel/v1alpha1/kameletbindingcondition.go
rename to pkg/client/camel/applyconfiguration/camel/v1alpha1/bindingcondition.go
index 68fb4e89e..7ae16279d 100644
--- a/pkg/client/camel/applyconfiguration/camel/v1alpha1/kameletbindingcondition.go
+++ b/pkg/client/camel/applyconfiguration/camel/v1alpha1/bindingcondition.go
@@ -26,10 +26,10 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
-// KameletBindingConditionApplyConfiguration represents an declarative configuration of the KameletBindingCondition type for use
+// BindingConditionApplyConfiguration represents an declarative configuration of the BindingCondition type for use
// with apply.
-type KameletBindingConditionApplyConfiguration struct {
- Type *v1alpha1.KameletBindingConditionType `json:"type,omitempty"`
+type BindingConditionApplyConfiguration struct {
+ Type *v1alpha1.BindingConditionType `json:"type,omitempty"`
Status *v1.ConditionStatus `json:"status,omitempty"`
LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"`
LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"`
@@ -38,16 +38,16 @@ type KameletBindingConditionApplyConfiguration struct {
Pods []camelv1.PodConditionApplyConfiguration `json:"pods,omitempty"`
}
-// KameletBindingConditionApplyConfiguration constructs an declarative configuration of the KameletBindingCondition type for use with
+// BindingConditionApplyConfiguration constructs an declarative configuration of the BindingCondition type for use with
// apply.
-func KameletBindingCondition() *KameletBindingConditionApplyConfiguration {
- return &KameletBindingConditionApplyConfiguration{}
+func BindingCondition() *BindingConditionApplyConfiguration {
+ return &BindingConditionApplyConfiguration{}
}
// WithType sets the Type field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Type field is set to the value of the last call.
-func (b *KameletBindingConditionApplyConfiguration) WithType(value v1alpha1.KameletBindingConditionType) *KameletBindingConditionApplyConfiguration {
+func (b *BindingConditionApplyConfiguration) WithType(value v1alpha1.BindingConditionType) *BindingConditionApplyConfiguration {
b.Type = &value
return b
}
@@ -55,7 +55,7 @@ func (b *KameletBindingConditionApplyConfiguration) WithType(value v1alpha1.Kame
// WithStatus sets the Status field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Status field is set to the value of the last call.
-func (b *KameletBindingConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *KameletBindingConditionApplyConfiguration {
+func (b *BindingConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *BindingConditionApplyConfiguration {
b.Status = &value
return b
}
@@ -63,7 +63,7 @@ func (b *KameletBindingConditionApplyConfiguration) WithStatus(value v1.Conditio
// WithLastUpdateTime sets the LastUpdateTime field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the LastUpdateTime field is set to the value of the last call.
-func (b *KameletBindingConditionApplyConfiguration) WithLastUpdateTime(value metav1.Time) *KameletBindingConditionApplyConfiguration {
+func (b *BindingConditionApplyConfiguration) WithLastUpdateTime(value metav1.Time) *BindingConditionApplyConfiguration {
b.LastUpdateTime = &value
return b
}
@@ -71,7 +71,7 @@ func (b *KameletBindingConditionApplyConfiguration) WithLastUpdateTime(value met
// WithLastTransitionTime sets the LastTransitionTime field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the LastTransitionTime field is set to the value of the last call.
-func (b *KameletBindingConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *KameletBindingConditionApplyConfiguration {
+func (b *BindingConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *BindingConditionApplyConfiguration {
b.LastTransitionTime = &value
return b
}
@@ -79,7 +79,7 @@ func (b *KameletBindingConditionApplyConfiguration) WithLastTransitionTime(value
// WithReason sets the Reason field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Reason field is set to the value of the last call.
-func (b *KameletBindingConditionApplyConfiguration) WithReason(value string) *KameletBindingConditionApplyConfiguration {
+func (b *BindingConditionApplyConfiguration) WithReason(value string) *BindingConditionApplyConfiguration {
b.Reason = &value
return b
}
@@ -87,7 +87,7 @@ func (b *KameletBindingConditionApplyConfiguration) WithReason(value string) *Ka
// WithMessage sets the Message field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Message field is set to the value of the last call.
-func (b *KameletBindingConditionApplyConfiguration) WithMessage(value string) *KameletBindingConditionApplyConfiguration {
+func (b *BindingConditionApplyConfiguration) WithMessage(value string) *BindingConditionApplyConfiguration {
b.Message = &value
return b
}
@@ -95,7 +95,7 @@ func (b *KameletBindingConditionApplyConfiguration) WithMessage(value string) *K
// WithPods adds the given value to the Pods field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Pods field.
-func (b *KameletBindingConditionApplyConfiguration) WithPods(values ...*camelv1.PodConditionApplyConfiguration) *KameletBindingConditionApplyConfiguration {
+func (b *BindingConditionApplyConfiguration) WithPods(values ...*camelv1.PodConditionApplyConfiguration) *BindingConditionApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithPods")
diff --git a/pkg/client/camel/applyconfiguration/camel/v1alpha1/kameletbindingspec.go b/pkg/client/camel/applyconfiguration/camel/v1alpha1/bindingspec.go
similarity index 74%
rename from pkg/client/camel/applyconfiguration/camel/v1alpha1/kameletbindingspec.go
rename to pkg/client/camel/applyconfiguration/camel/v1alpha1/bindingspec.go
index 69f067698..885d67fb2 100644
--- a/pkg/client/camel/applyconfiguration/camel/v1alpha1/kameletbindingspec.go
+++ b/pkg/client/camel/applyconfiguration/camel/v1alpha1/bindingspec.go
@@ -23,9 +23,9 @@ import (
v1 "github.com/apache/camel-k/v2/pkg/client/camel/applyconfiguration/camel/v1"
)
-// KameletBindingSpecApplyConfiguration represents an declarative configuration of the KameletBindingSpec type for use
+// BindingSpecApplyConfiguration represents an declarative configuration of the BindingSpec type for use
// with apply.
-type KameletBindingSpecApplyConfiguration struct {
+type BindingSpecApplyConfiguration struct {
Integration *v1.IntegrationSpecApplyConfiguration `json:"integration,omitempty"`
Source *EndpointApplyConfiguration `json:"source,omitempty"`
Sink *EndpointApplyConfiguration `json:"sink,omitempty"`
@@ -35,16 +35,16 @@ type KameletBindingSpecApplyConfiguration struct {
ServiceAccountName *string `json:"serviceAccountName,omitempty"`
}
-// KameletBindingSpecApplyConfiguration constructs an declarative configuration of the KameletBindingSpec type for use with
+// BindingSpecApplyConfiguration constructs an declarative configuration of the BindingSpec type for use with
// apply.
-func KameletBindingSpec() *KameletBindingSpecApplyConfiguration {
- return &KameletBindingSpecApplyConfiguration{}
+func BindingSpec() *BindingSpecApplyConfiguration {
+ return &BindingSpecApplyConfiguration{}
}
// WithIntegration sets the Integration field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Integration field is set to the value of the last call.
-func (b *KameletBindingSpecApplyConfiguration) WithIntegration(value *v1.IntegrationSpecApplyConfiguration) *KameletBindingSpecApplyConfiguration {
+func (b *BindingSpecApplyConfiguration) WithIntegration(value *v1.IntegrationSpecApplyConfiguration) *BindingSpecApplyConfiguration {
b.Integration = value
return b
}
@@ -52,7 +52,7 @@ func (b *KameletBindingSpecApplyConfiguration) WithIntegration(value *v1.Integra
// WithSource sets the Source field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Source field is set to the value of the last call.
-func (b *KameletBindingSpecApplyConfiguration) WithSource(value *EndpointApplyConfiguration) *KameletBindingSpecApplyConfiguration {
+func (b *BindingSpecApplyConfiguration) WithSource(value *EndpointApplyConfiguration) *BindingSpecApplyConfiguration {
b.Source = value
return b
}
@@ -60,7 +60,7 @@ func (b *KameletBindingSpecApplyConfiguration) WithSource(value *EndpointApplyCo
// WithSink sets the Sink field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Sink field is set to the value of the last call.
-func (b *KameletBindingSpecApplyConfiguration) WithSink(value *EndpointApplyConfiguration) *KameletBindingSpecApplyConfiguration {
+func (b *BindingSpecApplyConfiguration) WithSink(value *EndpointApplyConfiguration) *BindingSpecApplyConfiguration {
b.Sink = value
return b
}
@@ -68,7 +68,7 @@ func (b *KameletBindingSpecApplyConfiguration) WithSink(value *EndpointApplyConf
// WithErrorHandler sets the ErrorHandler field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ErrorHandler field is set to the value of the last call.
-func (b *KameletBindingSpecApplyConfiguration) WithErrorHandler(value *ErrorHandlerSpecApplyConfiguration) *KameletBindingSpecApplyConfiguration {
+func (b *BindingSpecApplyConfiguration) WithErrorHandler(value *ErrorHandlerSpecApplyConfiguration) *BindingSpecApplyConfiguration {
b.ErrorHandler = value
return b
}
@@ -76,7 +76,7 @@ func (b *KameletBindingSpecApplyConfiguration) WithErrorHandler(value *ErrorHand
// WithSteps adds the given value to the Steps field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Steps field.
-func (b *KameletBindingSpecApplyConfiguration) WithSteps(values ...*EndpointApplyConfiguration) *KameletBindingSpecApplyConfiguration {
+func (b *BindingSpecApplyConfiguration) WithSteps(values ...*EndpointApplyConfiguration) *BindingSpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithSteps")
@@ -89,7 +89,7 @@ func (b *KameletBindingSpecApplyConfiguration) WithSteps(values ...*EndpointAppl
// WithReplicas sets the Replicas field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Replicas field is set to the value of the last call.
-func (b *KameletBindingSpecApplyConfiguration) WithReplicas(value int32) *KameletBindingSpecApplyConfiguration {
+func (b *BindingSpecApplyConfiguration) WithReplicas(value int32) *BindingSpecApplyConfiguration {
b.Replicas = &value
return b
}
@@ -97,7 +97,7 @@ func (b *KameletBindingSpecApplyConfiguration) WithReplicas(value int32) *Kamele
// WithServiceAccountName sets the ServiceAccountName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ServiceAccountName field is set to the value of the last call.
-func (b *KameletBindingSpecApplyConfiguration) WithServiceAccountName(value string) *KameletBindingSpecApplyConfiguration {
+func (b *BindingSpecApplyConfiguration) WithServiceAccountName(value string) *BindingSpecApplyConfiguration {
b.ServiceAccountName = &value
return b
}
diff --git a/pkg/client/camel/applyconfiguration/camel/v1alpha1/kameletbindingstatus.go b/pkg/client/camel/applyconfiguration/camel/v1alpha1/bindingstatus.go
similarity index 63%
rename from pkg/client/camel/applyconfiguration/camel/v1alpha1/kameletbindingstatus.go
rename to pkg/client/camel/applyconfiguration/camel/v1alpha1/bindingstatus.go
index e21665453..a832f87b0 100644
--- a/pkg/client/camel/applyconfiguration/camel/v1alpha1/kameletbindingstatus.go
+++ b/pkg/client/camel/applyconfiguration/camel/v1alpha1/bindingstatus.go
@@ -23,26 +23,26 @@ import (
v1alpha1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1alpha1"
)
-// KameletBindingStatusApplyConfiguration represents an declarative configuration of the KameletBindingStatus type for use
+// BindingStatusApplyConfiguration represents an declarative configuration of the BindingStatus type for use
// with apply.
-type KameletBindingStatusApplyConfiguration struct {
- ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
- Phase *v1alpha1.KameletBindingPhase `json:"phase,omitempty"`
- Conditions []KameletBindingConditionApplyConfiguration `json:"conditions,omitempty"`
- Replicas *int32 `json:"replicas,omitempty"`
- Selector *string `json:"selector,omitempty"`
+type BindingStatusApplyConfiguration struct {
+ ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
+ Phase *v1alpha1.BindingPhase `json:"phase,omitempty"`
+ Conditions []BindingConditionApplyConfiguration `json:"conditions,omitempty"`
+ Replicas *int32 `json:"replicas,omitempty"`
+ Selector *string `json:"selector,omitempty"`
}
-// KameletBindingStatusApplyConfiguration constructs an declarative configuration of the KameletBindingStatus type for use with
+// BindingStatusApplyConfiguration constructs an declarative configuration of the BindingStatus type for use with
// apply.
-func KameletBindingStatus() *KameletBindingStatusApplyConfiguration {
- return &KameletBindingStatusApplyConfiguration{}
+func BindingStatus() *BindingStatusApplyConfiguration {
+ return &BindingStatusApplyConfiguration{}
}
// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ObservedGeneration field is set to the value of the last call.
-func (b *KameletBindingStatusApplyConfiguration) WithObservedGeneration(value int64) *KameletBindingStatusApplyConfiguration {
+func (b *BindingStatusApplyConfiguration) WithObservedGeneration(value int64) *BindingStatusApplyConfiguration {
b.ObservedGeneration = &value
return b
}
@@ -50,7 +50,7 @@ func (b *KameletBindingStatusApplyConfiguration) WithObservedGeneration(value in
// WithPhase sets the Phase field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Phase field is set to the value of the last call.
-func (b *KameletBindingStatusApplyConfiguration) WithPhase(value v1alpha1.KameletBindingPhase) *KameletBindingStatusApplyConfiguration {
+func (b *BindingStatusApplyConfiguration) WithPhase(value v1alpha1.BindingPhase) *BindingStatusApplyConfiguration {
b.Phase = &value
return b
}
@@ -58,7 +58,7 @@ func (b *KameletBindingStatusApplyConfiguration) WithPhase(value v1alpha1.Kamele
// WithConditions adds the given value to the Conditions field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Conditions field.
-func (b *KameletBindingStatusApplyConfiguration) WithConditions(values ...*KameletBindingConditionApplyConfiguration) *KameletBindingStatusApplyConfiguration {
+func (b *BindingStatusApplyConfiguration) WithConditions(values ...*BindingConditionApplyConfiguration) *BindingStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithConditions")
@@ -71,7 +71,7 @@ func (b *KameletBindingStatusApplyConfiguration) WithConditions(values ...*Kamel
// WithReplicas sets the Replicas field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Replicas field is set to the value of the last call.
-func (b *KameletBindingStatusApplyConfiguration) WithReplicas(value int32) *KameletBindingStatusApplyConfiguration {
+func (b *BindingStatusApplyConfiguration) WithReplicas(value int32) *BindingStatusApplyConfiguration {
b.Replicas = &value
return b
}
@@ -79,7 +79,7 @@ func (b *KameletBindingStatusApplyConfiguration) WithReplicas(value int32) *Kame
// WithSelector sets the Selector field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Selector field is set to the value of the last call.
-func (b *KameletBindingStatusApplyConfiguration) WithSelector(value string) *KameletBindingStatusApplyConfiguration {
+func (b *BindingStatusApplyConfiguration) WithSelector(value string) *BindingStatusApplyConfiguration {
b.Selector = &value
return b
}
diff --git a/pkg/client/camel/applyconfiguration/utils.go b/pkg/client/camel/applyconfiguration/utils.go
index 215b8caa7..5bad5763f 100644
--- a/pkg/client/camel/applyconfiguration/utils.go
+++ b/pkg/client/camel/applyconfiguration/utils.go
@@ -162,6 +162,14 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &camelv1.ValueSourceApplyConfiguration{}
// Group=camel.apache.org, Version=v1alpha1
+ case v1alpha1.SchemeGroupVersion.WithKind("Binding"):
+ return &camelv1alpha1.BindingApplyConfiguration{}
+ case v1alpha1.SchemeGroupVersion.WithKind("BindingCondition"):
+ return &camelv1alpha1.BindingConditionApplyConfiguration{}
+ case v1alpha1.SchemeGroupVersion.WithKind("BindingSpec"):
+ return &camelv1alpha1.BindingSpecApplyConfiguration{}
+ case v1alpha1.SchemeGroupVersion.WithKind("BindingStatus"):
+ return &camelv1alpha1.BindingStatusApplyConfiguration{}
case v1alpha1.SchemeGroupVersion.WithKind("DataTypeReference"):
return &camelv1alpha1.DataTypeReferenceApplyConfiguration{}
case v1alpha1.SchemeGroupVersion.WithKind("DataTypeSpec"):
@@ -188,14 +196,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &camelv1alpha1.JSONSchemaPropsApplyConfiguration{}
case v1alpha1.SchemeGroupVersion.WithKind("Kamelet"):
return &camelv1alpha1.KameletApplyConfiguration{}
- case v1alpha1.SchemeGroupVersion.WithKind("KameletBinding"):
- return &camelv1alpha1.KameletBindingApplyConfiguration{}
- case v1alpha1.SchemeGroupVersion.WithKind("KameletBindingCondition"):
- return &camelv1alpha1.KameletBindingConditionApplyConfiguration{}
- case v1alpha1.SchemeGroupVersion.WithKind("KameletBindingSpec"):
- return &camelv1alpha1.KameletBindingSpecApplyConfiguration{}
- case v1alpha1.SchemeGroupVersion.WithKind("KameletBindingStatus"):
- return &camelv1alpha1.KameletBindingStatusApplyConfiguration{}
case v1alpha1.SchemeGroupVersion.WithKind("KameletCondition"):
return &camelv1alpha1.KameletConditionApplyConfiguration{}
case v1alpha1.SchemeGroupVersion.WithKind("KameletProperty"):
diff --git a/pkg/client/camel/clientset/versioned/typed/camel/v1alpha1/binding.go b/pkg/client/camel/clientset/versioned/typed/camel/v1alpha1/binding.go
new file mode 100644
index 000000000..febe279a7
--- /dev/null
+++ b/pkg/client/camel/clientset/versioned/typed/camel/v1alpha1/binding.go
@@ -0,0 +1,290 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by client-gen. DO NOT EDIT.
+
+package v1alpha1
+
+import (
+ "context"
+ json "encoding/json"
+ "fmt"
+ "time"
+
+ v1alpha1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1alpha1"
+ camelv1alpha1 "github.com/apache/camel-k/v2/pkg/client/camel/applyconfiguration/camel/v1alpha1"
+ scheme "github.com/apache/camel-k/v2/pkg/client/camel/clientset/versioned/scheme"
+ autoscalingv1 "k8s.io/api/autoscaling/v1"
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ rest "k8s.io/client-go/rest"
+)
+
+// BindingsGetter has a method to return a BindingInterface.
+// A group's client should implement this interface.
+type BindingsGetter interface {
+ Bindings(namespace string) BindingInterface
+}
+
+// BindingInterface has methods to work with Binding resources.
+type BindingInterface interface {
+ Create(ctx context.Context, binding *v1alpha1.Binding, opts v1.CreateOptions) (*v1alpha1.Binding, error)
+ Update(ctx context.Context, binding *v1alpha1.Binding, opts v1.UpdateOptions) (*v1alpha1.Binding, error)
+ UpdateStatus(ctx context.Context, binding *v1alpha1.Binding, opts v1.UpdateOptions) (*v1alpha1.Binding, error)
+ Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
+ DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
+ Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.Binding, error)
+ List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.BindingList, error)
+ Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
+ Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Binding, err error)
+ Apply(ctx context.Context, binding *camelv1alpha1.BindingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.Binding, err error)
+ ApplyStatus(ctx context.Context, binding *camelv1alpha1.BindingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.Binding, err error)
+ GetScale(ctx context.Context, bindingName string, options v1.GetOptions) (*autoscalingv1.Scale, error)
+ UpdateScale(ctx context.Context, bindingName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (*autoscalingv1.Scale, error)
+
+ BindingExpansion
+}
+
+// bindings implements BindingInterface
+type bindings struct {
+ client rest.Interface
+ ns string
+}
+
+// newBindings returns a Bindings
+func newBindings(c *CamelV1alpha1Client, namespace string) *bindings {
+ return &bindings{
+ client: c.RESTClient(),
+ ns: namespace,
+ }
+}
+
+// Get takes name of the binding, and returns the corresponding binding object, and an error if there is any.
+func (c *bindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Binding, err error) {
+ result = &v1alpha1.Binding{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("bindings").
+ Name(name).
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do(ctx).
+ Into(result)
+ return
+}
+
+// List takes label and field selectors, and returns the list of Bindings that match those selectors.
+func (c *bindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.BindingList, err error) {
+ var timeout time.Duration
+ if opts.TimeoutSeconds != nil {
+ timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
+ }
+ result = &v1alpha1.BindingList{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("bindings").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Timeout(timeout).
+ Do(ctx).
+ Into(result)
+ return
+}
+
+// Watch returns a watch.Interface that watches the requested bindings.
+func (c *bindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
+ var timeout time.Duration
+ if opts.TimeoutSeconds != nil {
+ timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
+ }
+ opts.Watch = true
+ return c.client.Get().
+ Namespace(c.ns).
+ Resource("bindings").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Timeout(timeout).
+ Watch(ctx)
+}
+
+// Create takes the representation of a binding and creates it. Returns the server's representation of the binding, and an error, if there is any.
+func (c *bindings) Create(ctx context.Context, binding *v1alpha1.Binding, opts v1.CreateOptions) (result *v1alpha1.Binding, err error) {
+ result = &v1alpha1.Binding{}
+ err = c.client.Post().
+ Namespace(c.ns).
+ Resource("bindings").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Body(binding).
+ Do(ctx).
+ Into(result)
+ return
+}
+
+// Update takes the representation of a binding and updates it. Returns the server's representation of the binding, and an error, if there is any.
+func (c *bindings) Update(ctx context.Context, binding *v1alpha1.Binding, opts v1.UpdateOptions) (result *v1alpha1.Binding, err error) {
+ result = &v1alpha1.Binding{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("bindings").
+ Name(binding.Name).
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Body(binding).
+ Do(ctx).
+ Into(result)
+ return
+}
+
+// UpdateStatus was generated because the type contains a Status member.
+// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
+func (c *bindings) UpdateStatus(ctx context.Context, binding *v1alpha1.Binding, opts v1.UpdateOptions) (result *v1alpha1.Binding, err error) {
+ result = &v1alpha1.Binding{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("bindings").
+ Name(binding.Name).
+ SubResource("status").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Body(binding).
+ Do(ctx).
+ Into(result)
+ return
+}
+
+// Delete takes name of the binding and deletes it. Returns an error if one occurs.
+func (c *bindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("bindings").
+ Name(name).
+ Body(&opts).
+ Do(ctx).
+ Error()
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *bindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
+ var timeout time.Duration
+ if listOpts.TimeoutSeconds != nil {
+ timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
+ }
+ return c.client.Delete().
+ Namespace(c.ns).
+ Resource("bindings").
+ VersionedParams(&listOpts, scheme.ParameterCodec).
+ Timeout(timeout).
+ Body(&opts).
+ Do(ctx).
+ Error()
+}
+
+// Patch applies the patch and returns the patched binding.
+func (c *bindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Binding, err error) {
+ result = &v1alpha1.Binding{}
+ err = c.client.Patch(pt).
+ Namespace(c.ns).
+ Resource("bindings").
+ Name(name).
+ SubResource(subresources...).
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Body(data).
+ Do(ctx).
+ Into(result)
+ return
+}
+
+// Apply takes the given apply declarative configuration, applies it and returns the applied binding.
+func (c *bindings) Apply(ctx context.Context, binding *camelv1alpha1.BindingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.Binding, err error) {
+ if binding == nil {
+ return nil, fmt.Errorf("binding provided to Apply must not be nil")
+ }
+ patchOpts := opts.ToPatchOptions()
+ data, err := json.Marshal(binding)
+ if err != nil {
+ return nil, err
+ }
+ name := binding.Name
+ if name == nil {
+ return nil, fmt.Errorf("binding.Name must be provided to Apply")
+ }
+ result = &v1alpha1.Binding{}
+ err = c.client.Patch(types.ApplyPatchType).
+ Namespace(c.ns).
+ Resource("bindings").
+ Name(*name).
+ VersionedParams(&patchOpts, scheme.ParameterCodec).
+ Body(data).
+ Do(ctx).
+ Into(result)
+ return
+}
+
+// ApplyStatus was generated because the type contains a Status member.
+// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
+func (c *bindings) ApplyStatus(ctx context.Context, binding *camelv1alpha1.BindingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.Binding, err error) {
+ if binding == nil {
+ return nil, fmt.Errorf("binding provided to Apply must not be nil")
+ }
+ patchOpts := opts.ToPatchOptions()
+ data, err := json.Marshal(binding)
+ if err != nil {
+ return nil, err
+ }
+
+ name := binding.Name
+ if name == nil {
+ return nil, fmt.Errorf("binding.Name must be provided to Apply")
+ }
+
+ result = &v1alpha1.Binding{}
+ err = c.client.Patch(types.ApplyPatchType).
+ Namespace(c.ns).
+ Resource("bindings").
+ Name(*name).
+ SubResource("status").
+ VersionedParams(&patchOpts, scheme.ParameterCodec).
+ Body(data).
+ Do(ctx).
+ Into(result)
+ return
+}
+
+// GetScale takes name of the binding, and returns the corresponding autoscalingv1.Scale object, and an error if there is any.
+func (c *bindings) GetScale(ctx context.Context, bindingName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) {
+ result = &autoscalingv1.Scale{}
+ err = c.client.Get().
+ Namespace(c.ns).
+ Resource("bindings").
+ Name(bindingName).
+ SubResource("scale").
+ VersionedParams(&options, scheme.ParameterCodec).
+ Do(ctx).
+ Into(result)
+ return
+}
+
+// UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
+func (c *bindings) UpdateScale(ctx context.Context, bindingName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (result *autoscalingv1.Scale, err error) {
+ result = &autoscalingv1.Scale{}
+ err = c.client.Put().
+ Namespace(c.ns).
+ Resource("bindings").
+ Name(bindingName).
+ SubResource("scale").
+ VersionedParams(&opts, scheme.ParameterCodec).
+ Body(scale).
+ Do(ctx).
+ Into(result)
+ return
+}
diff --git a/pkg/client/camel/clientset/versioned/typed/camel/v1alpha1/camel_client.go b/pkg/client/camel/clientset/versioned/typed/camel/v1alpha1/camel_client.go
index a7728be45..21ab303f0 100644
--- a/pkg/client/camel/clientset/versioned/typed/camel/v1alpha1/camel_client.go
+++ b/pkg/client/camel/clientset/versioned/typed/camel/v1alpha1/camel_client.go
@@ -29,8 +29,8 @@ import (
type CamelV1alpha1Interface interface {
RESTClient() rest.Interface
+ BindingsGetter
KameletsGetter
- KameletBindingsGetter
}
// CamelV1alpha1Client is used to interact with features provided by the camel.apache.org group.
@@ -38,12 +38,12 @@ type CamelV1alpha1Client struct {
restClient rest.Interface
}
-func (c *CamelV1alpha1Client) Kamelets(namespace string) KameletInterface {
- return newKamelets(c, namespace)
+func (c *CamelV1alpha1Client) Bindings(namespace string) BindingInterface {
+ return newBindings(c, namespace)
}
-func (c *CamelV1alpha1Client) KameletBindings(namespace string) KameletBindingInterface {
- return newKameletBindings(c, namespace)
+func (c *CamelV1alpha1Client) Kamelets(namespace string) KameletInterface {
+ return newKamelets(c, namespace)
}
// NewForConfig creates a new CamelV1alpha1Client for the given config.
diff --git a/pkg/client/camel/clientset/versioned/typed/camel/v1alpha1/fake/fake_binding.go b/pkg/client/camel/clientset/versioned/typed/camel/v1alpha1/fake/fake_binding.go
new file mode 100644
index 000000000..e729f2e42
--- /dev/null
+++ b/pkg/client/camel/clientset/versioned/typed/camel/v1alpha1/fake/fake_binding.go
@@ -0,0 +1,214 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by client-gen. DO NOT EDIT.
+
+package fake
+
+import (
+ "context"
+ json "encoding/json"
+ "fmt"
+
+ v1alpha1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1alpha1"
+ camelv1alpha1 "github.com/apache/camel-k/v2/pkg/client/camel/applyconfiguration/camel/v1alpha1"
+ autoscalingv1 "k8s.io/api/autoscaling/v1"
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ labels "k8s.io/apimachinery/pkg/labels"
+ schema "k8s.io/apimachinery/pkg/runtime/schema"
+ types "k8s.io/apimachinery/pkg/types"
+ watch "k8s.io/apimachinery/pkg/watch"
+ testing "k8s.io/client-go/testing"
+)
+
+// FakeBindings implements BindingInterface
+type FakeBindings struct {
+ Fake *FakeCamelV1alpha1
+ ns string
+}
+
+var bindingsResource = schema.GroupVersionResource{Group: "camel.apache.org", Version: "v1alpha1", Resource: "bindings"}
+
+var bindingsKind = schema.GroupVersionKind{Group: "camel.apache.org", Version: "v1alpha1", Kind: "Binding"}
+
+// Get takes name of the binding, and returns the corresponding binding object, and an error if there is any.
+func (c *FakeBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Binding, err error) {
+ obj, err := c.Fake.
+ Invokes(testing.NewGetAction(bindingsResource, c.ns, name), &v1alpha1.Binding{})
+
+ if obj == nil {
+ return nil, err
+ }
+ return obj.(*v1alpha1.Binding), err
+}
+
+// List takes label and field selectors, and returns the list of Bindings that match those selectors.
+func (c *FakeBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.BindingList, err error) {
+ obj, err := c.Fake.
+ Invokes(testing.NewListAction(bindingsResource, bindingsKind, c.ns, opts), &v1alpha1.BindingList{})
+
+ if obj == nil {
+ return nil, err
+ }
+
+ label, _, _ := testing.ExtractFromListOptions(opts)
+ if label == nil {
+ label = labels.Everything()
+ }
+ list := &v1alpha1.BindingList{ListMeta: obj.(*v1alpha1.BindingList).ListMeta}
+ for _, item := range obj.(*v1alpha1.BindingList).Items {
+ if label.Matches(labels.Set(item.Labels)) {
+ list.Items = append(list.Items, item)
+ }
+ }
+ return list, err
+}
+
+// Watch returns a watch.Interface that watches the requested bindings.
+func (c *FakeBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
+ return c.Fake.
+ InvokesWatch(testing.NewWatchAction(bindingsResource, c.ns, opts))
+
+}
+
+// Create takes the representation of a binding and creates it. Returns the server's representation of the binding, and an error, if there is any.
+func (c *FakeBindings) Create(ctx context.Context, binding *v1alpha1.Binding, opts v1.CreateOptions) (result *v1alpha1.Binding, err error) {
+ obj, err := c.Fake.
+ Invokes(testing.NewCreateAction(bindingsResource, c.ns, binding), &v1alpha1.Binding{})
+
+ if obj == nil {
+ return nil, err
+ }
+ return obj.(*v1alpha1.Binding), err
+}
+
+// Update takes the representation of a binding and updates it. Returns the server's representation of the binding, and an error, if there is any.
+func (c *FakeBindings) Update(ctx context.Context, binding *v1alpha1.Binding, opts v1.UpdateOptions) (result *v1alpha1.Binding, err error) {
+ obj, err := c.Fake.
+ Invokes(testing.NewUpdateAction(bindingsResource, c.ns, binding), &v1alpha1.Binding{})
+
+ if obj == nil {
+ return nil, err
+ }
+ return obj.(*v1alpha1.Binding), 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 *FakeBindings) UpdateStatus(ctx context.Context, binding *v1alpha1.Binding, opts v1.UpdateOptions) (*v1alpha1.Binding, error) {
+ obj, err := c.Fake.
+ Invokes(testing.NewUpdateSubresourceAction(bindingsResource, "status", c.ns, binding), &v1alpha1.Binding{})
+
+ if obj == nil {
+ return nil, err
+ }
+ return obj.(*v1alpha1.Binding), err
+}
+
+// Delete takes name of the binding and deletes it. Returns an error if one occurs.
+func (c *FakeBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
+ _, err := c.Fake.
+ Invokes(testing.NewDeleteActionWithOptions(bindingsResource, c.ns, name, opts), &v1alpha1.Binding{})
+
+ return err
+}
+
+// DeleteCollection deletes a collection of objects.
+func (c *FakeBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
+ action := testing.NewDeleteCollectionAction(bindingsResource, c.ns, listOpts)
+
+ _, err := c.Fake.Invokes(action, &v1alpha1.BindingList{})
+ return err
+}
+
+// Patch applies the patch and returns the patched binding.
+func (c *FakeBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Binding, err error) {
+ obj, err := c.Fake.
+ Invokes(testing.NewPatchSubresourceAction(bindingsResource, c.ns, name, pt, data, subresources...), &v1alpha1.Binding{})
+
+ if obj == nil {
+ return nil, err
+ }
+ return obj.(*v1alpha1.Binding), err
+}
+
+// Apply takes the given apply declarative configuration, applies it and returns the applied binding.
+func (c *FakeBindings) Apply(ctx context.Context, binding *camelv1alpha1.BindingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.Binding, err error) {
+ if binding == nil {
+ return nil, fmt.Errorf("binding provided to Apply must not be nil")
+ }
+ data, err := json.Marshal(binding)
+ if err != nil {
+ return nil, err
+ }
+ name := binding.Name
+ if name == nil {
+ return nil, fmt.Errorf("binding.Name must be provided to Apply")
+ }
+ obj, err := c.Fake.
+ Invokes(testing.NewPatchSubresourceAction(bindingsResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha1.Binding{})
+
+ if obj == nil {
+ return nil, err
+ }
+ return obj.(*v1alpha1.Binding), err
+}
+
+// ApplyStatus was generated because the type contains a Status member.
+// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
+func (c *FakeBindings) ApplyStatus(ctx context.Context, binding *camelv1alpha1.BindingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.Binding, err error) {
+ if binding == nil {
+ return nil, fmt.Errorf("binding provided to Apply must not be nil")
+ }
+ data, err := json.Marshal(binding)
+ if err != nil {
+ return nil, err
+ }
+ name := binding.Name
+ if name == nil {
+ return nil, fmt.Errorf("binding.Name must be provided to Apply")
+ }
+ obj, err := c.Fake.
+ Invokes(testing.NewPatchSubresourceAction(bindingsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1alpha1.Binding{})
+
+ if obj == nil {
+ return nil, err
+ }
+ return obj.(*v1alpha1.Binding), err
+}
+
+// GetScale takes name of the binding, and returns the corresponding scale object, and an error if there is any.
+func (c *FakeBindings) GetScale(ctx context.Context, bindingName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) {
+ obj, err := c.Fake.
+ Invokes(testing.NewGetSubresourceAction(bindingsResource, c.ns, "scale", bindingName), &autoscalingv1.Scale{})
+
+ if obj == nil {
+ return nil, err
+ }
+ return obj.(*autoscalingv1.Scale), err
+}
+
+// UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
+func (c *FakeBindings) UpdateScale(ctx context.Context, bindingName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (result *autoscalingv1.Scale, err error) {
+ obj, err := c.Fake.
+ Invokes(testing.NewUpdateSubresourceAction(bindingsResource, "scale", c.ns, scale), &autoscalingv1.Scale{})
+
+ if obj == nil {
+ return nil, err
+ }
+ return obj.(*autoscalingv1.Scale), err
+}
diff --git a/pkg/client/camel/clientset/versioned/typed/camel/v1alpha1/fake/fake_camel_client.go b/pkg/client/camel/clientset/versioned/typed/camel/v1alpha1/fake/fake_camel_client.go
index 840321205..4c002621f 100644
--- a/pkg/client/camel/clientset/versioned/typed/camel/v1alpha1/fake/fake_camel_client.go
+++ b/pkg/client/camel/clientset/versioned/typed/camel/v1alpha1/fake/fake_camel_client.go
@@ -29,12 +29,12 @@ type FakeCamelV1alpha1 struct {
*testing.Fake
}
-func (c *FakeCamelV1alpha1) Kamelets(namespace string) v1alpha1.KameletInterface {
- return &FakeKamelets{c, namespace}
+func (c *FakeCamelV1alpha1) Bindings(namespace string) v1alpha1.BindingInterface {
+ return &FakeBindings{c, namespace}
}
-func (c *FakeCamelV1alpha1) KameletBindings(namespace string) v1alpha1.KameletBindingInterface {
- return &FakeKameletBindings{c, namespace}
+func (c *FakeCamelV1alpha1) Kamelets(namespace string) v1alpha1.KameletInterface {
+ return &FakeKamelets{c, namespace}
}
// RESTClient returns a RESTClient that is used to communicate
diff --git a/pkg/client/camel/clientset/versioned/typed/camel/v1alpha1/fake/fake_kameletbinding.go b/pkg/client/camel/clientset/versioned/typed/camel/v1alpha1/fake/fake_kameletbinding.go
deleted file mode 100644
index 3023497b7..000000000
--- a/pkg/client/camel/clientset/versioned/typed/camel/v1alpha1/fake/fake_kameletbinding.go
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by client-gen. DO NOT EDIT.
-
-package fake
-
-import (
- "context"
- json "encoding/json"
- "fmt"
-
- v1alpha1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1alpha1"
- camelv1alpha1 "github.com/apache/camel-k/v2/pkg/client/camel/applyconfiguration/camel/v1alpha1"
- autoscalingv1 "k8s.io/api/autoscaling/v1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- labels "k8s.io/apimachinery/pkg/labels"
- schema "k8s.io/apimachinery/pkg/runtime/schema"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- testing "k8s.io/client-go/testing"
-)
-
-// FakeKameletBindings implements KameletBindingInterface
-type FakeKameletBindings struct {
- Fake *FakeCamelV1alpha1
- ns string
-}
-
-var kameletbindingsResource = schema.GroupVersionResource{Group: "camel.apache.org", Version: "v1alpha1", Resource: "kameletbindings"}
-
-var kameletbindingsKind = schema.GroupVersionKind{Group: "camel.apache.org", Version: "v1alpha1", Kind: "KameletBinding"}
-
-// Get takes name of the kameletBinding, and returns the corresponding kameletBinding object, and an error if there is any.
-func (c *FakeKameletBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.KameletBinding, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewGetAction(kameletbindingsResource, c.ns, name), &v1alpha1.KameletBinding{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.KameletBinding), err
-}
-
-// List takes label and field selectors, and returns the list of KameletBindings that match those selectors.
-func (c *FakeKameletBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.KameletBindingList, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewListAction(kameletbindingsResource, kameletbindingsKind, c.ns, opts), &v1alpha1.KameletBindingList{})
-
- if obj == nil {
- return nil, err
- }
-
- label, _, _ := testing.ExtractFromListOptions(opts)
- if label == nil {
- label = labels.Everything()
- }
- list := &v1alpha1.KameletBindingList{ListMeta: obj.(*v1alpha1.KameletBindingList).ListMeta}
- for _, item := range obj.(*v1alpha1.KameletBindingList).Items {
- if label.Matches(labels.Set(item.Labels)) {
- list.Items = append(list.Items, item)
- }
- }
- return list, err
-}
-
-// Watch returns a watch.Interface that watches the requested kameletBindings.
-func (c *FakeKameletBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
- return c.Fake.
- InvokesWatch(testing.NewWatchAction(kameletbindingsResource, c.ns, opts))
-
-}
-
-// Create takes the representation of a kameletBinding and creates it. Returns the server's representation of the kameletBinding, and an error, if there is any.
-func (c *FakeKameletBindings) Create(ctx context.Context, kameletBinding *v1alpha1.KameletBinding, opts v1.CreateOptions) (result *v1alpha1.KameletBinding, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewCreateAction(kameletbindingsResource, c.ns, kameletBinding), &v1alpha1.KameletBinding{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.KameletBinding), err
-}
-
-// Update takes the representation of a kameletBinding and updates it. Returns the server's representation of the kameletBinding, and an error, if there is any.
-func (c *FakeKameletBindings) Update(ctx context.Context, kameletBinding *v1alpha1.KameletBinding, opts v1.UpdateOptions) (result *v1alpha1.KameletBinding, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(kameletbindingsResource, c.ns, kameletBinding), &v1alpha1.KameletBinding{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.KameletBinding), 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 *FakeKameletBindings) UpdateStatus(ctx context.Context, kameletBinding *v1alpha1.KameletBinding, opts v1.UpdateOptions) (*v1alpha1.KameletBinding, error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(kameletbindingsResource, "status", c.ns, kameletBinding), &v1alpha1.KameletBinding{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.KameletBinding), err
-}
-
-// Delete takes name of the kameletBinding and deletes it. Returns an error if one occurs.
-func (c *FakeKameletBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
- _, err := c.Fake.
- Invokes(testing.NewDeleteActionWithOptions(kameletbindingsResource, c.ns, name, opts), &v1alpha1.KameletBinding{})
-
- return err
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *FakeKameletBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
- action := testing.NewDeleteCollectionAction(kameletbindingsResource, c.ns, listOpts)
-
- _, err := c.Fake.Invokes(action, &v1alpha1.KameletBindingList{})
- return err
-}
-
-// Patch applies the patch and returns the patched kameletBinding.
-func (c *FakeKameletBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.KameletBinding, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(kameletbindingsResource, c.ns, name, pt, data, subresources...), &v1alpha1.KameletBinding{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.KameletBinding), err
-}
-
-// Apply takes the given apply declarative configuration, applies it and returns the applied kameletBinding.
-func (c *FakeKameletBindings) Apply(ctx context.Context, kameletBinding *camelv1alpha1.KameletBindingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.KameletBinding, err error) {
- if kameletBinding == nil {
- return nil, fmt.Errorf("kameletBinding provided to Apply must not be nil")
- }
- data, err := json.Marshal(kameletBinding)
- if err != nil {
- return nil, err
- }
- name := kameletBinding.Name
- if name == nil {
- return nil, fmt.Errorf("kameletBinding.Name must be provided to Apply")
- }
- obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(kameletbindingsResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha1.KameletBinding{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.KameletBinding), err
-}
-
-// ApplyStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
-func (c *FakeKameletBindings) ApplyStatus(ctx context.Context, kameletBinding *camelv1alpha1.KameletBindingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.KameletBinding, err error) {
- if kameletBinding == nil {
- return nil, fmt.Errorf("kameletBinding provided to Apply must not be nil")
- }
- data, err := json.Marshal(kameletBinding)
- if err != nil {
- return nil, err
- }
- name := kameletBinding.Name
- if name == nil {
- return nil, fmt.Errorf("kameletBinding.Name must be provided to Apply")
- }
- obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(kameletbindingsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1alpha1.KameletBinding{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*v1alpha1.KameletBinding), err
-}
-
-// GetScale takes name of the kameletBinding, and returns the corresponding scale object, and an error if there is any.
-func (c *FakeKameletBindings) GetScale(ctx context.Context, kameletBindingName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewGetSubresourceAction(kameletbindingsResource, c.ns, "scale", kameletBindingName), &autoscalingv1.Scale{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*autoscalingv1.Scale), err
-}
-
-// UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
-func (c *FakeKameletBindings) UpdateScale(ctx context.Context, kameletBindingName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (result *autoscalingv1.Scale, err error) {
- obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(kameletbindingsResource, "scale", c.ns, scale), &autoscalingv1.Scale{})
-
- if obj == nil {
- return nil, err
- }
- return obj.(*autoscalingv1.Scale), err
-}
diff --git a/pkg/client/camel/clientset/versioned/typed/camel/v1alpha1/generated_expansion.go b/pkg/client/camel/clientset/versioned/typed/camel/v1alpha1/generated_expansion.go
index b53910b3b..a3c3af86d 100644
--- a/pkg/client/camel/clientset/versioned/typed/camel/v1alpha1/generated_expansion.go
+++ b/pkg/client/camel/clientset/versioned/typed/camel/v1alpha1/generated_expansion.go
@@ -19,6 +19,6 @@ limitations under the License.
package v1alpha1
-type KameletExpansion interface{}
+type BindingExpansion interface{}
-type KameletBindingExpansion interface{}
+type KameletExpansion interface{}
diff --git a/pkg/client/camel/clientset/versioned/typed/camel/v1alpha1/kameletbinding.go b/pkg/client/camel/clientset/versioned/typed/camel/v1alpha1/kameletbinding.go
deleted file mode 100644
index 04d4008ee..000000000
--- a/pkg/client/camel/clientset/versioned/typed/camel/v1alpha1/kameletbinding.go
+++ /dev/null
@@ -1,290 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by client-gen. DO NOT EDIT.
-
-package v1alpha1
-
-import (
- "context"
- json "encoding/json"
- "fmt"
- "time"
-
- v1alpha1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1alpha1"
- camelv1alpha1 "github.com/apache/camel-k/v2/pkg/client/camel/applyconfiguration/camel/v1alpha1"
- scheme "github.com/apache/camel-k/v2/pkg/client/camel/clientset/versioned/scheme"
- autoscalingv1 "k8s.io/api/autoscaling/v1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- rest "k8s.io/client-go/rest"
-)
-
-// KameletBindingsGetter has a method to return a KameletBindingInterface.
-// A group's client should implement this interface.
-type KameletBindingsGetter interface {
- KameletBindings(namespace string) KameletBindingInterface
-}
-
-// KameletBindingInterface has methods to work with KameletBinding resources.
-type KameletBindingInterface interface {
- Create(ctx context.Context, kameletBinding *v1alpha1.KameletBinding, opts v1.CreateOptions) (*v1alpha1.KameletBinding, error)
- Update(ctx context.Context, kameletBinding *v1alpha1.KameletBinding, opts v1.UpdateOptions) (*v1alpha1.KameletBinding, error)
- UpdateStatus(ctx context.Context, kameletBinding *v1alpha1.KameletBinding, opts v1.UpdateOptions) (*v1alpha1.KameletBinding, error)
- Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
- DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
- Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.KameletBinding, error)
- List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.KameletBindingList, error)
- Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
- Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.KameletBinding, err error)
- Apply(ctx context.Context, kameletBinding *camelv1alpha1.KameletBindingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.KameletBinding, err error)
- ApplyStatus(ctx context.Context, kameletBinding *camelv1alpha1.KameletBindingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.KameletBinding, err error)
- GetScale(ctx context.Context, kameletBindingName string, options v1.GetOptions) (*autoscalingv1.Scale, error)
- UpdateScale(ctx context.Context, kameletBindingName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (*autoscalingv1.Scale, error)
-
- KameletBindingExpansion
-}
-
-// kameletBindings implements KameletBindingInterface
-type kameletBindings struct {
- client rest.Interface
- ns string
-}
-
-// newKameletBindings returns a KameletBindings
-func newKameletBindings(c *CamelV1alpha1Client, namespace string) *kameletBindings {
- return &kameletBindings{
- client: c.RESTClient(),
- ns: namespace,
- }
-}
-
-// Get takes name of the kameletBinding, and returns the corresponding kameletBinding object, and an error if there is any.
-func (c *kameletBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.KameletBinding, err error) {
- result = &v1alpha1.KameletBinding{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("kameletbindings").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do(ctx).
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of KameletBindings that match those selectors.
-func (c *kameletBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.KameletBindingList, err error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- result = &v1alpha1.KameletBindingList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("kameletbindings").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Do(ctx).
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested kameletBindings.
-func (c *kameletBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("kameletbindings").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Watch(ctx)
-}
-
-// Create takes the representation of a kameletBinding and creates it. Returns the server's representation of the kameletBinding, and an error, if there is any.
-func (c *kameletBindings) Create(ctx context.Context, kameletBinding *v1alpha1.KameletBinding, opts v1.CreateOptions) (result *v1alpha1.KameletBinding, err error) {
- result = &v1alpha1.KameletBinding{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("kameletbindings").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(kameletBinding).
- Do(ctx).
- Into(result)
- return
-}
-
-// Update takes the representation of a kameletBinding and updates it. Returns the server's representation of the kameletBinding, and an error, if there is any.
-func (c *kameletBindings) Update(ctx context.Context, kameletBinding *v1alpha1.KameletBinding, opts v1.UpdateOptions) (result *v1alpha1.KameletBinding, err error) {
- result = &v1alpha1.KameletBinding{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("kameletbindings").
- Name(kameletBinding.Name).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(kameletBinding).
- Do(ctx).
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *kameletBindings) UpdateStatus(ctx context.Context, kameletBinding *v1alpha1.KameletBinding, opts v1.UpdateOptions) (result *v1alpha1.KameletBinding, err error) {
- result = &v1alpha1.KameletBinding{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("kameletbindings").
- Name(kameletBinding.Name).
- SubResource("status").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(kameletBinding).
- Do(ctx).
- Into(result)
- return
-}
-
-// Delete takes name of the kameletBinding and deletes it. Returns an error if one occurs.
-func (c *kameletBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("kameletbindings").
- Name(name).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *kameletBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
- var timeout time.Duration
- if listOpts.TimeoutSeconds != nil {
- timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
- }
- return c.client.Delete().
- Namespace(c.ns).
- Resource("kameletbindings").
- VersionedParams(&listOpts, scheme.ParameterCodec).
- Timeout(timeout).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// Patch applies the patch and returns the patched kameletBinding.
-func (c *kameletBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.KameletBinding, err error) {
- result = &v1alpha1.KameletBinding{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("kameletbindings").
- Name(name).
- SubResource(subresources...).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// Apply takes the given apply declarative configuration, applies it and returns the applied kameletBinding.
-func (c *kameletBindings) Apply(ctx context.Context, kameletBinding *camelv1alpha1.KameletBindingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.KameletBinding, err error) {
- if kameletBinding == nil {
- return nil, fmt.Errorf("kameletBinding provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(kameletBinding)
- if err != nil {
- return nil, err
- }
- name := kameletBinding.Name
- if name == nil {
- return nil, fmt.Errorf("kameletBinding.Name must be provided to Apply")
- }
- result = &v1alpha1.KameletBinding{}
- err = c.client.Patch(types.ApplyPatchType).
- Namespace(c.ns).
- Resource("kameletbindings").
- Name(*name).
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// ApplyStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
-func (c *kameletBindings) ApplyStatus(ctx context.Context, kameletBinding *camelv1alpha1.KameletBindingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.KameletBinding, err error) {
- if kameletBinding == nil {
- return nil, fmt.Errorf("kameletBinding provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(kameletBinding)
- if err != nil {
- return nil, err
- }
-
- name := kameletBinding.Name
- if name == nil {
- return nil, fmt.Errorf("kameletBinding.Name must be provided to Apply")
- }
-
- result = &v1alpha1.KameletBinding{}
- err = c.client.Patch(types.ApplyPatchType).
- Namespace(c.ns).
- Resource("kameletbindings").
- Name(*name).
- SubResource("status").
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// GetScale takes name of the kameletBinding, and returns the corresponding autoscalingv1.Scale object, and an error if there is any.
-func (c *kameletBindings) GetScale(ctx context.Context, kameletBindingName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) {
- result = &autoscalingv1.Scale{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("kameletbindings").
- Name(kameletBindingName).
- SubResource("scale").
- VersionedParams(&options, scheme.ParameterCodec).
- Do(ctx).
- Into(result)
- return
-}
-
-// UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
-func (c *kameletBindings) UpdateScale(ctx context.Context, kameletBindingName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (result *autoscalingv1.Scale, err error) {
- result = &autoscalingv1.Scale{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("kameletbindings").
- Name(kameletBindingName).
- SubResource("scale").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(scale).
- Do(ctx).
- Into(result)
- return
-}
diff --git a/pkg/client/camel/informers/externalversions/camel/v1alpha1/kameletbinding.go b/pkg/client/camel/informers/externalversions/camel/v1alpha1/binding.go
similarity index 58%
rename from pkg/client/camel/informers/externalversions/camel/v1alpha1/kameletbinding.go
rename to pkg/client/camel/informers/externalversions/camel/v1alpha1/binding.go
index 7dc014bae..8e7804fbd 100644
--- a/pkg/client/camel/informers/externalversions/camel/v1alpha1/kameletbinding.go
+++ b/pkg/client/camel/informers/externalversions/camel/v1alpha1/binding.go
@@ -33,59 +33,59 @@ import (
cache "k8s.io/client-go/tools/cache"
)
-// KameletBindingInformer provides access to a shared informer and lister for
-// KameletBindings.
-type KameletBindingInformer interface {
+// BindingInformer provides access to a shared informer and lister for
+// Bindings.
+type BindingInformer interface {
Informer() cache.SharedIndexInformer
- Lister() v1alpha1.KameletBindingLister
+ Lister() v1alpha1.BindingLister
}
-type kameletBindingInformer struct {
+type bindingInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
-// NewKameletBindingInformer constructs a new informer for KameletBinding type.
+// NewBindingInformer constructs a new informer for Binding type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
-func NewKameletBindingInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredKameletBindingInformer(client, namespace, resyncPeriod, indexers, nil)
+func NewBindingInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
+ return NewFilteredBindingInformer(client, namespace, resyncPeriod, indexers, nil)
}
-// NewFilteredKameletBindingInformer constructs a new informer for KameletBinding type.
+// NewFilteredBindingInformer constructs a new informer for Binding type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredKameletBindingInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
+func NewFilteredBindingInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
- return client.CamelV1alpha1().KameletBindings(namespace).List(context.TODO(), options)
+ return client.CamelV1alpha1().Bindings(namespace).List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
- return client.CamelV1alpha1().KameletBindings(namespace).Watch(context.TODO(), options)
+ return client.CamelV1alpha1().Bindings(namespace).Watch(context.TODO(), options)
},
},
- &camelv1alpha1.KameletBinding{},
+ &camelv1alpha1.Binding{},
resyncPeriod,
indexers,
)
}
-func (f *kameletBindingInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredKameletBindingInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
+func (f *bindingInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
+ return NewFilteredBindingInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
-func (f *kameletBindingInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&camelv1alpha1.KameletBinding{}, f.defaultInformer)
+func (f *bindingInformer) Informer() cache.SharedIndexInformer {
+ return f.factory.InformerFor(&camelv1alpha1.Binding{}, f.defaultInformer)
}
-func (f *kameletBindingInformer) Lister() v1alpha1.KameletBindingLister {
- return v1alpha1.NewKameletBindingLister(f.Informer().GetIndexer())
+func (f *bindingInformer) Lister() v1alpha1.BindingLister {
+ return v1alpha1.NewBindingLister(f.Informer().GetIndexer())
}
diff --git a/pkg/client/camel/informers/externalversions/camel/v1alpha1/interface.go b/pkg/client/camel/informers/externalversions/camel/v1alpha1/interface.go
index ef032869e..20496d8f5 100644
--- a/pkg/client/camel/informers/externalversions/camel/v1alpha1/interface.go
+++ b/pkg/client/camel/informers/externalversions/camel/v1alpha1/interface.go
@@ -25,10 +25,10 @@ import (
// Interface provides access to all the informers in this group version.
type Interface interface {
+ // Bindings returns a BindingInformer.
+ Bindings() BindingInformer
// Kamelets returns a KameletInformer.
Kamelets() KameletInformer
- // KameletBindings returns a KameletBindingInformer.
- KameletBindings() KameletBindingInformer
}
type version struct {
@@ -42,12 +42,12 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
+// Bindings returns a BindingInformer.
+func (v *version) Bindings() BindingInformer {
+ return &bindingInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
+}
+
// Kamelets returns a KameletInformer.
func (v *version) Kamelets() KameletInformer {
return &kameletInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
-
-// KameletBindings returns a KameletBindingInformer.
-func (v *version) KameletBindings() KameletBindingInformer {
- return &kameletBindingInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
diff --git a/pkg/client/camel/informers/externalversions/generic.go b/pkg/client/camel/informers/externalversions/generic.go
index d89c46e4a..9a6b9561c 100644
--- a/pkg/client/camel/informers/externalversions/generic.go
+++ b/pkg/client/camel/informers/externalversions/generic.go
@@ -67,10 +67,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
return &genericInformer{resource: resource.GroupResource(), informer: f.Camel().V1().IntegrationPlatforms().Informer()}, nil
// Group=camel.apache.org, Version=v1alpha1
+ case v1alpha1.SchemeGroupVersion.WithResource("bindings"):
+ return &genericInformer{resource: resource.GroupResource(), informer: f.Camel().V1alpha1().Bindings().Informer()}, nil
case v1alpha1.SchemeGroupVersion.WithResource("kamelets"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Camel().V1alpha1().Kamelets().Informer()}, nil
- case v1alpha1.SchemeGroupVersion.WithResource("kameletbindings"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Camel().V1alpha1().KameletBindings().Informer()}, nil
}
diff --git a/pkg/client/camel/listers/camel/v1alpha1/binding.go b/pkg/client/camel/listers/camel/v1alpha1/binding.go
new file mode 100644
index 000000000..eaf56d29f
--- /dev/null
+++ b/pkg/client/camel/listers/camel/v1alpha1/binding.go
@@ -0,0 +1,100 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Code generated by lister-gen. DO NOT EDIT.
+
+package v1alpha1
+
+import (
+ v1alpha1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1alpha1"
+ "k8s.io/apimachinery/pkg/api/errors"
+ "k8s.io/apimachinery/pkg/labels"
+ "k8s.io/client-go/tools/cache"
+)
+
+// BindingLister helps list Bindings.
+// All objects returned here must be treated as read-only.
+type BindingLister interface {
+ // List lists all Bindings in the indexer.
+ // Objects returned here must be treated as read-only.
+ List(selector labels.Selector) (ret []*v1alpha1.Binding, err error)
+ // Bindings returns an object that can list and get Bindings.
+ Bindings(namespace string) BindingNamespaceLister
+ BindingListerExpansion
+}
+
+// bindingLister implements the BindingLister interface.
+type bindingLister struct {
+ indexer cache.Indexer
+}
+
+// NewBindingLister returns a new BindingLister.
+func NewBindingLister(indexer cache.Indexer) BindingLister {
+ return &bindingLister{indexer: indexer}
+}
+
+// List lists all Bindings in the indexer.
+func (s *bindingLister) List(selector labels.Selector) (ret []*v1alpha1.Binding, err error) {
+ err = cache.ListAll(s.indexer, selector, func(m interface{}) {
+ ret = append(ret, m.(*v1alpha1.Binding))
+ })
+ return ret, err
+}
+
+// Bindings returns an object that can list and get Bindings.
+func (s *bindingLister) Bindings(namespace string) BindingNamespaceLister {
+ return bindingNamespaceLister{indexer: s.indexer, namespace: namespace}
+}
+
+// BindingNamespaceLister helps list and get Bindings.
+// All objects returned here must be treated as read-only.
+type BindingNamespaceLister interface {
+ // List lists all Bindings in the indexer for a given namespace.
+ // Objects returned here must be treated as read-only.
+ List(selector labels.Selector) (ret []*v1alpha1.Binding, err error)
+ // Get retrieves the Binding from the indexer for a given namespace and name.
+ // Objects returned here must be treated as read-only.
+ Get(name string) (*v1alpha1.Binding, error)
+ BindingNamespaceListerExpansion
+}
+
+// bindingNamespaceLister implements the BindingNamespaceLister
+// interface.
+type bindingNamespaceLister struct {
+ indexer cache.Indexer
+ namespace string
+}
+
+// List lists all Bindings in the indexer for a given namespace.
+func (s bindingNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.Binding, err error) {
+ err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
+ ret = append(ret, m.(*v1alpha1.Binding))
+ })
+ return ret, err
+}
+
+// Get retrieves the Binding from the indexer for a given namespace and name.
+func (s bindingNamespaceLister) Get(name string) (*v1alpha1.Binding, error) {
+ obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
+ if err != nil {
+ return nil, err
+ }
+ if !exists {
+ return nil, errors.NewNotFound(v1alpha1.Resource("binding"), name)
+ }
+ return obj.(*v1alpha1.Binding), nil
+}
diff --git a/pkg/client/camel/listers/camel/v1alpha1/expansion_generated.go b/pkg/client/camel/listers/camel/v1alpha1/expansion_generated.go
index df951a562..825b05f1e 100644
--- a/pkg/client/camel/listers/camel/v1alpha1/expansion_generated.go
+++ b/pkg/client/camel/listers/camel/v1alpha1/expansion_generated.go
@@ -19,6 +19,14 @@ limitations under the License.
package v1alpha1
+// BindingListerExpansion allows custom methods to be added to
+// BindingLister.
+type BindingListerExpansion interface{}
+
+// BindingNamespaceListerExpansion allows custom methods to be added to
+// BindingNamespaceLister.
+type BindingNamespaceListerExpansion interface{}
+
// KameletListerExpansion allows custom methods to be added to
// KameletLister.
type KameletListerExpansion interface{}
@@ -26,11 +34,3 @@ type KameletListerExpansion interface{}
// KameletNamespaceListerExpansion allows custom methods to be added to
// KameletNamespaceLister.
type KameletNamespaceListerExpansion interface{}
-
-// KameletBindingListerExpansion allows custom methods to be added to
-// KameletBindingLister.
-type KameletBindingListerExpansion interface{}
-
-// KameletBindingNamespaceListerExpansion allows custom methods to be added to
-// KameletBindingNamespaceLister.
-type KameletBindingNamespaceListerExpansion interface{}
diff --git a/pkg/client/camel/listers/camel/v1alpha1/kameletbinding.go b/pkg/client/camel/listers/camel/v1alpha1/kameletbinding.go
deleted file mode 100644
index aa53b58de..000000000
--- a/pkg/client/camel/listers/camel/v1alpha1/kameletbinding.go
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-// Code generated by lister-gen. DO NOT EDIT.
-
-package v1alpha1
-
-import (
- v1alpha1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1alpha1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/labels"
- "k8s.io/client-go/tools/cache"
-)
-
-// KameletBindingLister helps list KameletBindings.
-// All objects returned here must be treated as read-only.
-type KameletBindingLister interface {
- // List lists all KameletBindings in the indexer.
- // Objects returned here must be treated as read-only.
- List(selector labels.Selector) (ret []*v1alpha1.KameletBinding, err error)
- // KameletBindings returns an object that can list and get KameletBindings.
- KameletBindings(namespace string) KameletBindingNamespaceLister
- KameletBindingListerExpansion
-}
-
-// kameletBindingLister implements the KameletBindingLister interface.
-type kameletBindingLister struct {
- indexer cache.Indexer
-}
-
-// NewKameletBindingLister returns a new KameletBindingLister.
-func NewKameletBindingLister(indexer cache.Indexer) KameletBindingLister {
- return &kameletBindingLister{indexer: indexer}
-}
-
-// List lists all KameletBindings in the indexer.
-func (s *kameletBindingLister) List(selector labels.Selector) (ret []*v1alpha1.KameletBinding, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha1.KameletBinding))
- })
- return ret, err
-}
-
-// KameletBindings returns an object that can list and get KameletBindings.
-func (s *kameletBindingLister) KameletBindings(namespace string) KameletBindingNamespaceLister {
- return kameletBindingNamespaceLister{indexer: s.indexer, namespace: namespace}
-}
-
-// KameletBindingNamespaceLister helps list and get KameletBindings.
-// All objects returned here must be treated as read-only.
-type KameletBindingNamespaceLister interface {
- // List lists all KameletBindings in the indexer for a given namespace.
- // Objects returned here must be treated as read-only.
- List(selector labels.Selector) (ret []*v1alpha1.KameletBinding, err error)
- // Get retrieves the KameletBinding from the indexer for a given namespace and name.
- // Objects returned here must be treated as read-only.
- Get(name string) (*v1alpha1.KameletBinding, error)
- KameletBindingNamespaceListerExpansion
-}
-
-// kameletBindingNamespaceLister implements the KameletBindingNamespaceLister
-// interface.
-type kameletBindingNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all KameletBindings in the indexer for a given namespace.
-func (s kameletBindingNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.KameletBinding, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha1.KameletBinding))
- })
- return ret, err
-}
-
-// Get retrieves the KameletBinding from the indexer for a given namespace and name.
-func (s kameletBindingNamespaceLister) Get(name string) (*v1alpha1.KameletBinding, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1alpha1.Resource("kameletbinding"), name)
- }
- return obj.(*v1alpha1.KameletBinding), nil
-}
diff --git a/pkg/cmd/bind.go b/pkg/cmd/bind.go
index 8c013c9d6..a2cd8979c 100644
--- a/pkg/cmd/bind.go
+++ b/pkg/cmd/bind.go
@@ -60,9 +60,9 @@ func newCmdBind(rootCmdOptions *RootCmdOptions) (*cobra.Command, *bindCmdOptions
cmd.Flags().Bool("skip-checks", false, "Do not verify the binding for compliance with Kamelets and other Kubernetes resources")
cmd.Flags().StringArray("step", nil, `Add binding steps as Kubernetes resources. Endpoints are expected in the format "[[apigroup/]version:]kind:[namespace/]name", plain Camel URIs or Kamelet name.`)
cmd.Flags().StringArrayP("trait", "t", nil, `Add a trait to the corresponding Integration.`)
- cmd.Flags().StringP("operator-id", "x", "camel-k", "Operator id selected to manage this Kamelet binding.")
- cmd.Flags().StringArray("annotation", nil, "Add an annotation to the Kamelet binding. E.g. \"--annotation my.company=hello\"")
- cmd.Flags().Bool("force", false, "Force creation of Kamelet binding regardless of potential misconfiguration.")
+ cmd.Flags().StringP("operator-id", "x", "camel-k", "Operator id selected to manage thisBinding.")
+ cmd.Flags().StringArray("annotation", nil, "Add an annotation to theBinding. E.g. \"--annotation my.company=hello\"")
+ cmd.Flags().Bool("force", false, "Force creation ofBinding regardless of potential misconfiguration.")
cmd.Flags().String("service-account", "", "The SA to use to run this binding")
return &cmd, &options
@@ -190,12 +190,12 @@ func (o *bindCmdOptions) run(cmd *cobra.Command, args []string) error {
name := o.nameFor(source, sink)
- binding := v1alpha1.KameletBinding{
+ binding := v1alpha1.Binding{
ObjectMeta: metav1.ObjectMeta{
Namespace: o.Namespace,
Name: name,
},
- Spec: v1alpha1.KameletBindingSpec{
+ Spec: v1alpha1.BindingSpec{
Source: source,
Sink: sink,
},
@@ -264,7 +264,7 @@ func (o *bindCmdOptions) run(cmd *cobra.Command, args []string) error {
}
if o.OutputFormat != "" {
- return showKameletBindingOutput(cmd, &binding, o.OutputFormat, client.GetScheme())
+ return showBindingOutput(cmd, &binding, o.OutputFormat, client.GetScheme())
}
replaced, err := kubernetes.ReplaceResource(o.Context, client, &binding)
@@ -280,7 +280,7 @@ func (o *bindCmdOptions) run(cmd *cobra.Command, args []string) error {
return nil
}
-func showKameletBindingOutput(cmd *cobra.Command, binding *v1alpha1.KameletBinding, outputFormat string, scheme runtime.ObjectTyper) error {
+func showBindingOutput(cmd *cobra.Command, binding *v1alpha1.Binding, outputFormat string, scheme runtime.ObjectTyper) error {
printer := printers.NewTypeSetter(scheme)
printer.Delegate = &kubernetes.CLIPrinter{
Format: outputFormat,
diff --git a/pkg/cmd/bind_test.go b/pkg/cmd/bind_test.go
index 03b1247e6..050875908 100644
--- a/pkg/cmd/bind_test.go
+++ b/pkg/cmd/bind_test.go
@@ -57,7 +57,7 @@ func TestBindOutputJSON(t *testing.T) {
assert.Equal(t, "json", buildCmdOptions.OutputFormat)
assert.Nil(t, err)
- assert.Equal(t, `{"kind":"KameletBinding","apiVersion":"camel.apache.org/v1alpha1","metadata":{"name":"my-to-my","creationTimestamp":null,"annotations":{"camel.apache.org/operator.id":"camel-k"}},"spec":{"source":{"uri":"my:src"},"sink":{"uri":"my:dst"}},"status":{}}`, output)
+ assert.Equal(t, `{"kind":"Binding","apiVersion":"camel.apache.org/v1alpha1","metadata":{"name":"my-to-my","creationTimestamp":null,"annotations":{"camel.apache.org/operator.id":"camel-k"}},"spec":{"source":{"uri":"my:src"},"sink":{"uri":"my:dst"}},"status":{}}`, output)
}
func TestBindOutputYAML(t *testing.T) {
@@ -67,7 +67,7 @@ func TestBindOutputYAML(t *testing.T) {
assert.Nil(t, err)
assert.Equal(t, `apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
annotations:
camel.apache.org/operator.id: camel-k
@@ -98,7 +98,7 @@ func TestBindErrorHandlerDLCKamelet(t *testing.T) {
assert.Nil(t, err)
assert.Equal(t, `apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
annotations:
camel.apache.org/operator.id: camel-k
@@ -130,7 +130,7 @@ func TestBindErrorHandlerNone(t *testing.T) {
assert.Nil(t, err)
assert.Equal(t, `apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
annotations:
camel.apache.org/operator.id: camel-k
@@ -155,7 +155,7 @@ func TestBindErrorHandlerLog(t *testing.T) {
assert.Nil(t, err)
assert.Equal(t, `apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
annotations:
camel.apache.org/operator.id: camel-k
@@ -179,7 +179,7 @@ func TestBindTraits(t *testing.T) {
assert.Nil(t, err)
assert.Equal(t, `apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
annotations:
camel.apache.org/operator.id: camel-k
@@ -212,7 +212,7 @@ func TestBindSteps(t *testing.T) {
assert.Nil(t, err)
assert.Equal(t, `apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
annotations:
camel.apache.org/operator.id: camel-k
diff --git a/pkg/cmd/delete.go b/pkg/cmd/delete.go
index 554a39b04..e2707f07d 100644
--- a/pkg/cmd/delete.go
+++ b/pkg/cmd/delete.go
@@ -136,25 +136,25 @@ func getIntegration(ctx context.Context, c client.Client, name string, namespace
}
func deleteIntegration(ctx context.Context, cmd *cobra.Command, c client.Client, integration *v1.Integration) error {
- deleted, binding, err := deleteKameletBindingIfExists(ctx, c, integration)
+ deleted, binding, err := deleteBindingIfExists(ctx, c, integration)
if err != nil {
return err
}
if deleted {
- // Deleting KameletBinding will automatically clean up the integration
- fmt.Fprintln(cmd.OutOrStdout(), "KameletBinding "+binding+" deleted")
+ // Deleting Binding will automatically clean up the integration
+ fmt.Fprintln(cmd.OutOrStdout(), "Binding "+binding+" deleted")
return nil
}
return c.Delete(ctx, integration)
}
-func deleteKameletBindingIfExists(ctx context.Context, c client.Client, integration *v1.Integration) (bool, string, error) {
+func deleteBindingIfExists(ctx context.Context, c client.Client, integration *v1.Integration) (bool, string, error) {
kind, name := findCreator(integration)
- if kind != v1alpha1.KameletBindingKind || name == "" {
+ if kind != v1alpha1.BindingKind || name == "" {
return false, "", nil
}
- binding := v1alpha1.KameletBinding{
+ binding := v1alpha1.Binding{
TypeMeta: metav1.TypeMeta{
Kind: kind,
APIVersion: v1alpha1.SchemeGroupVersion.String(),
@@ -178,7 +178,7 @@ func findCreator(integration *v1.Integration) (string, string) {
if kind == "" && name == "" {
// Look up in OwnerReferences in case creator labels are absent
for _, owner := range integration.GetOwnerReferences() {
- if owner.Kind == v1alpha1.KameletBindingKind {
+ if owner.Kind == v1alpha1.BindingKind {
return owner.Kind, owner.Name
}
}
diff --git a/pkg/cmd/promote.go b/pkg/cmd/promote.go
index b83bcd2f0..fc05b8de8 100644
--- a/pkg/cmd/promote.go
+++ b/pkg/cmd/promote.go
@@ -52,8 +52,8 @@ func newCmdPromote(rootCmdOptions *RootCmdOptions) (*cobra.Command, *promoteCmdO
}
cmd := cobra.Command{
Use: "promote my-it --to [namespace]",
- Short: "Promote an Integration/KameletBinding from an environment to another",
- Long: "Promote an Integration/KameletBinding from an environment to another, for example from a Development environment to a Production environment",
+ Short: "Promote an Integration/Binding from an environment to another",
+ Long: "Promote an Integration/Binding from an environment to another, for example from a Development environment to a Production environment",
PreRunE: decode(&options),
RunE: options.run,
}
@@ -72,7 +72,7 @@ type promoteCmdOptions struct {
func (o *promoteCmdOptions) validate(_ *cobra.Command, args []string) error {
if len(args) != 1 {
- return errors.New("promote expects an Integration/KameletBinding name argument")
+ return errors.New("promote expects an Integration/Binding name argument")
}
if o.To == "" {
return errors.New("promote expects a destination namespace as --to argument")
@@ -103,15 +103,15 @@ func (o *promoteCmdOptions) run(cmd *cobra.Command, args []string) error {
if err != nil {
return errors.Wrap(err, "could not verify operators compatibility")
}
- promoteKameletBinding := false
+ promoteBinding := false
var sourceIntegration *v1.Integration
- // We first look if a KameletBinding with the name exists
- sourceKameletBinding, err := o.getKameletBinding(c, name)
+ // We first look if a Binding with the name exists
+ sourceBinding, err := o.getBinding(c, name)
if err != nil && !k8serrors.IsNotFound(err) {
- return errors.Wrap(err, "problems looking for KameletBinding "+name)
+ return errors.Wrap(err, "problems looking for Binding "+name)
}
- if sourceKameletBinding != nil {
- promoteKameletBinding = true
+ if sourceBinding != nil {
+ promoteBinding = true
}
sourceIntegration, err = o.getIntegration(c, name)
if err != nil {
@@ -125,17 +125,17 @@ func (o *promoteCmdOptions) run(cmd *cobra.Command, args []string) error {
return errors.Wrap(err, "could not validate destination resources")
}
- // KameletBinding promotion
- if promoteKameletBinding {
- destKameletBinding := o.editKameletBinding(sourceKameletBinding, sourceIntegration)
+ // Binding promotion
+ if promoteBinding {
+ destBinding := o.editBinding(sourceBinding, sourceIntegration)
// Ensure the destination namespace has access to the source namespace images
- err = addSystemPullerRoleBinding(o.Context, c, sourceIntegration.Namespace, destKameletBinding.Namespace)
+ err = addSystemPullerRoleBinding(o.Context, c, sourceIntegration.Namespace, destBinding.Namespace)
if err != nil {
return err
}
- replaced, err := o.replaceResource(destKameletBinding)
+ replaced, err := o.replaceResource(destBinding)
if o.OutputFormat != "" {
- return showKameletBindingOutput(cmd, destKameletBinding, o.OutputFormat, c.GetScheme())
+ return showBindingOutput(cmd, destBinding, o.OutputFormat, c.GetScheme())
}
if !replaced {
fmt.Fprintln(cmd.OutOrStdout(), `Promoted Integration "`+name+`" created`)
@@ -178,8 +178,8 @@ func checkOpsCompatibility(cmd *cobra.Command, source, dest map[string]string) e
return nil
}
-func (o *promoteCmdOptions) getKameletBinding(c client.Client, name string) (*v1alpha1.KameletBinding, error) {
- it := v1alpha1.NewKameletBinding(o.Namespace, name)
+func (o *promoteCmdOptions) getBinding(c client.Client, name string) (*v1alpha1.Binding, error) {
+ it := v1alpha1.NewBinding(o.Namespace, name)
key := k8sclient.ObjectKey{
Name: name,
Namespace: o.Namespace,
@@ -446,8 +446,8 @@ func (o *promoteCmdOptions) editIntegration(it *v1.Integration) *v1.Integration
return &dst
}
-func (o *promoteCmdOptions) editKameletBinding(kb *v1alpha1.KameletBinding, it *v1.Integration) *v1alpha1.KameletBinding {
- dst := v1alpha1.NewKameletBinding(o.To, kb.Name)
+func (o *promoteCmdOptions) editBinding(kb *v1alpha1.Binding, it *v1.Integration) *v1alpha1.Binding {
+ dst := v1alpha1.NewBinding(o.To, kb.Name)
dst.Spec = *kb.Spec.DeepCopy()
contImage := it.Status.Image
if dst.Spec.Integration == nil {
diff --git a/pkg/cmd/promote_test.go b/pkg/cmd/promote_test.go
index 8fd74064e..1fab665d0 100644
--- a/pkg/cmd/promote_test.go
+++ b/pkg/cmd/promote_test.go
@@ -114,7 +114,7 @@ func nominalIntegration(name string) v1.Integration {
return it
}
-func TestKameletBindingDryRun(t *testing.T) {
+func TestBindingDryRun(t *testing.T) {
srcPlatform := v1.NewIntegrationPlatform("default", platform.DefaultPlatformName)
srcPlatform.Status.Version = defaults.Version
srcPlatform.Status.Build.RuntimeVersion = defaults.DefaultRuntimeVersion
@@ -123,7 +123,7 @@ func TestKameletBindingDryRun(t *testing.T) {
dstPlatform.Status.Version = defaults.Version
dstPlatform.Status.Build.RuntimeVersion = defaults.DefaultRuntimeVersion
dstPlatform.Status.Phase = v1.IntegrationPlatformPhaseReady
- defaultKB := nominalKameletBinding("my-kb-test")
+ defaultKB := nominalBinding("my-kb-test")
defaultIntegration := nominalIntegration("my-kb-test")
srcCatalog := createCamelCatalog(srcPlatform)
dstCatalog := createCamelCatalog(dstPlatform)
@@ -133,7 +133,7 @@ func TestKameletBindingDryRun(t *testing.T) {
assert.Equal(t, "yaml", promoteCmdOptions.OutputFormat)
assert.Nil(t, err)
assert.Equal(t, `apiVersion: camel.apache.org/v1alpha1
-kind: KameletBinding
+kind: Binding
metadata:
creationTimestamp: null
name: my-kb-test
@@ -150,9 +150,9 @@ status: {}
`, output)
}
-func nominalKameletBinding(name string) v1alpha1.KameletBinding {
- kb := v1alpha1.NewKameletBinding("default", name)
- kb.Status.Phase = v1alpha1.KameletBindingPhaseReady
+func nominalBinding(name string) v1alpha1.Binding {
+ kb := v1alpha1.NewBinding("default", name)
+ kb.Status.Phase = v1alpha1.BindingPhaseReady
return kb
}
diff --git a/pkg/cmd/reset.go b/pkg/cmd/reset.go
index f3eb15d3e..c91c5cf27 100644
--- a/pkg/cmd/reset.go
+++ b/pkg/cmd/reset.go
@@ -49,9 +49,9 @@ func newCmdReset(rootCmdOptions *RootCmdOptions) (*cobra.Command, *resetCmdOptio
type resetCmdOptions struct {
*RootCmdOptions
- SkipKits bool `mapstructure:"skip-kits"`
- SkipIntegrations bool `mapstructure:"skip-integrations"`
- SkipKameletBindings bool `mapstructure:"skip-kamelet-bindings"`
+ SkipKits bool `mapstructure:"skip-kits"`
+ SkipIntegrations bool `mapstructure:"skip-integrations"`
+ SkipBindings bool `mapstructure:"skip-kamelet-bindings"`
}
func (o *resetCmdOptions) reset(cmd *cobra.Command, _ []string) {
@@ -62,8 +62,8 @@ func (o *resetCmdOptions) reset(cmd *cobra.Command, _ []string) {
}
var n int
- if !o.SkipKameletBindings {
- if n, err = o.deleteAllKameletBindings(c); err != nil {
+ if !o.SkipBindings {
+ if n, err = o.deleteAllBindings(c); err != nil {
fmt.Fprint(cmd.ErrOrStderr(), err)
return
}
@@ -126,15 +126,15 @@ func (o *resetCmdOptions) deleteAllIntegrationKits(c client.Client) (int, error)
return len(list.Items), nil
}
-func (o *resetCmdOptions) deleteAllKameletBindings(c client.Client) (int, error) {
- list := v1alpha1.NewKameletBindingList()
+func (o *resetCmdOptions) deleteAllBindings(c client.Client) (int, error) {
+ list := v1alpha1.NewBindingList()
if err := c.List(o.Context, &list, k8sclient.InNamespace(o.Namespace)); err != nil {
- return 0, errors.Wrap(err, fmt.Sprintf("could not retrieve kamelet bindings from namespace %s", o.Namespace))
+ return 0, errors.Wrap(err, fmt.Sprintf("could not retrieveBindings from namespace %s", o.Namespace))
}
for _, i := range list.Items {
klb := i
if err := c.Delete(o.Context, &klb); err != nil {
- return 0, errors.Wrap(err, fmt.Sprintf("could not delete kamelet binding %s from namespace %s", klb.Name, klb.Namespace))
+ return 0, errors.Wrap(err, fmt.Sprintf("could not deleteBinding %s from namespace %s", klb.Name, klb.Namespace))
}
}
return len(list.Items), nil
diff --git a/pkg/controller/add_kameletbinding.go b/pkg/controller/add_kameletbinding.go
index c517b61b0..9e977f7a1 100644
--- a/pkg/controller/add_kameletbinding.go
+++ b/pkg/controller/add_kameletbinding.go
@@ -18,9 +18,9 @@ limitations under the License.
package controller
import (
- "github.com/apache/camel-k/v2/pkg/controller/kameletbinding"
+ "github.com/apache/camel-k/v2/pkg/controller/binding"
)
func init() {
- addToManager = append(addToManager, kameletbinding.Add)
+ addToManager = append(addToManager, binding.Add)
}
diff --git a/pkg/controller/kameletbinding/action.go b/pkg/controller/binding/action.go
similarity index 85%
rename from pkg/controller/kameletbinding/action.go
rename to pkg/controller/binding/action.go
index f24970a86..a61bfccad 100644
--- a/pkg/controller/kameletbinding/action.go
+++ b/pkg/controller/binding/action.go
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package kameletbinding
+package binding
import (
"context"
@@ -33,11 +33,11 @@ type Action interface {
// a user friendly name for the action
Name() string
- // returns true if the action can handle the kameletBinding
- CanHandle(kamelet *v1alpha1.KameletBinding) bool
+ // returns true if the action can handle the binding
+ CanHandle(kamelet *v1alpha1.Binding) bool
// executes the handling function
- Handle(ctx context.Context, kamelet *v1alpha1.KameletBinding) (*v1alpha1.KameletBinding, error)
+ Handle(ctx context.Context, kamelet *v1alpha1.Binding) (*v1alpha1.Binding, error)
}
type baseAction struct {
diff --git a/pkg/controller/kameletbinding/kamelet_binding_controller.go b/pkg/controller/binding/binding_controller.go
similarity index 73%
rename from pkg/controller/kameletbinding/kamelet_binding_controller.go
rename to pkg/controller/binding/binding_controller.go
index a8dfda3f0..4a138cc2b 100644
--- a/pkg/controller/kameletbinding/kamelet_binding_controller.go
+++ b/pkg/controller/binding/binding_controller.go
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package kameletbinding
+package binding
import (
"context"
@@ -44,7 +44,7 @@ import (
"github.com/apache/camel-k/v2/pkg/util/monitoring"
)
-// Add creates a new KameletBinding Controller and adds it to the Manager. The Manager will set fields on the Controller
+// Add creates a new Binding Controller and adds it to the Manager. The Manager will set fields on the Controller
// and Start it when the Manager is Started.
func Add(ctx context.Context, mgr manager.Manager, c client.Client) error {
return add(mgr, newReconciler(mgr, c))
@@ -52,7 +52,7 @@ func Add(ctx context.Context, mgr manager.Manager, c client.Client) error {
func newReconciler(mgr manager.Manager, c client.Client) reconcile.Reconciler {
return monitoring.NewInstrumentedReconciler(
- &ReconcileKameletBinding{
+ &ReconcileBinding{
client: c,
scheme: mgr.GetScheme(),
recorder: mgr.GetEventRecorderFor("camel-k-kamelet-binding-controller"),
@@ -60,7 +60,7 @@ func newReconciler(mgr manager.Manager, c client.Client) reconcile.Reconciler {
schema.GroupVersionKind{
Group: v1alpha1.SchemeGroupVersion.Group,
Version: v1alpha1.SchemeGroupVersion.Version,
- Kind: v1alpha1.KameletBindingKind,
+ Kind: v1alpha1.BindingKind,
},
)
}
@@ -71,25 +71,25 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
return err
}
- // Watch for changes to primary resource KameletBinding
- err = c.Watch(&source.Kind{Type: &v1alpha1.KameletBinding{}},
+ // Watch for changes to primary resource Binding
+ err = c.Watch(&source.Kind{Type: &v1alpha1.Binding{}},
&handler.EnqueueRequestForObject{},
platform.FilteringFuncs{
UpdateFunc: func(e event.UpdateEvent) bool {
- oldKameletBinding, ok := e.ObjectOld.(*v1alpha1.KameletBinding)
+ oldBinding, ok := e.ObjectOld.(*v1alpha1.Binding)
if !ok {
return false
}
- newKameletBinding, ok := e.ObjectNew.(*v1alpha1.KameletBinding)
+ newBinding, ok := e.ObjectNew.(*v1alpha1.Binding)
if !ok {
return false
}
// If traits have changed, the reconciliation loop must kick in as
// traits may have impact
- sameTraits, err := trait.KameletBindingsHaveSameTraits(oldKameletBinding, newKameletBinding)
+ sameTraits, err := trait.BindingsHaveSameTraits(oldBinding, newBinding)
if err != nil {
- Log.ForKameletBinding(newKameletBinding).Error(
+ Log.ForBinding(newBinding).Error(
err,
"unable to determine if old and new resource have the same traits")
}
@@ -97,11 +97,11 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
return true
}
- // Ignore updates to the kameletBinding status in which case metadata.Generation
- // does not change, or except when the kameletBinding phase changes as it's used
+ // Ignore updates to the binding status in which case metadata.Generation
+ // does not change, or except when the binding phase changes as it's used
// to transition from one phase to another
- return oldKameletBinding.Generation != newKameletBinding.Generation ||
- oldKameletBinding.Status.Phase != newKameletBinding.Status.Phase
+ return oldBinding.Generation != newBinding.Generation ||
+ oldBinding.Status.Phase != newBinding.Status.Phase
},
DeleteFunc: func(e event.DeleteEvent) bool {
// Evaluates to false if the object has been confirmed deleted
@@ -115,7 +115,7 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
// Watch Integration to propagate changes downstream
err = c.Watch(&source.Kind{Type: &v1.Integration{}}, &handler.EnqueueRequestForOwner{
- OwnerType: &v1alpha1.KameletBinding{},
+ OwnerType: &v1alpha1.Binding{},
IsController: false,
})
if err != nil {
@@ -125,10 +125,10 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
return nil
}
-var _ reconcile.Reconciler = &ReconcileKameletBinding{}
+var _ reconcile.Reconciler = &ReconcileBinding{}
-// ReconcileKameletBinding reconciles a KameletBinding object.
-type ReconcileKameletBinding struct {
+// ReconcileBinding reconciles a Binding object.
+type ReconcileBinding struct {
// This client, initialized using mgr.Client() above, is a split client
// that reads objects from the cache and writes to the API server
client client.Client
@@ -136,14 +136,14 @@ type ReconcileKameletBinding struct {
recorder record.EventRecorder
}
-// Reconcile reads that state of the cluster for a KameletBinding object and makes changes based
-// on the state read and what is in the KameletBinding.Spec
+// Reconcile reads that state of the cluster for a Binding object and makes changes based
+// on the state read and what is in the Binding.Spec
// Note:
// The Controller will requeue the Request to be processed again if the returned error is non-nil or
// Result.Requeue is true, otherwise upon completion it will remove the work from the queue.
-func (r *ReconcileKameletBinding) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error) {
+func (r *ReconcileBinding) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error) {
rlog := Log.WithValues("request-namespace", request.Namespace, "request-name", request.Name)
- rlog.Info("Reconciling KameletBinding")
+ rlog.Info("Reconciling Binding")
// Make sure the operator is allowed to act on namespace
if ok, err := platform.IsOperatorAllowedOnNamespace(ctx, r.client, request.Namespace); err != nil {
@@ -153,8 +153,8 @@ func (r *ReconcileKameletBinding) Reconcile(ctx context.Context, request reconci
return reconcile.Result{}, nil
}
- // Fetch the KameletBinding instance
- var instance v1alpha1.KameletBinding
+ // Fetch the Binding instance
+ var instance v1alpha1.Binding
if err := r.client.Get(ctx, request.NamespacedName, &instance); err != nil {
if errors.IsNotFound(err) {
@@ -183,7 +183,7 @@ func (r *ReconcileKameletBinding) Reconcile(ctx context.Context, request reconci
var err error
target := instance.DeepCopy()
- targetLog := rlog.ForKameletBinding(target)
+ targetLog := rlog.ForBinding(target)
for _, a := range actions {
a.InjectClient(r.client)
@@ -194,8 +194,8 @@ func (r *ReconcileKameletBinding) Reconcile(ctx context.Context, request reconci
target, err = a.Handle(ctx, target)
if err != nil {
- camelevent.NotifyKameletBindingError(ctx, r.client, r.recorder, &instance, target, err)
- // Update the kameletbinding (mostly just to update its phase) if the new instance is returned
+ camelevent.NotifyBindingError(ctx, r.client, r.recorder, &instance, target, err)
+ // Update the binding (mostly just to update its phase) if the new instance is returned
if target != nil {
_ = r.update(ctx, &instance, target, &targetLog)
}
@@ -204,14 +204,14 @@ func (r *ReconcileKameletBinding) Reconcile(ctx context.Context, request reconci
if target != nil {
if err := r.update(ctx, &instance, target, &targetLog); err != nil {
- camelevent.NotifyKameletBindingError(ctx, r.client, r.recorder, &instance, target, err)
+ camelevent.NotifyBindingError(ctx, r.client, r.recorder, &instance, target, err)
return reconcile.Result{}, err
}
}
// handle one action at time so the resource
// is always at its latest state
- camelevent.NotifyKameletBindingUpdated(ctx, r.client, r.recorder, &instance, target)
+ camelevent.NotifyBindingUpdated(ctx, r.client, r.recorder, &instance, target)
break
}
}
@@ -219,11 +219,11 @@ func (r *ReconcileKameletBinding) Reconcile(ctx context.Context, request reconci
return reconcile.Result{}, nil
}
-func (r *ReconcileKameletBinding) update(ctx context.Context, base *v1alpha1.KameletBinding, target *v1alpha1.KameletBinding, log *log.Logger) error {
+func (r *ReconcileBinding) update(ctx context.Context, base *v1alpha1.Binding, target *v1alpha1.Binding, log *log.Logger) error {
target.Status.ObservedGeneration = base.Generation
if err := r.client.Status().Patch(ctx, target, ctrl.MergeFrom(base)); err != nil {
- camelevent.NotifyKameletBindingError(ctx, r.client, r.recorder, base, target, err)
+ camelevent.NotifyBindingError(ctx, r.client, r.recorder, base, target, err)
return err
}
diff --git a/pkg/controller/kameletbinding/error_handler.go b/pkg/controller/binding/error_handler.go
similarity index 99%
rename from pkg/controller/kameletbinding/error_handler.go
rename to pkg/controller/binding/error_handler.go
index 231c5b49a..f1cb50014 100644
--- a/pkg/controller/kameletbinding/error_handler.go
+++ b/pkg/controller/binding/error_handler.go
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package kameletbinding
+package binding
import (
"encoding/json"
diff --git a/pkg/controller/kameletbinding/error_handler_test.go b/pkg/controller/binding/error_handler_test.go
similarity index 99%
rename from pkg/controller/kameletbinding/error_handler_test.go
rename to pkg/controller/binding/error_handler_test.go
index 02607dda4..205f66037 100644
--- a/pkg/controller/kameletbinding/error_handler_test.go
+++ b/pkg/controller/binding/error_handler_test.go
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package kameletbinding
+package binding
import (
"testing"
diff --git a/pkg/controller/kameletbinding/initialize.go b/pkg/controller/binding/initialize.go
similarity index 73%
rename from pkg/controller/kameletbinding/initialize.go
rename to pkg/controller/binding/initialize.go
index 3a64e8440..8e631e9ff 100644
--- a/pkg/controller/kameletbinding/initialize.go
+++ b/pkg/controller/binding/initialize.go
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package kameletbinding
+package binding
import (
"context"
@@ -32,7 +32,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
)
-// NewInitializeAction returns a action that initializes the kamelet binding configuration when not provided by the user.
+// NewInitializeAction returns a action that initializes theBinding configuration when not provided by the user.
func NewInitializeAction() Action {
return &initializeAction{}
}
@@ -45,35 +45,35 @@ func (action *initializeAction) Name() string {
return "initialize"
}
-func (action *initializeAction) CanHandle(kameletbinding *v1alpha1.KameletBinding) bool {
- return kameletbinding.Status.Phase == v1alpha1.KameletBindingPhaseNone
+func (action *initializeAction) CanHandle(binding *v1alpha1.Binding) bool {
+ return binding.Status.Phase == v1alpha1.BindingPhaseNone
}
-func (action *initializeAction) Handle(ctx context.Context, kameletbinding *v1alpha1.KameletBinding) (*v1alpha1.KameletBinding, error) {
- it, err := CreateIntegrationFor(ctx, action.client, kameletbinding)
+func (action *initializeAction) Handle(ctx context.Context, binding *v1alpha1.Binding) (*v1alpha1.Binding, error) {
+ it, err := CreateIntegrationFor(ctx, action.client, binding)
if err != nil {
- kameletbinding.Status.Phase = v1alpha1.KameletBindingPhaseError
- kameletbinding.Status.SetErrorCondition(v1alpha1.KameletBindingIntegrationConditionError,
+ binding.Status.Phase = v1alpha1.BindingPhaseError
+ binding.Status.SetErrorCondition(v1alpha1.BindingIntegrationConditionError,
"Couldn't create an Integration custom resource", err)
- return kameletbinding, err
+ return binding, err
}
if _, err := kubernetes.ReplaceResource(ctx, action.client, it); err != nil {
- return nil, errors.Wrap(err, "could not create integration for kamelet binding")
+ return nil, errors.Wrap(err, "could not create integration forBinding")
}
// propagate Kamelet icon (best effort)
- action.propagateIcon(ctx, kameletbinding)
+ action.propagateIcon(ctx, binding)
- target := kameletbinding.DeepCopy()
- target.Status.Phase = v1alpha1.KameletBindingPhaseCreating
+ target := binding.DeepCopy()
+ target.Status.Phase = v1alpha1.BindingPhaseCreating
return target, nil
}
-func (action *initializeAction) propagateIcon(ctx context.Context, binding *v1alpha1.KameletBinding) {
+func (action *initializeAction) propagateIcon(ctx context.Context, binding *v1alpha1.Binding) {
icon, err := action.findIcon(ctx, binding)
if err != nil {
- action.L.Errorf(err, "cannot find icon for kamelet binding %q", binding.Name)
+ action.L.Errorf(err, "cannot find icon forBinding %q", binding.Name)
return
}
if icon == "" {
@@ -90,18 +90,18 @@ func (action *initializeAction) propagateIcon(ctx context.Context, binding *v1al
}
p, err := patch.MergePatch(binding, clone)
if err != nil {
- action.L.Errorf(err, "cannot compute patch to update icon for kamelet binding %q", binding.Name)
+ action.L.Errorf(err, "cannot compute patch to update icon forBinding %q", binding.Name)
return
}
if len(p) > 0 {
if err := action.client.Patch(ctx, clone, client.RawPatch(types.MergePatchType, p)); err != nil {
- action.L.Errorf(err, "cannot apply merge patch to update icon for kamelet binding %q", binding.Name)
+ action.L.Errorf(err, "cannot apply merge patch to update icon forBinding %q", binding.Name)
return
}
}
}
-func (action *initializeAction) findIcon(ctx context.Context, binding *v1alpha1.KameletBinding) (string, error) {
+func (action *initializeAction) findIcon(ctx context.Context, binding *v1alpha1.Binding) (string, error) {
var kameletRef *corev1.ObjectReference
if binding.Spec.Source.Ref != nil && binding.Spec.Source.Ref.Kind == "Kamelet" && strings.HasPrefix(binding.Spec.Source.Ref.APIVersion, "camel.apache.org/") {
kameletRef = binding.Spec.Source.Ref
diff --git a/pkg/controller/kameletbinding/integration.go b/pkg/controller/binding/integration.go
similarity index 82%
rename from pkg/controller/kameletbinding/integration.go
rename to pkg/controller/binding/integration.go
index a9d4296cf..1558c0359 100644
--- a/pkg/controller/kameletbinding/integration.go
+++ b/pkg/controller/binding/integration.go
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package kameletbinding
+package binding
import (
"context"
@@ -43,25 +43,25 @@ var (
endpointTypeSinkContext = bindings.EndpointContext{Type: v1alpha1.EndpointTypeSink}
)
-func CreateIntegrationFor(ctx context.Context, c client.Client, kameletbinding *v1alpha1.KameletBinding) (*v1.Integration, error) {
+func CreateIntegrationFor(ctx context.Context, c client.Client, binding *v1alpha1.Binding) (*v1.Integration, error) {
controller := true
blockOwnerDeletion := true
- annotations := util.CopyMap(kameletbinding.Annotations)
+ annotations := util.CopyMap(binding.Annotations)
// avoid propagating the icon to the integration as it's heavyweight and not needed
delete(annotations, v1alpha1.AnnotationIcon)
it := v1.Integration{
ObjectMeta: metav1.ObjectMeta{
- Namespace: kameletbinding.Namespace,
- Name: kameletbinding.Name,
+ Namespace: binding.Namespace,
+ Name: binding.Name,
Annotations: annotations,
- Labels: util.CopyMap(kameletbinding.Labels),
+ Labels: util.CopyMap(binding.Labels),
OwnerReferences: []metav1.OwnerReference{
{
- APIVersion: kameletbinding.APIVersion,
- Kind: kameletbinding.Kind,
- Name: kameletbinding.Name,
- UID: kameletbinding.UID,
+ APIVersion: binding.APIVersion,
+ Kind: binding.Kind,
+ Name: binding.Name,
+ UID: binding.UID,
Controller: &controller,
BlockOwnerDeletion: &blockOwnerDeletion,
},
@@ -73,28 +73,28 @@ func CreateIntegrationFor(ctx context.Context, c client.Client, kameletbinding *
if it.GetLabels() == nil {
it.SetLabels(make(map[string]string))
}
- it.GetLabels()[kubernetes.CamelCreatorLabelKind] = kameletbinding.Kind
- it.GetLabels()[kubernetes.CamelCreatorLabelName] = kameletbinding.Name
+ it.GetLabels()[kubernetes.CamelCreatorLabelKind] = binding.Kind
+ it.GetLabels()[kubernetes.CamelCreatorLabelName] = binding.Name
// start from the integration spec defined in the binding
- if kameletbinding.Spec.Integration != nil {
- it.Spec = *kameletbinding.Spec.Integration.DeepCopy()
+ if binding.Spec.Integration != nil {
+ it.Spec = *binding.Spec.Integration.DeepCopy()
}
// Set replicas (or override podspecable value) if present
- if kameletbinding.Spec.Replicas != nil {
- replicas := *kameletbinding.Spec.Replicas
+ if binding.Spec.Replicas != nil {
+ replicas := *binding.Spec.Replicas
it.Spec.Replicas = &replicas
}
- profile, err := determineProfile(ctx, c, kameletbinding)
+ profile, err := determineProfile(ctx, c, binding)
if err != nil {
return nil, err
}
it.Spec.Profile = profile
- if kameletbinding.Spec.ServiceAccountName != "" {
- it.Spec.ServiceAccountName = kameletbinding.Spec.ServiceAccountName
+ if binding.Spec.ServiceAccountName != "" {
+ it.Spec.ServiceAccountName = binding.Spec.ServiceAccountName
}
bindingContext := bindings.BindingContext{
@@ -104,22 +104,22 @@ func CreateIntegrationFor(ctx context.Context, c client.Client, kameletbinding *
Profile: profile,
}
- from, err := bindings.Translate(bindingContext, endpointTypeSourceContext, kameletbinding.Spec.Source)
+ from, err := bindings.Translate(bindingContext, endpointTypeSourceContext, binding.Spec.Source)
if err != nil {
return nil, errors.Wrap(err, "could not determine source URI")
}
- to, err := bindings.Translate(bindingContext, endpointTypeSinkContext, kameletbinding.Spec.Sink)
+ to, err := bindings.Translate(bindingContext, endpointTypeSinkContext, binding.Spec.Sink)
if err != nil {
return nil, errors.Wrap(err, "could not determine sink URI")
}
// error handler is optional
- errorHandler, err := maybeErrorHandler(kameletbinding.Spec.ErrorHandler, bindingContext)
+ errorHandler, err := maybeErrorHandler(binding.Spec.ErrorHandler, bindingContext)
if err != nil {
return nil, errors.Wrap(err, "could not determine error handler")
}
- steps := make([]*bindings.Binding, 0, len(kameletbinding.Spec.Steps))
- for idx, step := range kameletbinding.Spec.Steps {
+ steps := make([]*bindings.Binding, 0, len(binding.Spec.Steps))
+ for idx, step := range binding.Spec.Steps {
position := idx
stepBinding, err := bindings.Translate(bindingContext, bindings.EndpointContext{
Type: v1alpha1.EndpointTypeAction,
@@ -233,7 +233,7 @@ func configureBinding(integration *v1.Integration, bindings ...*bindings.Binding
return nil
}
-func determineProfile(ctx context.Context, c client.Client, binding *v1alpha1.KameletBinding) (v1.TraitProfile, error) {
+func determineProfile(ctx context.Context, c client.Client, binding *v1alpha1.Binding) (v1.TraitProfile, error) {
if binding.Spec.Integration != nil && binding.Spec.Integration.Profile != "" {
return binding.Spec.Integration.Profile, nil
}
diff --git a/pkg/controller/kameletbinding/log.go b/pkg/controller/binding/log.go
similarity index 90%
rename from pkg/controller/kameletbinding/log.go
rename to pkg/controller/binding/log.go
index a7a70a117..81305fb5a 100644
--- a/pkg/controller/kameletbinding/log.go
+++ b/pkg/controller/binding/log.go
@@ -15,9 +15,9 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package kameletbinding
+package binding
import "github.com/apache/camel-k/v2/pkg/util/log"
// Log --.
-var Log = log.Log.WithName("controller").WithName("kameletbinding")
+var Log = log.Log.WithName("controller").WithName("binding")
diff --git a/pkg/controller/kameletbinding/monitor.go b/pkg/controller/binding/monitor.go
similarity index 60%
rename from pkg/controller/kameletbinding/monitor.go
rename to pkg/controller/binding/monitor.go
index efef9afc2..2e24bf7c2 100644
--- a/pkg/controller/kameletbinding/monitor.go
+++ b/pkg/controller/binding/monitor.go
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package kameletbinding
+package binding
import (
"context"
@@ -34,7 +34,7 @@ import (
"github.com/apache/camel-k/v2/pkg/trait"
)
-// NewMonitorAction returns an action that monitors the KameletBinding after it's fully initialized.
+// NewMonitorAction returns an action that monitors the Binding after it's fully initialized.
func NewMonitorAction() Action {
return &monitorAction{}
}
@@ -47,66 +47,66 @@ func (action *monitorAction) Name() string {
return "monitor"
}
-func (action *monitorAction) CanHandle(kameletbinding *v1alpha1.KameletBinding) bool {
- return kameletbinding.Status.Phase == v1alpha1.KameletBindingPhaseCreating ||
- (kameletbinding.Status.Phase == v1alpha1.KameletBindingPhaseError &&
- kameletbinding.Status.GetCondition(v1alpha1.KameletBindingIntegrationConditionError) == nil) ||
- kameletbinding.Status.Phase == v1alpha1.KameletBindingPhaseReady
+func (action *monitorAction) CanHandle(binding *v1alpha1.Binding) bool {
+ return binding.Status.Phase == v1alpha1.BindingPhaseCreating ||
+ (binding.Status.Phase == v1alpha1.BindingPhaseError &&
+ binding.Status.GetCondition(v1alpha1.BindingIntegrationConditionError) == nil) ||
+ binding.Status.Phase == v1alpha1.BindingPhaseReady
}
-func (action *monitorAction) Handle(ctx context.Context, kameletbinding *v1alpha1.KameletBinding) (*v1alpha1.KameletBinding, error) {
+func (action *monitorAction) Handle(ctx context.Context, binding *v1alpha1.Binding) (*v1alpha1.Binding, error) {
key := client.ObjectKey{
- Namespace: kameletbinding.Namespace,
- Name: kameletbinding.Name,
+ Namespace: binding.Namespace,
+ Name: binding.Name,
}
it := v1.Integration{}
if err := action.client.Get(ctx, key, &it); err != nil && k8serrors.IsNotFound(err) {
- target := kameletbinding.DeepCopy()
+ target := binding.DeepCopy()
// Rebuild the integration
- target.Status.Phase = v1alpha1.KameletBindingPhaseNone
+ target.Status.Phase = v1alpha1.BindingPhaseNone
target.Status.SetCondition(
- v1alpha1.KameletBindingConditionReady,
+ v1alpha1.BindingConditionReady,
corev1.ConditionFalse,
"",
"",
)
return target, nil
} else if err != nil {
- return nil, errors.Wrapf(err, "could not load integration for KameletBinding %q", kameletbinding.Name)
+ return nil, errors.Wrapf(err, "could not load integration for Binding %q", binding.Name)
}
- operatorIDChanged := v1.GetOperatorIDAnnotation(kameletbinding) != "" &&
- (v1.GetOperatorIDAnnotation(kameletbinding) != v1.GetOperatorIDAnnotation(&it))
+ operatorIDChanged := v1.GetOperatorIDAnnotation(binding) != "" &&
+ (v1.GetOperatorIDAnnotation(binding) != v1.GetOperatorIDAnnotation(&it))
- sameTraits, err := trait.IntegrationAndBindingSameTraits(&it, kameletbinding)
+ sameTraits, err := trait.IntegrationAndBindingSameTraits(&it, binding)
if err != nil {
return nil, err
}
// Check if the integration needs to be changed
- expected, err := CreateIntegrationFor(ctx, action.client, kameletbinding)
+ expected, err := CreateIntegrationFor(ctx, action.client, binding)
if err != nil {
- kameletbinding.Status.Phase = v1alpha1.KameletBindingPhaseError
- kameletbinding.Status.SetErrorCondition(v1alpha1.KameletBindingIntegrationConditionError,
+ binding.Status.Phase = v1alpha1.BindingPhaseError
+ binding.Status.SetErrorCondition(v1alpha1.BindingIntegrationConditionError,
"Couldn't create an Integration custom resource", err)
- return kameletbinding, err
+ return binding, err
}
semanticEquality := equality.Semantic.DeepDerivative(expected.Spec, it.Spec)
if !semanticEquality || operatorIDChanged || !sameTraits {
action.L.Info(
- "KameletBinding needs a rebuild",
+ "Binding needs a rebuild",
"semantic-equality", !semanticEquality,
"operatorid-changed", operatorIDChanged,
"traits-changed", !sameTraits)
- // KameletBinding has changed and needs rebuild
- target := kameletbinding.DeepCopy()
+ // Binding has changed and needs rebuild
+ target := binding.DeepCopy()
// Rebuild the integration
- target.Status.Phase = v1alpha1.KameletBindingPhaseNone
+ target.Status.Phase = v1alpha1.BindingPhaseNone
target.Status.SetCondition(
- v1alpha1.KameletBindingConditionReady,
+ v1alpha1.BindingConditionReady,
corev1.ConditionFalse,
"",
"",
@@ -114,24 +114,24 @@ func (action *monitorAction) Handle(ctx context.Context, kameletbinding *v1alpha
return target, nil
}
- // Map integration phase and conditions to KameletBinding
- target := kameletbinding.DeepCopy()
+ // Map integration phase and conditions to Binding
+ target := binding.DeepCopy()
switch it.Status.Phase {
case v1.IntegrationPhaseRunning:
- target.Status.Phase = v1alpha1.KameletBindingPhaseReady
- setKameletBindingReadyCondition(target, &it)
+ target.Status.Phase = v1alpha1.BindingPhaseReady
+ setBindingReadyCondition(target, &it)
case v1.IntegrationPhaseError:
- target.Status.Phase = v1alpha1.KameletBindingPhaseError
- setKameletBindingReadyCondition(target, &it)
+ target.Status.Phase = v1alpha1.BindingPhaseError
+ setBindingReadyCondition(target, &it)
default:
- target.Status.Phase = v1alpha1.KameletBindingPhaseCreating
+ target.Status.Phase = v1alpha1.BindingPhaseCreating
- c := v1alpha1.KameletBindingCondition{
- Type: v1alpha1.KameletBindingConditionReady,
+ c := v1alpha1.BindingCondition{
+ Type: v1alpha1.BindingConditionReady,
Status: corev1.ConditionFalse,
Reason: string(target.Status.Phase),
Message: fmt.Sprintf("Integration %q is in %q phase", it.GetName(), target.Status.Phase),
@@ -154,15 +154,15 @@ func (action *monitorAction) Handle(ctx context.Context, kameletbinding *v1alpha
return target, nil
}
-func setKameletBindingReadyCondition(kb *v1alpha1.KameletBinding, it *v1.Integration) {
+func setBindingReadyCondition(kb *v1alpha1.Binding, it *v1.Integration) {
if condition := it.Status.GetCondition(v1.IntegrationConditionReady); condition != nil {
message := condition.Message
if message == "" {
message = fmt.Sprintf("Integration %q readiness condition is %q", it.GetName(), condition.Status)
}
- c := v1alpha1.KameletBindingCondition{
- Type: v1alpha1.KameletBindingConditionReady,
+ c := v1alpha1.BindingCondition{
+ Type: v1alpha1.BindingConditionReady,
Status: condition.Status,
Reason: condition.Reason,
Message: message,
@@ -177,7 +177,7 @@ func setKameletBindingReadyCondition(kb *v1alpha1.KameletBinding, it *v1.Integra
} else {
kb.Status.SetCondition(
- v1alpha1.KameletBindingConditionReady,
+ v1alpha1.BindingConditionReady,
corev1.ConditionUnknown,
"",
fmt.Sprintf("Integration %q does not have a readiness condition", it.GetName()),
diff --git a/pkg/event/manager.go b/pkg/event/manager.go
index 053db3069..ac6b64fc6 100644
--- a/pkg/event/manager.go
+++ b/pkg/event/manager.go
@@ -70,12 +70,12 @@ const (
// ReasonKameletPhaseUpdated --.
ReasonKameletPhaseUpdated = "KameletPhaseUpdated"
- // ReasonKameletBindingError --.
- ReasonKameletBindingError = "KameletBindingError"
- // ReasonKameletBindingConditionChanged --.
- ReasonKameletBindingConditionChanged = "KameletBindingConditionChanged"
- // ReasonKameletBindingPhaseUpdated --.
- ReasonKameletBindingPhaseUpdated = "KameletBindingPhaseUpdated"
+ // ReasonBindingError --.
+ ReasonBindingError = "BindingError"
+ // ReasonBindingConditionChanged --.
+ ReasonBindingConditionChanged = "BindingConditionChanged"
+ // ReasonBindingPhaseUpdated --.
+ ReasonBindingPhaseUpdated = "BindingPhaseUpdated"
// ReasonRelatedObjectChanged --.
ReasonRelatedObjectChanged = "ReasonRelatedObjectChanged"
@@ -226,8 +226,8 @@ func NotifyCamelCatalogError(ctx context.Context, c client.Client, recorder reco
recorder.Eventf(k, corev1.EventTypeWarning, ReasonKameletError, "Cannot reconcile CamelCatalog %s: %v", k.Name, err)
}
-// NotifyKameletBindingUpdated automatically generates events when a KameletBinding changes.
-func NotifyKameletBindingUpdated(ctx context.Context, c client.Client, recorder record.EventRecorder, old, newResource *v1alpha1.KameletBinding) {
+// NotifyBindingUpdated automatically generates events when a Binding changes.
+func NotifyBindingUpdated(ctx context.Context, c client.Client, recorder record.EventRecorder, old, newResource *v1alpha1.Binding) {
if newResource == nil {
return
}
@@ -237,14 +237,14 @@ func NotifyKameletBindingUpdated(ctx context.Context, c client.Client, recorder
oldPhase = string(old.Status.Phase)
oldConditions = old.Status.GetConditions()
}
- if newResource.Status.Phase != v1alpha1.KameletBindingPhaseNone {
- notifyIfConditionUpdated(recorder, newResource, oldConditions, newResource.Status.GetConditions(), "KameletBinding", newResource.Name, ReasonKameletBindingConditionChanged)
+ if newResource.Status.Phase != v1alpha1.BindingPhaseNone {
+ notifyIfConditionUpdated(recorder, newResource, oldConditions, newResource.Status.GetConditions(), "Binding", newResource.Name, ReasonBindingConditionChanged)
}
- notifyIfPhaseUpdated(ctx, c, recorder, newResource, oldPhase, string(newResource.Status.Phase), "KameletBinding", newResource.Name, ReasonKameletBindingPhaseUpdated, "")
+ notifyIfPhaseUpdated(ctx, c, recorder, newResource, oldPhase, string(newResource.Status.Phase), "Binding", newResource.Name, ReasonBindingPhaseUpdated, "")
}
-// NotifyKameletBindingError automatically generates error events when the kameletBinding reconcile cycle phase has an error.
-func NotifyKameletBindingError(ctx context.Context, c client.Client, recorder record.EventRecorder, old, newResource *v1alpha1.KameletBinding, err error) {
+// NotifyBindingError automatically generates error events when the binding reconcile cycle phase has an error.
+func NotifyBindingError(ctx context.Context, c client.Client, recorder record.EventRecorder, old, newResource *v1alpha1.Binding, err error) {
k := old
if newResource != nil {
k = newResource
@@ -252,7 +252,7 @@ func NotifyKameletBindingError(ctx context.Context, c client.Client, recorder re
if k == nil {
return
}
- recorder.Eventf(k, corev1.EventTypeWarning, ReasonKameletError, "Cannot reconcile KameletBinding %s: %v", k.Name, err)
+ recorder.Eventf(k, corev1.EventTypeWarning, ReasonKameletError, "Cannot reconcile Binding %s: %v", k.Name, err)
}
// NotifyBuildUpdated automatically generates events when a build changes.
diff --git a/pkg/install/cluster.go b/pkg/install/cluster.go
index 036049510..36ba39079 100644
--- a/pkg/install/cluster.go
+++ b/pkg/install/cluster.go
@@ -200,8 +200,8 @@ func installCRDs(ctx context.Context, c client.Client, collection *kubernetes.Co
return err
}
- // Install CRD for KameletBinding (if needed)
- if err := installCRD(ctx, c, "KameletBinding", "v1alpha1", "camel.apache.org_kameletbindings.yaml",
+ // Install CRD for Binding (if needed)
+ if err := installCRD(ctx, c, "Binding", "v1alpha1", "camel.apache.org_bindings.yaml",
v1beta1Customizer, collection, force); err != nil {
return err
}
@@ -211,7 +211,7 @@ func installCRDs(ctx context.Context, c client.Client, collection *kubernetes.Co
func downgradeToCRDv1beta1(isAPIExtensionsV1 bool) ResourceCustomizer {
return func(object ctrl.Object) ctrl.Object {
- // Remove default values in v1beta1 Integration and KameletBinding CRDs,
+ // Remove default values in v1beta1 Integration and Binding CRDs,
removeDefaultFromCrd := func(crd *apiextensionsv1beta1.CustomResourceDefinition, property string) {
defaultValue := apiextensionsv1beta1.JSONSchemaProps{
Default: nil,
@@ -221,7 +221,7 @@ func downgradeToCRDv1beta1(isAPIExtensionsV1 bool) ResourceCustomizer {
Properties["spec"].Properties["template"].Properties["spec"].Properties[property].Items.Schema.
Properties["ports"].Items.Schema.Properties["protocol"] = defaultValue
}
- if crd.Name == "kameletbindings.camel.apache.org" {
+ if crd.Name == "bindings.camel.apache.org" {
crd.Spec.Validation.OpenAPIV3Schema.Properties["spec"].Properties["integration"].Properties["template"].
Properties["spec"].Properties[property].Items.Schema.Properties["ports"].Items.Schema.
Properties["protocol"] = defaultValue
@@ -312,7 +312,7 @@ func areAllCrdInstalled(c client.Client) (bool, error) {
} else if !ok {
return false, nil
}
- return isCrdInstalled(c, "KameletBinding", "v1alpha1")
+ return isCrdInstalled(c, "Binding", "v1alpha1")
}
func isCrdInstalled(c client.Client, kind string, version string) (bool, error) {
diff --git a/pkg/resources/resources.go b/pkg/resources/resources.go
index 3149ebade..fca200371 100644
--- a/pkg/resources/resources.go
+++ b/pkg/resources/resources.go
@@ -114,6 +114,13 @@ var assets = func() http.FileSystem {
name: "bases",
modTime: time.Time{},
},
+ "/crd/bases/camel.apache.org_bindings.yaml": &vfsgen۰CompressedFileInfo{
+ name: "camel.apache.org_bindings.yaml",
+ modTime: time.Time{},
+ uncompressedSize: 572445,
+
+ compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xfd\x79\x73\x1b\x37\xd6\x28\x8c\xff\xef\x4f\x81\x92\x53\x57\xd2\x13\x91\xb2\x33\x4b\xcd\xf8\x37\x75\x53\x1a\x59\x76\xf4\x8b\x2d\xb3\x2c\x25\xb9\x29\x27\x4f\x02\x76\x83\x24\xae\xba\x81\x7e\x00\x34\x25\xe6\xf5\xfb\xdd\xdf\xc2\x01\xd0\x0b\x37\xe1\x34\x25\x8d\x3c\xd3\x98\xaa\x8c\x49\xb1\x4f\x63\x3b\xfb\xf6\x9c\x0c\xee\x6f\x3c\x7b\x4e\xde\xf1\x84\x09\xcd\x52\x62\x24\x31\x33\x46\x4e\x0a\x9a\xcc\x18\xb9\x94\x13\x73\x43\x [...]
+ },
"/crd/bases/camel.apache.org_builds.yaml": &vfsgen۰CompressedFileInfo{
name: "camel.apache.org_builds.yaml",
modTime: time.Time{},
@@ -149,13 +156,6 @@ var assets = func() http.FileSystem {
compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xfd\x7b\x73\x1b\x37\x96\x30\x8c\xff\x9f\x4f\x81\x72\x52\x8f\xa4\x8d\x48\xd9\x99\xd9\xa9\x19\xff\xa6\x9e\x94\x56\x96\x13\xfd\x62\xcb\x2a\x4b\x49\x9e\x94\x93\x4d\xc0\x6e\x90\xc4\xa3\x6e\xa0\x17\x40\x53\xe2\xbc\x79\xbf\xfb\x5b\x38\x00\xfa\xc2\x5b\x1f\xb4\x48\xc7\xd9\x6d\x4c\x55\xc6\x14\xd9\xa7\x71\x39\x38\xf7\xcb\xe7\x64\xb4\xbf\xf1\xd9\xe7\xe4\x0d\x4f\x98\xd0\x2c\x25\x46\x12\x33\x67\xe4\xbc\xa0\xc9\x9c\x91\x5b\x39\x [...]
},
- "/crd/bases/camel.apache.org_kameletbindings.yaml": &vfsgen۰CompressedFileInfo{
- name: "camel.apache.org_kameletbindings.yaml",
- modTime: time.Time{},
- uncompressedSize: 572531,
-
- compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\xfd\x79\x73\x1b\x37\xd6\x28\x8c\xff\xef\x4f\x81\x92\x53\x57\xd2\x13\x91\xb2\x33\x4b\xcd\xf8\x37\x75\x53\x1a\x59\x76\xf4\x8b\x2d\xb3\x2c\x25\xb9\x29\x27\x4f\x02\x76\x83\x24\xae\xba\x81\x7e\x00\x34\x25\xe6\xf5\xfb\xdd\xdf\xc2\x01\xd0\x0b\x37\xe1\x34\x25\x8d\x3c\xd3\x98\xaa\x8c\x49\xb1\x4f\x63\x3b\xfb\xf6\x9c\x0c\xee\x6f\x3c\x7b\x4e\xde\xf1\x84\x09\xcd\x52\x62\x24\x31\x33\x46\x4e\x0a\x9a\xcc\x18\xb9\x94\x13\x73\x43\x [...]
- },
"/crd/bases/camel.apache.org_kamelets.yaml": &vfsgen۰CompressedFileInfo{
name: "camel.apache.org_kamelets.yaml",
modTime: time.Time{},
@@ -167,6 +167,18 @@ var assets = func() http.FileSystem {
name: "manager",
modTime: time.Time{},
},
+ "/manager/bundle": &vfsgen۰DirInfo{
+ name: "bundle",
+ modTime: time.Time{},
+ },
+ "/manager/bundle/manifests": &vfsgen۰DirInfo{
+ name: "manifests",
+ modTime: time.Time{},
+ },
+ "/manager/bundle/metadata": &vfsgen۰DirInfo{
+ name: "metadata",
+ modTime: time.Time{},
+ },
"/manager/operator-deployment.yaml": &vfsgen۰CompressedFileInfo{
name: "operator-deployment.yaml",
modTime: time.Time{},
@@ -301,9 +313,9 @@ var assets = func() http.FileSystem {
"/rbac/openshift/operator-role-openshift.yaml": &vfsgen۰CompressedFileInfo{
name: "operator-role-openshift.yaml",
modTime: time.Time{},
- uncompressedSize: 2190,
+ uncompressedSize: 2183,
- compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xc4\x53\xc1\x8e\xdb\x46\x0c\xbd\xeb\x2b\x08\xeb\x92\x00\x6b\xa9\xed\xa9\x70\x4f\xee\x66\xb7\x35\x1a\xd8\xc0\xca\x69\x90\x23\x35\xa2\x25\xc2\xa3\xa1\xca\x19\xad\xb2\xf9\xfa\x62\xc6\x76\xe2\xac\xe3\xcd\x25\x40\x74\x11\x4d\x3e\x93\xef\xf1\x51\x39\xcc\x7f\xdc\x93\xe5\xf0\x96\x0d\x39\x4f\x0d\x04\x81\xd0\x11\x2c\x07\x34\x1d\x41\x25\xbb\x30\xa1\x12\xdc\xcb\xe8\x1a\x0c\x2c\x0e\x5e\x2d\xab\xfb\xd7\x30\xba\x86\x14\xc4\x11\x88\x [...]
+ compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xc4\x53\x41\x8f\xdb\x46\x0f\xbd\xeb\x57\x10\xd6\x25\x01\xd6\xd2\xf7\xf5\x54\xb8\x27\x77\xb3\xdb\x1a\x0d\x6c\x60\xe5\x34\xc8\x91\x1a\xd1\x12\xe1\xd1\x50\xe5\x8c\x56\xd9\xfc\xfa\x62\xc6\x76\xe2\x5d\xd7\x9b\x4b\x80\xe8\x22\x9a\x7c\x26\xdf\xe3\xa3\x72\x98\xff\xb8\x27\xcb\xe1\x3d\x1b\x72\x9e\x1a\x08\x02\xa1\x23\x58\x0e\x68\x3a\x82\x4a\x76\x61\x42\x25\xb8\x97\xd1\x35\x18\x58\x1c\xbc\x59\x56\xf7\x6f\x61\x74\x0d\x29\x88\x23\x [...]
},
"/rbac/operator-cluster-role-addressable-resolver.yaml": &vfsgen۰CompressedFileInfo{
name: "operator-cluster-role-addressable-resolver.yaml",
@@ -441,9 +453,9 @@ var assets = func() http.FileSystem {
"/rbac/operator-role.yaml": &vfsgen۰CompressedFileInfo{
name: "operator-role.yaml",
modTime: time.Time{},
- uncompressedSize: 3042,
+ uncompressedSize: 3021,
- compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xcc\x56\x41\x6f\xe3\x36\x13\xbd\xeb\x57\x0c\xac\xcb\x2e\x10\xdb\xdf\xd7\x53\xe1\x9e\xdc\xdd\xa4\x35\xba\xb0\x81\xd8\xdb\xc5\x1e\x47\xd4\x58\x9e\x9a\xe2\xb0\x43\x2a\x8e\xfb\xeb\x0b\xca\x72\x6c\x47\x71\x50\x74\x17\x48\x7d\x09\x45\x4e\xde\xbc\x79\xef\x51\x50\x0e\xc3\xef\xf7\xcb\x72\xf8\xc4\x86\x5c\xa0\x12\xa2\x40\xdc\x10\x4c\x3d\x9a\x0d\xc1\x52\xd6\x71\x87\x4a\x70\x27\x8d\x2b\x31\xb2\x38\x78\x37\x5d\xde\xbd\x87\xc6\x95\x [...]
+ compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xcc\x56\x41\x8f\xdb\x36\x13\xbd\xeb\x57\x0c\xac\x4b\x02\xec\xda\xdf\xd7\x53\xe1\x9e\xdc\x64\xb7\x35\x1a\xd8\xc0\xda\x69\x90\xe3\x88\x1a\xcb\x53\x53\x1c\x76\x48\xad\xd7\xfd\xf5\x05\x65\x29\xf6\xae\xec\xa0\x68\x02\x6c\x7d\x31\x35\x1c\xbd\x79\xf3\xe6\x51\x60\x0e\xb7\xdf\xef\x97\xe5\xf0\x81\x0d\xb9\x40\x25\x44\x81\xb8\x25\x98\x79\x34\x5b\x82\x95\x6c\xe2\x1e\x95\xe0\x5e\x1a\x57\x62\x64\x71\xf0\x66\xb6\xba\x7f\x0b\x8d\x2b\x [...]
},
"/rbac/patch-role-to-clusterrole.yaml": &vfsgen۰CompressedFileInfo{
name: "patch-role-to-clusterrole.yaml",
@@ -462,9 +474,9 @@ var assets = func() http.FileSystem {
"/rbac/user-cluster-role.yaml": &vfsgen۰CompressedFileInfo{
name: "user-cluster-role.yaml",
modTime: time.Time{},
- uncompressedSize: 1825,
+ uncompressedSize: 1804,
- compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x54\x4f\x6f\xdb\xc6\x13\xbd\xf3\x53\x3c\x90\x97\x04\xb0\xa4\xdf\xaf\xa7\x42\x3d\xa9\x8e\xdd\x0a\x0d\x24\xc0\x54\x1a\xe4\x38\xe2\x8e\xa8\x81\x96\xbb\xec\xee\xd0\x8c\xfb\xe9\x8b\x5d\x49\xb6\x1c\xc5\x87\x16\xe1\x85\xcb\xf9\xf3\xe6\xcd\x9b\x59\x56\x98\xfc\xb8\xa7\xa8\xf0\x51\x1a\x76\x91\x0d\xd4\x43\xf7\x8c\x45\x4f\xcd\x9e\x51\xfb\x9d\x8e\x14\x18\xf7\x7e\x70\x86\x54\xbc\xc3\xbb\x45\x7d\xff\x1e\x83\x33\x1c\xe0\x1d\xc3\x [...]
+ compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x54\xc1\x6e\xe3\x36\x10\xbd\xeb\x2b\x1e\xa4\xcb\x2e\x10\xcb\x6d\x4f\x85\x7b\x72\xb3\x49\x6b\x74\x61\x03\x91\xb7\x8b\x3d\x8e\xc5\xb1\x34\x30\x45\xaa\x24\x15\x6d\xfa\xf5\x05\x29\x2b\x76\x9a\xcd\xa1\xc5\xfa\x62\x6a\x66\xf4\xe6\xbd\x37\x43\x15\x58\x7c\xbf\x5f\x56\xe0\xa3\xd4\x6c\x3c\x2b\x04\x8b\xd0\x32\xd6\x3d\xd5\x2d\xa3\xb2\xc7\x30\x92\x63\xdc\xdb\xc1\x28\x0a\x62\x0d\xde\xad\xab\xfb\xf7\x18\x8c\x62\x07\x6b\x18\xd6\x [...]
},
"/samples": &vfsgen۰DirInfo{
name: "samples",
@@ -519,9 +531,9 @@ var assets = func() http.FileSystem {
"/samples/bases/camel_v1_kameletbinding.yaml": &vfsgen۰CompressedFileInfo{
name: "camel_v1_kameletbinding.yaml",
modTime: time.Time{},
- uncompressedSize: 1284,
+ uncompressedSize: 1277,
- compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x53\xc1\x8e\xdb\x36\x10\xbd\xf3\x2b\x1e\xac\x4b\x02\x38\x72\xd3\xa3\x7b\x72\x1c\x1b\x11\x92\xda\xc0\xca\xe9\x62\x8f\x63\x69\x2c\x0d\x4c\x91\x2c\x49\x59\xeb\xbf\x2f\x28\xdb\x5d\x1b\x2d\x8a\x1e\x56\x27\x8a\x1c\xce\x7b\x6f\xde\x63\x86\x4f\xef\xf7\xa9\x0c\x3f\xa4\x62\x13\xb8\x46\xb4\x88\x2d\x63\xe1\xa8\x6a\x19\xa5\x3d\xc4\x81\x3c\x63\x6d\x7b\x53\x53\x14\x6b\xf0\x61\x51\xae\x3f\xa2\x37\x35\x7b\x58\xc3\xb0\x1e\x9d\xf5\x [...]
+ compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x53\xc1\xae\xdb\x36\x10\xbc\xf3\x2b\x06\xd6\x25\x01\x1c\xb9\xe9\xd1\x3d\x39\x8e\x8d\x08\x49\x6d\xe0\xc9\x69\x90\xe3\x5a\x5a\x4b\x0b\x53\x24\x4b\x52\xd6\xf3\xdf\x17\x94\xec\xc6\x46\x8b\xa2\x87\xf0\x44\x51\xcb\x9d\x99\x9d\x61\x86\x77\x3f\x6f\xa9\x0c\x5f\xa4\x62\x13\xb8\x46\xb4\x88\x2d\x63\xe5\xa8\x6a\x19\xa5\x3d\xc5\x81\x3c\x63\x6b\x7b\x53\x53\x14\x6b\xf0\x66\x55\x6e\xdf\xa2\x37\x35\x7b\x58\xc3\xb0\x1e\x9d\xf5\xac\x [...]
},
"/samples/patch-integration-platform.yaml": &vfsgen۰CompressedFileInfo{
name: "patch-integration-platform.yaml",
@@ -662,15 +674,16 @@ var assets = func() http.FileSystem {
fs["/crd/bases"].(os.FileInfo),
}
fs["/crd/bases"].(*vfsgen۰DirInfo).entries = []os.FileInfo{
+ fs["/crd/bases/camel.apache.org_bindings.yaml"].(os.FileInfo),
fs["/crd/bases/camel.apache.org_builds.yaml"].(os.FileInfo),
fs["/crd/bases/camel.apache.org_camelcatalogs.yaml"].(os.FileInfo),
fs["/crd/bases/camel.apache.org_integrationkits.yaml"].(os.FileInfo),
fs["/crd/bases/camel.apache.org_integrationplatforms.yaml"].(os.FileInfo),
fs["/crd/bases/camel.apache.org_integrations.yaml"].(os.FileInfo),
- fs["/crd/bases/camel.apache.org_kameletbindings.yaml"].(os.FileInfo),
fs["/crd/bases/camel.apache.org_kamelets.yaml"].(os.FileInfo),
}
fs["/manager"].(*vfsgen۰DirInfo).entries = []os.FileInfo{
+ fs["/manager/bundle"].(os.FileInfo),
fs["/manager/operator-deployment.yaml"].(os.FileInfo),
fs["/manager/operator-pvc.yaml"].(os.FileInfo),
fs["/manager/operator-service-account.yaml"].(os.FileInfo),
@@ -684,6 +697,10 @@ var assets = func() http.FileSystem {
fs["/manager/patch-toleration.yaml"].(os.FileInfo),
fs["/manager/patch-watch-namespace-global.yaml"].(os.FileInfo),
}
+ fs["/manager/bundle"].(*vfsgen۰DirInfo).entries = []os.FileInfo{
+ fs["/manager/bundle/manifests"].(os.FileInfo),
+ fs["/manager/bundle/metadata"].(os.FileInfo),
+ }
fs["/prometheus"].(*vfsgen۰DirInfo).entries = []os.FileInfo{
fs["/prometheus/operator-pod-monitor.yaml"].(os.FileInfo),
fs["/prometheus/operator-prometheus-rule.yaml"].(os.FileInfo),
diff --git a/pkg/resources/resources_test.go b/pkg/resources/resources_test.go
index 3f2a544ff..6dae89525 100644
--- a/pkg/resources/resources_test.go
+++ b/pkg/resources/resources_test.go
@@ -169,6 +169,6 @@ func TestCRDResources(t *testing.T) {
NoErrorAndNotEmptyBytes(t, "/crd/bases/camel.apache.org_integrationkits.yaml", Resource)
NoErrorAndNotEmptyBytes(t, "/crd/bases/camel.apache.org_integrationplatforms.yaml", Resource)
NoErrorAndNotEmptyBytes(t, "/crd/bases/camel.apache.org_integrations.yaml", Resource)
- NoErrorAndNotEmptyBytes(t, "/crd/bases/camel.apache.org_kameletbindings.yaml", Resource)
+ NoErrorAndNotEmptyBytes(t, "/crd/bases/camel.apache.org_bindings.yaml", Resource)
NoErrorAndNotEmptyBytes(t, "/crd/bases/camel.apache.org_kamelets.yaml", Resource)
}
diff --git a/pkg/trait/util.go b/pkg/trait/util.go
index c6114f9fb..7100ea4c8 100644
--- a/pkg/trait/util.go
+++ b/pkg/trait/util.go
@@ -374,13 +374,13 @@ func IntegrationKitsHaveSameTraits(i1 *v1.IntegrationKit, i2 *v1.IntegrationKit)
return Equals(c1, c2), nil
}
-// KameletBindingsHaveSameTraits return if traits are the same.
-func KameletBindingsHaveSameTraits(i1 *v1alpha1.KameletBinding, i2 *v1alpha1.KameletBinding) (bool, error) {
- c1, err := NewTraitsOptionsForKameletBinding(i1)
+// BindingsHaveSameTraits return if traits are the same.
+func BindingsHaveSameTraits(i1 *v1alpha1.Binding, i2 *v1alpha1.Binding) (bool, error) {
+ c1, err := NewTraitsOptionsForBinding(i1)
if err != nil {
return false, err
}
- c2, err := NewTraitsOptionsForKameletBinding(i2)
+ c2, err := NewTraitsOptionsForBinding(i2)
if err != nil {
return false, err
}
@@ -391,12 +391,12 @@ func KameletBindingsHaveSameTraits(i1 *v1alpha1.KameletBinding, i2 *v1alpha1.Kam
// IntegrationAndBindingSameTraits return if traits are the same.
// The comparison is done for the subset of traits defines on the binding as during the trait processing,
// some traits may be added to the Integration i.e. knative configuration in case of sink binding.
-func IntegrationAndBindingSameTraits(i1 *v1.Integration, i2 *v1alpha1.KameletBinding) (bool, error) {
+func IntegrationAndBindingSameTraits(i1 *v1.Integration, i2 *v1alpha1.Binding) (bool, error) {
itOpts, err := NewTraitsOptionsForIntegration(i1)
if err != nil {
return false, err
}
- klbOpts, err := NewTraitsOptionsForKameletBinding(i2)
+ klbOpts, err := NewTraitsOptionsForBinding(i2)
if err != nil {
return false, err
}
@@ -479,7 +479,7 @@ func NewTraitsOptionsForIntegrationPlatform(i *v1.IntegrationPlatform) (Options,
return m1, nil
}
-func NewTraitsOptionsForKameletBinding(i *v1alpha1.KameletBinding) (Options, error) {
+func NewTraitsOptionsForBinding(i *v1alpha1.Binding) (Options, error) {
if i.Spec.Integration != nil {
m1, err := ToTraitMap(i.Spec.Integration.Traits)
if err != nil {
diff --git a/pkg/trait/util_test.go b/pkg/trait/util_test.go
index 4f669faf7..963da619a 100644
--- a/pkg/trait/util_test.go
+++ b/pkg/trait/util_test.go
@@ -206,29 +206,29 @@ func TestToTrait(t *testing.T) {
func TestSameTraits(t *testing.T) {
t.Run("empty traits", func(t *testing.T) {
- oldKlb := &v1alpha1.KameletBinding{
- Spec: v1alpha1.KameletBindingSpec{
+ oldKlb := &v1alpha1.Binding{
+ Spec: v1alpha1.BindingSpec{
Integration: &v1.IntegrationSpec{
Traits: v1.Traits{},
},
},
}
- newKlb := &v1alpha1.KameletBinding{
- Spec: v1alpha1.KameletBindingSpec{
+ newKlb := &v1alpha1.Binding{
+ Spec: v1alpha1.BindingSpec{
Integration: &v1.IntegrationSpec{
Traits: v1.Traits{},
},
},
}
- ok, err := KameletBindingsHaveSameTraits(oldKlb, newKlb)
+ ok, err := BindingsHaveSameTraits(oldKlb, newKlb)
assert.NoError(t, err)
assert.True(t, ok)
})
t.Run("same traits", func(t *testing.T) {
- oldKlb := &v1alpha1.KameletBinding{
- Spec: v1alpha1.KameletBindingSpec{
+ oldKlb := &v1alpha1.Binding{
+ Spec: v1alpha1.BindingSpec{
Integration: &v1.IntegrationSpec{
Traits: v1.Traits{
Container: &traitv1.ContainerTrait{
@@ -238,8 +238,8 @@ func TestSameTraits(t *testing.T) {
},
},
}
- newKlb := &v1alpha1.KameletBinding{
- Spec: v1alpha1.KameletBindingSpec{
+ newKlb := &v1alpha1.Binding{
+ Spec: v1alpha1.BindingSpec{
Integration: &v1.IntegrationSpec{
Traits: v1.Traits{
Container: &traitv1.ContainerTrait{
@@ -250,14 +250,14 @@ func TestSameTraits(t *testing.T) {
},
}
- ok, err := KameletBindingsHaveSameTraits(oldKlb, newKlb)
+ ok, err := BindingsHaveSameTraits(oldKlb, newKlb)
assert.NoError(t, err)
assert.True(t, ok)
})
t.Run("not same traits", func(t *testing.T) {
- oldKlb := &v1alpha1.KameletBinding{
- Spec: v1alpha1.KameletBindingSpec{
+ oldKlb := &v1alpha1.Binding{
+ Spec: v1alpha1.BindingSpec{
Integration: &v1.IntegrationSpec{
Traits: v1.Traits{
Container: &traitv1.ContainerTrait{
@@ -267,8 +267,8 @@ func TestSameTraits(t *testing.T) {
},
},
}
- newKlb := &v1alpha1.KameletBinding{
- Spec: v1alpha1.KameletBindingSpec{
+ newKlb := &v1alpha1.Binding{
+ Spec: v1alpha1.BindingSpec{
Integration: &v1.IntegrationSpec{
Traits: v1.Traits{
Owner: &traitv1.OwnerTrait{
@@ -279,14 +279,14 @@ func TestSameTraits(t *testing.T) {
},
}
- ok, err := KameletBindingsHaveSameTraits(oldKlb, newKlb)
+ ok, err := BindingsHaveSameTraits(oldKlb, newKlb)
assert.NoError(t, err)
assert.False(t, ok)
})
t.Run("same traits with annotations", func(t *testing.T) {
- oldKlb := &v1alpha1.KameletBinding{
- Spec: v1alpha1.KameletBindingSpec{
+ oldKlb := &v1alpha1.Binding{
+ Spec: v1alpha1.BindingSpec{
Integration: &v1.IntegrationSpec{
Traits: v1.Traits{
Container: &traitv1.ContainerTrait{
@@ -296,7 +296,7 @@ func TestSameTraits(t *testing.T) {
},
},
}
- newKlb := &v1alpha1.KameletBinding{
+ newKlb := &v1alpha1.Binding{
ObjectMeta: metav1.ObjectMeta{
Annotations: map[string]string{
v1.TraitAnnotationPrefix + "container.image": "foo/bar:1",
@@ -304,20 +304,20 @@ func TestSameTraits(t *testing.T) {
},
}
- ok, err := KameletBindingsHaveSameTraits(oldKlb, newKlb)
+ ok, err := BindingsHaveSameTraits(oldKlb, newKlb)
assert.NoError(t, err)
assert.True(t, ok)
})
t.Run("same traits with annotations only", func(t *testing.T) {
- oldKlb := &v1alpha1.KameletBinding{
+ oldKlb := &v1alpha1.Binding{
ObjectMeta: metav1.ObjectMeta{
Annotations: map[string]string{
v1.TraitAnnotationPrefix + "container.image": "foo/bar:1",
},
},
}
- newKlb := &v1alpha1.KameletBinding{
+ newKlb := &v1alpha1.Binding{
ObjectMeta: metav1.ObjectMeta{
Annotations: map[string]string{
v1.TraitAnnotationPrefix + "container.image": "foo/bar:1",
@@ -325,14 +325,14 @@ func TestSameTraits(t *testing.T) {
},
}
- ok, err := KameletBindingsHaveSameTraits(oldKlb, newKlb)
+ ok, err := BindingsHaveSameTraits(oldKlb, newKlb)
assert.NoError(t, err)
assert.True(t, ok)
})
t.Run("not same traits with annotations", func(t *testing.T) {
- oldKlb := &v1alpha1.KameletBinding{
- Spec: v1alpha1.KameletBindingSpec{
+ oldKlb := &v1alpha1.Binding{
+ Spec: v1alpha1.BindingSpec{
Integration: &v1.IntegrationSpec{
Traits: v1.Traits{
Container: &traitv1.ContainerTrait{
@@ -342,7 +342,7 @@ func TestSameTraits(t *testing.T) {
},
},
}
- newKlb := &v1alpha1.KameletBinding{
+ newKlb := &v1alpha1.Binding{
ObjectMeta: metav1.ObjectMeta{
Annotations: map[string]string{
v1.TraitAnnotationPrefix + "container.image": "foo/bar:2",
@@ -350,20 +350,20 @@ func TestSameTraits(t *testing.T) {
},
}
- ok, err := KameletBindingsHaveSameTraits(oldKlb, newKlb)
+ ok, err := BindingsHaveSameTraits(oldKlb, newKlb)
assert.NoError(t, err)
assert.False(t, ok)
})
t.Run("not same traits with annotations only", func(t *testing.T) {
- oldKlb := &v1alpha1.KameletBinding{
+ oldKlb := &v1alpha1.Binding{
ObjectMeta: metav1.ObjectMeta{
Annotations: map[string]string{
v1.TraitAnnotationPrefix + "container.image": "foo/bar:1",
},
},
}
- newKlb := &v1alpha1.KameletBinding{
+ newKlb := &v1alpha1.Binding{
ObjectMeta: metav1.ObjectMeta{
Annotations: map[string]string{
v1.TraitAnnotationPrefix + "container.image": "foo/bar:2",
@@ -371,7 +371,7 @@ func TestSameTraits(t *testing.T) {
},
}
- ok, err := KameletBindingsHaveSameTraits(oldKlb, newKlb)
+ ok, err := BindingsHaveSameTraits(oldKlb, newKlb)
assert.NoError(t, err)
assert.False(t, ok)
})
diff --git a/pkg/util/bindings/catalog.go b/pkg/util/bindings/catalog.go
index 7e750befd..676a26ad8 100644
--- a/pkg/util/bindings/catalog.go
+++ b/pkg/util/bindings/catalog.go
@@ -58,7 +58,7 @@ func validateEndpoint(ctx BindingContext, e v1alpha1.Endpoint) error {
return errors.New("cannot use both ref and URI to specify an endpoint: only one of them should be used")
}
if e.Ref != nil && e.Ref.Namespace != "" && e.Ref.Namespace != ctx.Namespace {
- return errors.New("cross-namespace references are not allowed in kamelet binding")
+ return errors.New("cross-namespace references are not allowed inBinding")
}
return nil
}
diff --git a/pkg/util/bindings/kamelet.go b/pkg/util/bindings/kamelet.go
index ddb121ddd..42227379e 100644
--- a/pkg/util/bindings/kamelet.go
+++ b/pkg/util/bindings/kamelet.go
@@ -29,14 +29,14 @@ const (
datTypeActionKamelet = "data-type-action"
)
-// KameletBindingProvider converts a reference to a Kamelet into a Camel URI.
-type KameletBindingProvider struct{}
+// BindingConverter converts a reference to a Kamelet into a Camel URI.
+type BindingConverter struct{}
-func (k KameletBindingProvider) ID() string {
+func (k BindingConverter) ID() string {
return "kamelet"
}
-func (k KameletBindingProvider) Translate(ctx BindingContext, endpointCtx EndpointContext, e v1alpha1.Endpoint) (*Binding, error) {
+func (k BindingConverter) Translate(ctx BindingContext, endpointCtx EndpointContext, e v1alpha1.Endpoint) (*Binding, error) {
if e.Ref == nil {
// works only on refs
return nil, nil
@@ -129,7 +129,7 @@ func (k KameletBindingProvider) Translate(ctx BindingContext, endpointCtx Endpoi
return nil, nil
}
-func (k KameletBindingProvider) DataTypeStep(e v1alpha1.Endpoint, id string, typeSlot v1alpha1.TypeSlot) (map[string]interface{}, map[string]string) {
+func (k BindingConverter) DataTypeStep(e v1alpha1.Endpoint, id string, typeSlot v1alpha1.TypeSlot) (map[string]interface{}, map[string]string) {
if e.DataTypes == nil {
return nil, nil
}
@@ -156,10 +156,10 @@ func (k KameletBindingProvider) DataTypeStep(e v1alpha1.Endpoint, id string, typ
return nil, nil
}
-func (k KameletBindingProvider) Order() int {
+func (k BindingConverter) Order() int {
return OrderStandard
}
func init() {
- RegisterBindingProvider(KameletBindingProvider{})
+ RegisterBindingProvider(BindingConverter{})
}
diff --git a/pkg/util/bindings/kamelet_test.go b/pkg/util/bindings/kamelet_test.go
index 9310c710b..1c12c4b8b 100644
--- a/pkg/util/bindings/kamelet_test.go
+++ b/pkg/util/bindings/kamelet_test.go
@@ -30,7 +30,7 @@ import (
"github.com/stretchr/testify/assert"
)
-func TestKameletBindingProvider(t *testing.T) {
+func TestBindingConverter(t *testing.T) {
testcases := []struct {
name string
endpointType v1alpha1.EndpointType
@@ -95,7 +95,7 @@ func TestKameletBindingProvider(t *testing.T) {
endpoint.Properties = asEndpointProperties(tc.endpointProperties)
}
- binding, err := KameletBindingProvider{}.Translate(
+ binding, err := BindingConverter{}.Translate(
BindingContext{
Ctx: ctx,
Client: client,
@@ -122,7 +122,7 @@ func TestKameletBindingProvider(t *testing.T) {
}
}
-func TestKameletBindingProviderWithDataTypes(t *testing.T) {
+func TestBindingConverterWithDataTypes(t *testing.T) {
testcases := []struct {
name string
endpointType v1alpha1.EndpointType
@@ -275,7 +275,7 @@ func TestKameletBindingProviderWithDataTypes(t *testing.T) {
}
}
- binding, err := KameletBindingProvider{}.Translate(
+ binding, err := BindingConverter{}.Translate(
BindingContext{
Ctx: ctx,
Client: client,
diff --git a/pkg/util/log/log.go b/pkg/util/log/log.go
index 0be3413be..7ebc4adf5 100644
--- a/pkg/util/log/log.go
+++ b/pkg/util/log/log.go
@@ -139,8 +139,8 @@ func (l Logger) ForKamelet(target *v1alpha1.Kamelet) Logger {
)
}
-// ForKameletBinding --.
-func (l Logger) ForKameletBinding(target *v1alpha1.KameletBinding) Logger {
+// ForBinding --.
+func (l Logger) ForBinding(target *v1alpha1.Binding) Logger {
return l.WithValues(
"api-version", target.APIVersion,
"kind", target.Kind,
diff --git a/script/gen_crd.sh b/script/gen_crd.sh
index b0dc55f61..d4e20f71d 100755
--- a/script/gen_crd.sh
+++ b/script/gen_crd.sh
@@ -68,4 +68,4 @@ deploy_crd integration integrations
deploy_crd integration-kit integrationkits
deploy_crd integration-platform integrationplatforms
deploy_crd kamelet kamelets
-deploy_crd kamelet-binding kameletbindings
+deploy_crd binding bindings
diff --git a/script/prepare-operators.sh b/script/prepare-operators.sh
index 9232324d3..a8a27357a 100755
--- a/script/prepare-operators.sh
+++ b/script/prepare-operators.sh
@@ -39,7 +39,7 @@ cp ./manifests/camel.apache.org_camelcatalogs.yaml k8s-operatorhub/$1/manifests/
cp ./manifests/camel.apache.org_integrationkits.yaml k8s-operatorhub/$1/manifests/integrationkits.camel.apache.org.crd.yaml
cp ./manifests/camel.apache.org_integrationplatforms.yaml k8s-operatorhub/$1/manifests/integrationplatforms.camel.apache.org.crd.yaml
cp ./manifests/camel.apache.org_integrations.yaml k8s-operatorhub/$1/manifests/integrations.camel.apache.org.crd.yaml
-cp ./manifests/camel.apache.org_kameletbindings.yaml k8s-operatorhub/$1/manifests/kameletbindings.camel.apache.org.crd.yaml
+cp ./manifests/camel.apache.org_bindings.yaml k8s-operatorhub/$1/manifests/bindings.camel.apache.org.crd.yaml
cp ./manifests/camel.apache.org_kamelets.yaml k8s-operatorhub/$1/manifests/kamelets.camel.apache.org.crd.yaml
cp ./manifests/camel-k.clusterserviceversion.yaml k8s-operatorhub/$1/manifests/camel-k.v$1.clusterserviceversion.yaml
cp ./metadata/annotations.yaml k8s-operatorhub/$1/metadata/annotations.yaml
@@ -50,7 +50,7 @@ cp ./manifests/camel.apache.org_camelcatalogs.yaml openshift-ecosystem/$1/manife
cp ./manifests/camel.apache.org_integrationkits.yaml openshift-ecosystem/$1/manifests/integrationkits.camel.apache.org.crd.yaml
cp ./manifests/camel.apache.org_integrationplatforms.yaml openshift-ecosystem/$1/manifests/integrationplatforms.camel.apache.org.crd.yaml
cp ./manifests/camel.apache.org_integrations.yaml openshift-ecosystem/$1/manifests/integrations.camel.apache.org.crd.yaml
-cp ./manifests/camel.apache.org_kameletbindings.yaml openshift-ecosystem/$1/manifests/kameletbindings.camel.apache.org.crd.yaml
+cp ./manifests/camel.apache.org_bindings.yaml openshift-ecosystem/$1/manifests/bindings.camel.apache.org.crd.yaml
cp ./manifests/camel.apache.org_kamelets.yaml openshift-ecosystem/$1/manifests/kamelets.camel.apache.org.crd.yaml
cp ./manifests/camel-k.clusterserviceversion.yaml openshift-ecosystem/$1/manifests/camel-k.v$1.clusterserviceversion.yaml
cp ./metadata/annotations.yaml openshift-ecosystem/$1/metadata/annotations.yaml