Skip to content

Commit

Permalink
feat(api): IntegrationProfile deprecation
Browse files Browse the repository at this point in the history
Closes #5869
  • Loading branch information
squakez committed Sep 28, 2024
1 parent b36123b commit 5d8891b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/modules/ROOT/partials/apis/camel-k-crds.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
|===
Expand Down
1 change: 1 addition & 0 deletions helm/camel-k/crds/camel-k-crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |-
Expand Down
1 change: 1 addition & 0 deletions pkg/apis/camel/v1/integrationprofile_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
6 changes: 6 additions & 0 deletions pkg/controller/integrationprofile/initialize.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: |-
Expand Down

0 comments on commit 5d8891b

Please sign in to comment.