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


The following commit(s) were added to refs/heads/main by this push:
     new 5d8891bf4 feat(api): IntegrationProfile deprecation
5d8891bf4 is described below

commit 5d8891bf4981c12cb227608a61bbf33008e70c4c
Author: Pasquale Congiusti <pasquale.congiu...@gmail.com>
AuthorDate: Fri Sep 27 07:33:55 2024 +0200

    feat(api): IntegrationProfile deprecation
    
    Closes #5869
---
 docs/modules/ROOT/partials/apis/camel-k-crds.adoc                   | 1 +
 helm/camel-k/crds/camel-k-crds.yaml                                 | 1 +
 pkg/apis/camel/v1/integrationprofile_types.go                       | 1 +
 pkg/controller/integrationprofile/initialize.go                     | 6 ++++++
 .../config/crd/bases/camel.apache.org_integrationprofiles.yaml      | 1 +
 5 files changed, 10 insertions(+)

diff --git a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc 
b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc
index a9199401a..f51ad7781 100644
--- a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc
+++ b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc
@@ -226,6 +226,7 @@ Refer to the Kubernetes API documentation for the fields of 
the `metadata` field
 
 IntegrationProfile is the resource used to apply user defined settings to the 
Camel K operator behavior.
 It defines the behavior of all Custom Resources (`IntegrationKit`, 
`Integration`, `Kamelet`) in the given namespace.
+Deprecated: may be removed in future releases. Make use of IntegrationPlatform 
instead.
 
 [cols="2,2a",options="header"]
 |===
diff --git a/helm/camel-k/crds/camel-k-crds.yaml 
b/helm/camel-k/crds/camel-k-crds.yaml
index ee85c65f6..ebd1e148e 100644
--- a/helm/camel-k/crds/camel-k-crds.yaml
+++ b/helm/camel-k/crds/camel-k-crds.yaml
@@ -7524,6 +7524,7 @@ spec:
         description: |-
           IntegrationProfile is the resource used to apply user defined 
settings to the Camel K operator behavior.
           It defines the behavior of all Custom Resources (`IntegrationKit`, 
`Integration`, `Kamelet`) in the given namespace.
+          Deprecated: may be removed in future releases. Make use of 
IntegrationPlatform instead.
         properties:
           apiVersion:
             description: |-
diff --git a/pkg/apis/camel/v1/integrationprofile_types.go 
b/pkg/apis/camel/v1/integrationprofile_types.go
index 4b85289b6..dc379d73f 100644
--- a/pkg/apis/camel/v1/integrationprofile_types.go
+++ b/pkg/apis/camel/v1/integrationprofile_types.go
@@ -56,6 +56,7 @@ type IntegrationProfileStatus struct {
 
 // IntegrationProfile is the resource used to apply user defined settings to 
the Camel K operator behavior.
 // It defines the behavior of all Custom Resources (`IntegrationKit`, 
`Integration`, `Kamelet`) in the given namespace.
+// Deprecated: may be removed in future releases. Make use of 
IntegrationPlatform instead.
 type IntegrationProfile struct {
        metav1.TypeMeta   `json:",inline"`
        metav1.ObjectMeta `json:"metadata,omitempty"`
diff --git a/pkg/controller/integrationprofile/initialize.go 
b/pkg/controller/integrationprofile/initialize.go
index 85f704310..ccd2850b8 100644
--- a/pkg/controller/integrationprofile/initialize.go
+++ b/pkg/controller/integrationprofile/initialize.go
@@ -52,6 +52,12 @@ func (action *initializeAction) Handle(ctx context.Context, 
profile *v1.Integrat
                v1.IntegrationProfileConditionCreatedReason,
                "integration profile created")
 
+       profile.Status.SetCondition(
+               "DeprecationNotice",
+               corev1.ConditionTrue,
+               "DeprecationNoticeWarning",
+               "Usage of IntegrationProfile is deprecated. Make use of 
IntegrationPlatform instead.")
+
        profile.Status.Phase = v1.IntegrationProfilePhaseReady
 
        return profile, nil
diff --git 
a/pkg/resources/config/crd/bases/camel.apache.org_integrationprofiles.yaml 
b/pkg/resources/config/crd/bases/camel.apache.org_integrationprofiles.yaml
index 1e9642cb4..3ce8ad41b 100644
--- a/pkg/resources/config/crd/bases/camel.apache.org_integrationprofiles.yaml
+++ b/pkg/resources/config/crd/bases/camel.apache.org_integrationprofiles.yaml
@@ -51,6 +51,7 @@ spec:
         description: |-
           IntegrationProfile is the resource used to apply user defined 
settings to the Camel K operator behavior.
           It defines the behavior of all Custom Resources (`IntegrationKit`, 
`Integration`, `Kamelet`) in the given namespace.
+          Deprecated: may be removed in future releases. Make use of 
IntegrationPlatform instead.
         properties:
           apiVersion:
             description: |-

Reply via email to