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

squakez 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 8ebcd0971 feat(trait): make pod internal
8ebcd0971 is described below

commit 8ebcd0971c4f4c16ce5bb343fef4ddf9e09680b4
Author: Pasquale Congiusti <[email protected]>
AuthorDate: Fri Aug 21 08:29:25 2026 +0200

    feat(trait): make pod internal
    
    * Revert partially deprecation on trait
    * Make it internal and let the user configure only certain template fields
    
    Closes #6737
---
 docs/modules/ROOT/nav.adoc                         |   1 -
 .../pages/installation/advanced/resources.adoc     |   2 +-
 docs/modules/ROOT/partials/apis/camel-k-crds.adoc  |  22 +---
 docs/modules/traits/pages/pod.adoc                 | 126 ---------------------
 helm/camel-k/crds/camel-k-crds.yaml                |  74 +++---------
 pkg/apis/camel/v1/common_types.go                  |   2 -
 pkg/apis/camel/v1/integration_types.go             |   6 -
 pkg/apis/camel/v1/trait/pod.go                     |  10 +-
 pkg/apis/camel/v1/trait/zz_generated.deepcopy.go   |   2 +-
 .../applyconfiguration/camel/v1/integrationspec.go |   2 -
 .../camel/applyconfiguration/camel/v1/podspec.go   |   2 -
 .../applyconfiguration/camel/v1/podspectemplate.go |   2 -
 .../camel/applyconfiguration/camel/v1/traits.go    |   2 -
 pkg/cmd/run.go                                     |   2 +-
 .../camel.apache.org_integrationplatforms.yaml     |  16 +--
 .../camel.apache.org_integrationprofiles.yaml      |  16 +--
 .../crd/bases/camel.apache.org_integrations.yaml   |  21 +---
 .../config/crd/bases/camel.apache.org_pipes.yaml   |  21 +---
 pkg/trait/pod.go                                   |  22 +---
 pkg/trait/pod_test.go                              |   9 +-
 20 files changed, 50 insertions(+), 310 deletions(-)

diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index e938120ac..442fe5c7b 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -70,7 +70,6 @@
 ** xref:traits:mount.adoc[Mount]
 ** xref:traits:owner.adoc[Owner]
 ** xref:traits:pdb.adoc[Pdb]
-** xref:traits:pod.adoc[Pod]
 ** xref:traits:prometheus.adoc[Prometheus]
 ** xref:traits:pull-secret.adoc[Pull Secret]
 ** xref:traits:quarkus.adoc[Quarkus]
diff --git a/docs/modules/ROOT/pages/installation/advanced/resources.adoc 
b/docs/modules/ROOT/pages/installation/advanced/resources.adoc
index 327da53ac..b3b7f07a7 100644
--- a/docs/modules/ROOT/pages/installation/advanced/resources.adoc
+++ b/docs/modules/ROOT/pages/installation/advanced/resources.adoc
@@ -15,7 +15,7 @@ We suggest to edit the Deployment to configure the 
https://kubernetes.io/docs/co
 
 === Builder Pods and Integrations
 
-Builder Pods and Integration Pods can be also scheduled and assigned in the 
cluster. For this reason you need to use xref:traits:builder.adoc[builder 
trait] configuration (for builder Pod when using `pod` building strategy) and 
xref:traits:affinity.adoc[affinity], xref:traits:pod.adoc[pod], 
xref:traits:toleration.adoc[toleration] traits for Integration Pods.
+Builder Pods and Integration Pods can be also scheduled and assigned in the 
cluster. For this reason you need to use xref:traits:builder.adoc[builder 
trait] configuration (for builder Pod when using `pod` building strategy) and 
xref:traits:affinity.adoc[affinity], xref:traits:toleration.adoc[toleration] 
traits for Integration Pods. In advanced cases you can also use 
`.spec.template` Integration to specify a Pod template to use.
 
 [[scheduling-infra-pod-resources]]
 == Resources
diff --git a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc 
b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc
index 91639092d..9438fbd18 100644
--- a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc
+++ b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc
@@ -3559,8 +3559,6 @@ the traits needed to run this Integration
 
 Pod template customization.
 
-Deprecated: use container, init-containers or owner traits instead
-
 |`configuration` +
 *xref:#_camel_apache_org_v1_ConfigurationSpec[[\]ConfigurationSpec]*
 |
@@ -5153,8 +5151,6 @@ string
 
 PodSpec defines a group of Kubernetes resources.
 
-Deprecated: to be removed in future versions.
-
 [cols="2,2a",options="header"]
 |===
 |Field
@@ -5263,8 +5259,6 @@ PodSecurityContext
 
 PodSpecTemplate represent a template used to deploy an Integration `Pod`.
 
-Deprecated: to be removed in future versions.
-
 [cols="2,2a",options="header"]
 |===
 |Field
@@ -6237,8 +6231,6 @@ The configuration of Platform trait
 
 The configuration of Pod trait.
 
-Deprecated: use init-containers instead.
-
 |`prometheus` +
 *xref:#_camel_apache_org_v1_trait_PrometheusTrait[PrometheusTrait]*
 |
@@ -9017,6 +9009,7 @@ Only one of `max-unavailable` and `min-available` can be 
specified.
 * <<#_camel_apache_org_v1_trait_MountTrait, MountTrait>>
 * <<#_camel_apache_org_v1_trait_OpenAPITrait, OpenAPITrait>>
 * <<#_camel_apache_org_v1_trait_PlatformTrait, PlatformTrait>>
+* <<#_camel_apache_org_v1_trait_PodTrait, PodTrait>>
 * <<#_camel_apache_org_v1_trait_QuarkusTrait, QuarkusTrait>>
 * <<#_camel_apache_org_v1_trait_SecurityContextTrait, SecurityContextTrait>>
 
@@ -9099,25 +9092,19 @@ Deprecated: no longer in use.
 
 * <<#_camel_apache_org_v1_Traits, Traits>>
 
-WARNING: The Pod trait is **deprecated** and will removed in future release 
versions:
-use InitContainers trait instead.
-
 The pod trait allows the customization of the Integration pods.
 It applies the `PodSpecTemplate` struct contained in the Integration 
`.spec.podTemplate` field,
 into the Integration deployment Pods template, using strategic merge patch.
 
-This can be used to customize the container where Camel routes execute,
-by using the `integration` container name.
-
 
 [cols="2,2a",options="header"]
 |===
 |Field
 |Description
 
-|`Trait` +
-*xref:#_camel_apache_org_v1_trait_Trait[Trait]*
-|(Members of `Trait` are embedded into this type.)
+|`PlatformBaseTrait` +
+*xref:#_camel_apache_org_v1_trait_PlatformBaseTrait[PlatformBaseTrait]*
+|(Members of `PlatformBaseTrait` are embedded into this type.)
 
 
 
@@ -9825,7 +9812,6 @@ The list of taints to tolerate, in the form 
`Key[=Value]:Effect[:Seconds]`
 * <<#_camel_apache_org_v1_trait_MasterTrait, MasterTrait>>
 * <<#_camel_apache_org_v1_trait_OwnerTrait, OwnerTrait>>
 * <<#_camel_apache_org_v1_trait_PDBTrait, PDBTrait>>
-* <<#_camel_apache_org_v1_trait_PodTrait, PodTrait>>
 * <<#_camel_apache_org_v1_trait_PrometheusTrait, PrometheusTrait>>
 * <<#_camel_apache_org_v1_trait_PullSecretTrait, PullSecretTrait>>
 * <<#_camel_apache_org_v1_trait_RegistryTrait, RegistryTrait>>
diff --git a/docs/modules/traits/pages/pod.adoc 
b/docs/modules/traits/pages/pod.adoc
deleted file mode 100755
index d2673e037..000000000
--- a/docs/modules/traits/pages/pod.adoc
+++ /dev/null
@@ -1,126 +0,0 @@
-= Pod Trait
-
-// Start of autogenerated code - DO NOT EDIT! (badges)
-[.badges]
-[.badge-key]##Deprecated since##[.badge-unsupported]##2.8.0##
-// End of autogenerated code - DO NOT EDIT! (badges)
-// Start of autogenerated code - DO NOT EDIT! (description)
-WARNING: The Pod trait is **deprecated** and will removed in future release 
versions:
-use InitContainers trait instead.
-
-The pod trait allows the customization of the Integration pods.
-It applies the `PodSpecTemplate` struct contained in the Integration 
`.spec.podTemplate` field,
-into the Integration deployment Pods template, using strategic merge patch.
-
-This can be used to customize the container where Camel routes execute,
-by using the `integration` container name.
-
-
-This trait is available in the following profiles: **Kubernetes, Knative, 
OpenShift**.
-
-// End of autogenerated code - DO NOT EDIT! (description)
-
-*Note 1*: In the current implementation, template options override the 
configuration options defined via CLI, for example in:
-
-[source,console]
-----
-$ kamel run integration.yaml --pod-template template.yaml --env 
TEST_VARIABLE=will_be_overriden --env ANOTHER_VARIABLE=Im_There
-----
-
-The value from the template overwrites the `TEST_VARIABLE` environment 
variable, while `ANOTHER_VARIABLE` stays unchanged.
-
-*Note 2:* Changes to the `integration` container entrypoint aren't applied due 
to current trait execution order.
-
-// Start of autogenerated code - DO NOT EDIT! (configuration)
-== Configuration
-
-Trait properties can be specified when running any integration with the CLI:
-[source,console]
-----
-$ kamel run --trait pod.[key]=[value] integration.yaml
-----
-The following configuration options are available:
-
-[cols="2m,1m,5a"]
-|===
-|Property | Type | Description
-
-| pod.enabled
-| bool
-| Can be used to enable or disable a trait. All traits share this common 
property.
-
-|===
-
-NOTE: the variable names are "snake case" if you're using in `kamel` CLI, for 
example `trait.myParam` has to be translated as `-t trait.my-param`
-
-
-// End of autogenerated code - DO NOT EDIT! (configuration)
-
-== Sidecar containers
-
-With the following Integration, that reads files from a directory:
-
-[source,yaml]
-.pod-trait-route.yaml
-----
-- from:
-    uri: "file:///var/log"
-    steps:
-      - setBody:
-          simple: "${body}: {{TEST_VARIABLE}}"
-      - to: "log:info"
-----
-
-Plus the following Pod template, that adds a sidecar container to the 
Integration Pod, generating some data into the directory, and mounts it into 
the `integration` container:
-
-[source,yaml]
-.pod-trait-template.yaml
-----
-containers:
-  - name: integration
-    env:
-      - name: TEST_VARIABLE
-        value: "hello from the template"
-    volumeMounts:
-      - name: var-logs
-        mountPath: /var/log
-  - name: sidecar
-    image: busybox
-    command: [ "/bin/sh" , "-c", "while true; do echo $(date -u) 'Content from 
the sidecar container' > /var/log/file.txt; sleep 1;done" ]
-    volumeMounts:
-      - name: var-logs
-        mountPath: /var/log
-volumes:
-  - name: var-logs
-    emptyDir: { }
-----
-
-The Integration route logs the content of the file generated by the sidecar 
container, e.g.:
-
-[source,console]
-----
-kamel run pod-trait-route.yaml --pod-template pod-trait-template.yaml
-...
-Condition "Ready" is "True" for Integration pod-trait-route: 1/1 ready replicas
-Integration "pod-trait-route" in phase "Running"
-[1] 2024-05-15 11:32:30,562 INFO  [info] (Camel (camel-1) thread #1 - 
file:///var/log) Exchange[ExchangePattern: InOnly, BodyType: String, Body: Wed 
May 15 11:32:30 UTC 2024 Content from the sidecar container: hello from the 
template]
-[1] 2024-05-15 11:32:31,574 INFO  [info] (Camel (camel-1) thread #1 - 
file:///var/log) Exchange[ExchangePattern: InOnly, BodyType: String, Body: Wed 
May 15 11:32:31 UTC 2024 Content from the sidecar container: hello from the 
template]
-[1] 2024-05-15 11:32:32,583 INFO  [info] (Camel (camel-1) thread #1 - 
file:///var/log) Exchange[ExchangePattern: InOnly, BodyType: String, Body: Wed 
May 15 11:32:32 UTC 2024 Content from the sidecar container: hello from the 
template]
-----
-
-== Init containers
-
-With this trait you will be also able to run `initContainers`. There is a 
little caveat though, as you will need to include at least one container in the 
template spec, you will need to provide the configuration for the default 
container, which is `integration`. Here a simple example:
-
-.template.yaml
-[source,yaml]
-----
-containers:
-  - name: integration
-initContainers:
-  - name: init
-    image: busybox
-    command: [ "/bin/sh" , "-c", "echo 'hello'!" ]
-----
-
-The `integration` container will be overwritten by the container running the 
route, and the `initContainer` will run before the route as expected.
diff --git a/helm/camel-k/crds/camel-k-crds.yaml 
b/helm/camel-k/crds/camel-k-crds.yaml
index 6e5abf3fb..3289b00a8 100644
--- a/helm/camel-k/crds/camel-k-crds.yaml
+++ b/helm/camel-k/crds/camel-k-crds.yaml
@@ -5465,10 +5465,7 @@ spec:
                         type: boolean
                     type: object
                   pod:
-                    description: |-
-                      The configuration of Pod trait.
-
-                      Deprecated: use init-containers instead.
+                    description: The configuration of Pod trait.
                     properties:
                       configuration:
                         description: |-
@@ -5478,8 +5475,7 @@ spec:
                         type: object
                         x-kubernetes-preserve-unknown-fields: true
                       enabled:
-                        description: Can be used to enable or disable a trait. 
All
-                          traits share this common property.
+                        description: 'Deprecated: no longer in use.'
                         type: boolean
                     type: object
                   prometheus:
@@ -8016,10 +8012,7 @@ spec:
                         type: boolean
                     type: object
                   pod:
-                    description: |-
-                      The configuration of Pod trait.
-
-                      Deprecated: use init-containers instead.
+                    description: The configuration of Pod trait.
                     properties:
                       configuration:
                         description: |-
@@ -8029,8 +8022,7 @@ spec:
                         type: object
                         x-kubernetes-preserve-unknown-fields: true
                       enabled:
-                        description: Can be used to enable or disable a trait. 
All
-                          traits share this common property.
+                        description: 'Deprecated: no longer in use.'
                         type: boolean
                     type: object
                   prometheus:
@@ -10461,10 +10453,7 @@ spec:
                         type: boolean
                     type: object
                   pod:
-                    description: |-
-                      The configuration of Pod trait.
-
-                      Deprecated: use init-containers instead.
+                    description: The configuration of Pod trait.
                     properties:
                       configuration:
                         description: |-
@@ -10474,8 +10463,7 @@ spec:
                         type: object
                         x-kubernetes-preserve-unknown-fields: true
                       enabled:
-                        description: Can be used to enable or disable a trait. 
All
-                          traits share this common property.
+                        description: 'Deprecated: no longer in use.'
                         type: boolean
                     type: object
                   prometheus:
@@ -12892,10 +12880,7 @@ spec:
                         type: boolean
                     type: object
                   pod:
-                    description: |-
-                      The configuration of Pod trait.
-
-                      Deprecated: use init-containers instead.
+                    description: The configuration of Pod trait.
                     properties:
                       configuration:
                         description: |-
@@ -12905,8 +12890,7 @@ spec:
                         type: object
                         x-kubernetes-preserve-unknown-fields: true
                       enabled:
-                        description: Can be used to enable or disable a trait. 
All
-                          traits share this common property.
+                        description: 'Deprecated: no longer in use.'
                         type: boolean
                     type: object
                   prometheus:
@@ -13598,10 +13582,7 @@ spec:
                   type: object
                 type: array
               template:
-                description: |-
-                  Pod template customization.
-
-                  Deprecated: use container, init-containers or owner traits 
instead
+                description: Pod template customization.
                 properties:
                   spec:
                     description: the specification
@@ -22185,10 +22166,7 @@ spec:
                         type: boolean
                     type: object
                   pod:
-                    description: |-
-                      The configuration of Pod trait.
-
-                      Deprecated: use init-containers instead.
+                    description: The configuration of Pod trait.
                     properties:
                       configuration:
                         description: |-
@@ -22198,8 +22176,7 @@ spec:
                         type: object
                         x-kubernetes-preserve-unknown-fields: true
                       enabled:
-                        description: Can be used to enable or disable a trait. 
All
-                          traits share this common property.
+                        description: 'Deprecated: no longer in use.'
                         type: boolean
                     type: object
                   prometheus:
@@ -24577,10 +24554,7 @@ spec:
                         type: boolean
                     type: object
                   pod:
-                    description: |-
-                      The configuration of Pod trait.
-
-                      Deprecated: use init-containers instead.
+                    description: The configuration of Pod trait.
                     properties:
                       configuration:
                         description: |-
@@ -24590,8 +24564,7 @@ spec:
                         type: object
                         x-kubernetes-preserve-unknown-fields: true
                       enabled:
-                        description: Can be used to enable or disable a trait. 
All
-                          traits share this common property.
+                        description: 'Deprecated: no longer in use.'
                         type: boolean
                     type: object
                   prometheus:
@@ -26587,10 +26560,7 @@ spec:
                       type: object
                     type: array
                   template:
-                    description: |-
-                      Pod template customization.
-
-                      Deprecated: use container, init-containers or owner 
traits instead
+                    description: Pod template customization.
                     properties:
                       spec:
                         description: the specification
@@ -35237,10 +35207,7 @@ spec:
                             type: boolean
                         type: object
                       pod:
-                        description: |-
-                          The configuration of Pod trait.
-
-                          Deprecated: use init-containers instead.
+                        description: The configuration of Pod trait.
                         properties:
                           configuration:
                             description: |-
@@ -35250,8 +35217,7 @@ spec:
                             type: object
                             x-kubernetes-preserve-unknown-fields: true
                           enabled:
-                            description: Can be used to enable or disable a 
trait.
-                              All traits share this common property.
+                            description: 'Deprecated: no longer in use.'
                             type: boolean
                         type: object
                       prometheus:
@@ -37547,10 +37513,7 @@ spec:
                         type: boolean
                     type: object
                   pod:
-                    description: |-
-                      The configuration of Pod trait.
-
-                      Deprecated: use init-containers instead.
+                    description: The configuration of Pod trait.
                     properties:
                       configuration:
                         description: |-
@@ -37560,8 +37523,7 @@ spec:
                         type: object
                         x-kubernetes-preserve-unknown-fields: true
                       enabled:
-                        description: Can be used to enable or disable a trait. 
All
-                          traits share this common property.
+                        description: 'Deprecated: no longer in use.'
                         type: boolean
                     type: object
                   prometheus:
diff --git a/pkg/apis/camel/v1/common_types.go 
b/pkg/apis/camel/v1/common_types.go
index 802919cf9..f03573405 100644
--- a/pkg/apis/camel/v1/common_types.go
+++ b/pkg/apis/camel/v1/common_types.go
@@ -261,8 +261,6 @@ type Traits struct {
        // The configuration of Platform trait
        Platform *trait.PlatformTrait `json:"platform,omitempty" 
property:"platform"`
        // The configuration of Pod trait.
-       //
-       // Deprecated: use init-containers instead.
        Pod *trait.PodTrait `json:"pod,omitempty" property:"pod"`
        // The configuration of Prometheus trait
        Prometheus *trait.PrometheusTrait `json:"prometheus,omitempty" 
property:"prometheus"`
diff --git a/pkg/apis/camel/v1/integration_types.go 
b/pkg/apis/camel/v1/integration_types.go
index 7fa214b88..a2b98c423 100644
--- a/pkg/apis/camel/v1/integration_types.go
+++ b/pkg/apis/camel/v1/integration_types.go
@@ -75,8 +75,6 @@ type IntegrationSpec struct {
        // the traits needed to run this Integration
        Traits Traits `json:"traits,omitempty"`
        // Pod template customization.
-       //
-       // Deprecated: use container, init-containers or owner traits instead
        PodTemplate *PodSpecTemplate `json:"template,omitempty"`
        // Deprecated:
        //
@@ -310,16 +308,12 @@ type IntegrationCondition struct {
 }
 
 // PodSpecTemplate represent a template used to deploy an Integration `Pod`.
-//
-// Deprecated: to be removed in future versions.
 type PodSpecTemplate struct {
        // the specification
        Spec PodSpec `json:"spec,omitempty"`
 }
 
 // PodSpec defines a group of Kubernetes resources.
-//
-// Deprecated: to be removed in future versions.
 type PodSpec struct {
        // AutomountServiceAccountToken
        AutomountServiceAccountToken *bool 
`json:"automountServiceAccountToken,omitempty" 
protobuf:"varint,21,opt,name=automountServiceAccountToken"`
diff --git a/pkg/apis/camel/v1/trait/pod.go b/pkg/apis/camel/v1/trait/pod.go
index c9106f265..c23809975 100644
--- a/pkg/apis/camel/v1/trait/pod.go
+++ b/pkg/apis/camel/v1/trait/pod.go
@@ -17,20 +17,14 @@ limitations under the License.
 
 package trait
 
-// WARNING: The Pod trait is **deprecated** and will removed in future release 
versions:
-// use InitContainers trait instead.
-//
 // The pod trait allows the customization of the Integration pods.
 // It applies the `PodSpecTemplate` struct contained in the Integration 
`.spec.podTemplate` field,
 // into the Integration deployment Pods template, using strategic merge patch.
 //
-// This can be used to customize the container where Camel routes execute,
-// by using the `integration` container name.
-//
 // +camel-k:trait=pod.
-// +camel-k:deprecated=2.8.0.
+// +camel-k:internal.
 //
 //nolint:godoclint
 type PodTrait struct {
-       Trait `json:",inline" property:",squash"`
+       PlatformBaseTrait `json:",inline" property:",squash"`
 }
diff --git a/pkg/apis/camel/v1/trait/zz_generated.deepcopy.go 
b/pkg/apis/camel/v1/trait/zz_generated.deepcopy.go
index 7fc4e10bc..4850dffe4 100644
--- a/pkg/apis/camel/v1/trait/zz_generated.deepcopy.go
+++ b/pkg/apis/camel/v1/trait/zz_generated.deepcopy.go
@@ -1236,7 +1236,7 @@ func (in *PlatformTrait) DeepCopy() *PlatformTrait {
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, 
writing into out. in must be non-nil.
 func (in *PodTrait) DeepCopyInto(out *PodTrait) {
        *out = *in
-       in.Trait.DeepCopyInto(&out.Trait)
+       in.PlatformBaseTrait.DeepCopyInto(&out.PlatformBaseTrait)
 }
 
 // DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new PodTrait.
diff --git a/pkg/client/camel/applyconfiguration/camel/v1/integrationspec.go 
b/pkg/client/camel/applyconfiguration/camel/v1/integrationspec.go
index cc872bf30..1fe0c1856 100644
--- a/pkg/client/camel/applyconfiguration/camel/v1/integrationspec.go
+++ b/pkg/client/camel/applyconfiguration/camel/v1/integrationspec.go
@@ -49,8 +49,6 @@ type IntegrationSpecApplyConfiguration struct {
        // the traits needed to run this Integration
        Traits *TraitsApplyConfiguration `json:"traits,omitempty"`
        // Pod template customization.
-       //
-       // Deprecated: use container, init-containers or owner traits instead
        PodTemplate *PodSpecTemplateApplyConfiguration 
`json:"template,omitempty"`
        // Deprecated:
        //
diff --git a/pkg/client/camel/applyconfiguration/camel/v1/podspec.go 
b/pkg/client/camel/applyconfiguration/camel/v1/podspec.go
index 29f8de035..d1d22ab7f 100644
--- a/pkg/client/camel/applyconfiguration/camel/v1/podspec.go
+++ b/pkg/client/camel/applyconfiguration/camel/v1/podspec.go
@@ -27,8 +27,6 @@ import (
 // with apply.
 //
 // PodSpec defines a group of Kubernetes resources.
-//
-// Deprecated: to be removed in future versions.
 type PodSpecApplyConfiguration struct {
        // AutomountServiceAccountToken
        AutomountServiceAccountToken *bool 
`json:"automountServiceAccountToken,omitempty"`
diff --git a/pkg/client/camel/applyconfiguration/camel/v1/podspectemplate.go 
b/pkg/client/camel/applyconfiguration/camel/v1/podspectemplate.go
index bd1acfb2e..2a2eb6935 100644
--- a/pkg/client/camel/applyconfiguration/camel/v1/podspectemplate.go
+++ b/pkg/client/camel/applyconfiguration/camel/v1/podspectemplate.go
@@ -23,8 +23,6 @@ package v1
 // with apply.
 //
 // PodSpecTemplate represent a template used to deploy an Integration `Pod`.
-//
-// Deprecated: to be removed in future versions.
 type PodSpecTemplateApplyConfiguration struct {
        // the specification
        Spec *PodSpecApplyConfiguration `json:"spec,omitempty"`
diff --git a/pkg/client/camel/applyconfiguration/camel/v1/traits.go 
b/pkg/client/camel/applyconfiguration/camel/v1/traits.go
index 626d8b5a2..9aa8603f0 100644
--- a/pkg/client/camel/applyconfiguration/camel/v1/traits.go
+++ b/pkg/client/camel/applyconfiguration/camel/v1/traits.go
@@ -95,8 +95,6 @@ type TraitsApplyConfiguration struct {
        // The configuration of Platform trait
        Platform *trait.PlatformTrait `json:"platform,omitempty"`
        // The configuration of Pod trait.
-       //
-       // Deprecated: use init-containers instead.
        Pod *trait.PodTrait `json:"pod,omitempty"`
        // The configuration of Prometheus trait
        Prometheus *trait.PrometheusTrait `json:"prometheus,omitempty"`
diff --git a/pkg/cmd/run.go b/pkg/cmd/run.go
index 4a008edf4..0c17fe94e 100644
--- a/pkg/cmd/run.go
+++ b/pkg/cmd/run.go
@@ -109,7 +109,7 @@ func newCmdRun(rootCmdOptions *RootCmdOptions) 
(*cobra.Command, *runCmdOptions)
        cmd.Flags().StringArray("label", nil, "Add a label to the integration. 
E.g. \"--label my.company=hello\"")
        cmd.Flags().StringArray("source", nil, "Add source file to your 
integration, "+
                "this is added to the list of files listed as arguments of the 
command")
-       cmd.Flags().String("pod-template", "", "The path of the YAML file 
containing a PodSpec template to be used for the Integration pods")
+       cmd.Flags().String("pod-template", "", "[Deprecated] The path of the 
YAML file containing a PodSpec template to be used for the Integration pods")
        cmd.Flags().String("service-account", "", "The SA to use to run this 
Integration")
        cmd.Flags().String("git", "", "A Git repository containing the project 
to build.")
        cmd.Flags().String("git-branch", "", "Git branch to checkout when using 
--git option")
diff --git 
a/pkg/resources/config/crd/bases/camel.apache.org_integrationplatforms.yaml 
b/pkg/resources/config/crd/bases/camel.apache.org_integrationplatforms.yaml
index 84e898712..b5b0f2066 100644
--- a/pkg/resources/config/crd/bases/camel.apache.org_integrationplatforms.yaml
+++ b/pkg/resources/config/crd/bases/camel.apache.org_integrationplatforms.yaml
@@ -2159,10 +2159,7 @@ spec:
                         type: boolean
                     type: object
                   pod:
-                    description: |-
-                      The configuration of Pod trait.
-
-                      Deprecated: use init-containers instead.
+                    description: The configuration of Pod trait.
                     properties:
                       configuration:
                         description: |-
@@ -2172,8 +2169,7 @@ spec:
                         type: object
                         x-kubernetes-preserve-unknown-fields: true
                       enabled:
-                        description: Can be used to enable or disable a trait. 
All
-                          traits share this common property.
+                        description: 'Deprecated: no longer in use.'
                         type: boolean
                     type: object
                   prometheus:
@@ -4710,10 +4706,7 @@ spec:
                         type: boolean
                     type: object
                   pod:
-                    description: |-
-                      The configuration of Pod trait.
-
-                      Deprecated: use init-containers instead.
+                    description: The configuration of Pod trait.
                     properties:
                       configuration:
                         description: |-
@@ -4723,8 +4716,7 @@ spec:
                         type: object
                         x-kubernetes-preserve-unknown-fields: true
                       enabled:
-                        description: Can be used to enable or disable a trait. 
All
-                          traits share this common property.
+                        description: 'Deprecated: no longer in use.'
                         type: boolean
                     type: object
                   prometheus:
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 24bd943c9..9d371fd7d 100644
--- a/pkg/resources/config/crd/bases/camel.apache.org_integrationprofiles.yaml
+++ b/pkg/resources/config/crd/bases/camel.apache.org_integrationprofiles.yaml
@@ -2017,10 +2017,7 @@ spec:
                         type: boolean
                     type: object
                   pod:
-                    description: |-
-                      The configuration of Pod trait.
-
-                      Deprecated: use init-containers instead.
+                    description: The configuration of Pod trait.
                     properties:
                       configuration:
                         description: |-
@@ -2030,8 +2027,7 @@ spec:
                         type: object
                         x-kubernetes-preserve-unknown-fields: true
                       enabled:
-                        description: Can be used to enable or disable a trait. 
All
-                          traits share this common property.
+                        description: 'Deprecated: no longer in use.'
                         type: boolean
                     type: object
                   prometheus:
@@ -4448,10 +4444,7 @@ spec:
                         type: boolean
                     type: object
                   pod:
-                    description: |-
-                      The configuration of Pod trait.
-
-                      Deprecated: use init-containers instead.
+                    description: The configuration of Pod trait.
                     properties:
                       configuration:
                         description: |-
@@ -4461,8 +4454,7 @@ spec:
                         type: object
                         x-kubernetes-preserve-unknown-fields: true
                       enabled:
-                        description: Can be used to enable or disable a trait. 
All
-                          traits share this common property.
+                        description: 'Deprecated: no longer in use.'
                         type: boolean
                     type: object
                   prometheus:
diff --git a/pkg/resources/config/crd/bases/camel.apache.org_integrations.yaml 
b/pkg/resources/config/crd/bases/camel.apache.org_integrations.yaml
index d58e86cda..b773361e3 100644
--- a/pkg/resources/config/crd/bases/camel.apache.org_integrations.yaml
+++ b/pkg/resources/config/crd/bases/camel.apache.org_integrations.yaml
@@ -281,10 +281,7 @@ spec:
                   type: object
                 type: array
               template:
-                description: |-
-                  Pod template customization.
-
-                  Deprecated: use container, init-containers or owner traits 
instead
+                description: Pod template customization.
                 properties:
                   spec:
                     description: the specification
@@ -8868,10 +8865,7 @@ spec:
                         type: boolean
                     type: object
                   pod:
-                    description: |-
-                      The configuration of Pod trait.
-
-                      Deprecated: use init-containers instead.
+                    description: The configuration of Pod trait.
                     properties:
                       configuration:
                         description: |-
@@ -8881,8 +8875,7 @@ spec:
                         type: object
                         x-kubernetes-preserve-unknown-fields: true
                       enabled:
-                        description: Can be used to enable or disable a trait. 
All
-                          traits share this common property.
+                        description: 'Deprecated: no longer in use.'
                         type: boolean
                     type: object
                   prometheus:
@@ -11260,10 +11253,7 @@ spec:
                         type: boolean
                     type: object
                   pod:
-                    description: |-
-                      The configuration of Pod trait.
-
-                      Deprecated: use init-containers instead.
+                    description: The configuration of Pod trait.
                     properties:
                       configuration:
                         description: |-
@@ -11273,8 +11263,7 @@ spec:
                         type: object
                         x-kubernetes-preserve-unknown-fields: true
                       enabled:
-                        description: Can be used to enable or disable a trait. 
All
-                          traits share this common property.
+                        description: 'Deprecated: no longer in use.'
                         type: boolean
                     type: object
                   prometheus:
diff --git a/pkg/resources/config/crd/bases/camel.apache.org_pipes.yaml 
b/pkg/resources/config/crd/bases/camel.apache.org_pipes.yaml
index 8a6feaf8f..b28c84c22 100644
--- a/pkg/resources/config/crd/bases/camel.apache.org_pipes.yaml
+++ b/pkg/resources/config/crd/bases/camel.apache.org_pipes.yaml
@@ -277,10 +277,7 @@ spec:
                       type: object
                     type: array
                   template:
-                    description: |-
-                      Pod template customization.
-
-                      Deprecated: use container, init-containers or owner 
traits instead
+                    description: Pod template customization.
                     properties:
                       spec:
                         description: the specification
@@ -8927,10 +8924,7 @@ spec:
                             type: boolean
                         type: object
                       pod:
-                        description: |-
-                          The configuration of Pod trait.
-
-                          Deprecated: use init-containers instead.
+                        description: The configuration of Pod trait.
                         properties:
                           configuration:
                             description: |-
@@ -8940,8 +8934,7 @@ spec:
                             type: object
                             x-kubernetes-preserve-unknown-fields: true
                           enabled:
-                            description: Can be used to enable or disable a 
trait.
-                              All traits share this common property.
+                            description: 'Deprecated: no longer in use.'
                             type: boolean
                         type: object
                       prometheus:
@@ -11237,10 +11230,7 @@ spec:
                         type: boolean
                     type: object
                   pod:
-                    description: |-
-                      The configuration of Pod trait.
-
-                      Deprecated: use init-containers instead.
+                    description: The configuration of Pod trait.
                     properties:
                       configuration:
                         description: |-
@@ -11250,8 +11240,7 @@ spec:
                         type: object
                         x-kubernetes-preserve-unknown-fields: true
                       enabled:
-                        description: Can be used to enable or disable a trait. 
All
-                          traits share this common property.
+                        description: 'Deprecated: no longer in use.'
                         type: boolean
                     type: object
                   prometheus:
diff --git a/pkg/trait/pod.go b/pkg/trait/pod.go
index b88dc626e..892d1cc8a 100644
--- a/pkg/trait/pod.go
+++ b/pkg/trait/pod.go
@@ -25,7 +25,6 @@ import (
        corev1 "k8s.io/api/core/v1"
        "k8s.io/apimachinery/pkg/util/json"
        "k8s.io/apimachinery/pkg/util/strategicpatch"
-       "k8s.io/utils/ptr"
 
        serving "knative.dev/serving/pkg/apis/serving/v1"
 
@@ -47,30 +46,14 @@ func newPodTrait() Trait {
 }
 
 func (t *podTrait) Configure(e *Environment) (bool, *TraitCondition, error) {
-       if e.Integration == nil {
+       if e.Integration == nil || e.Integration.Spec.PodTemplate == nil {
                return false, nil, nil
        }
-       if !ptr.Deref(t.Enabled, true) {
-               return false, NewIntegrationConditionUserDisabled("Pod"), nil
-       }
-       //nolint:staticcheck
-       if e.Integration.Spec.PodTemplate == nil {
-               return false, nil, nil
-       }
-
-       condition := NewIntegrationCondition(
-               "Pod",
-               v1.IntegrationConditionTraitInfo,
-               corev1.ConditionTrue,
-               TraitConfigurationReason,
-               "Pod trait is deprecated in favour of InitContainers. It may be 
removed in future version.",
-       )
 
-       return e.IntegrationInRunningPhases(), condition, nil
+       return e.IntegrationInRunningPhases(), nil, nil
 }
 
 func (t *podTrait) Apply(e *Environment) error {
-       //nolint:staticcheck
        changes := e.Integration.Spec.PodTemplate.Spec
        var patchedPodSpec *corev1.PodSpec
        strategy, err := e.DetermineControllerStrategy()
@@ -112,7 +95,6 @@ func (t *podTrait) Apply(e *Environment) error {
        return nil
 }
 
-//nolint:staticcheck
 func (t *podTrait) applyChangesTo(podSpec *corev1.PodSpec, changes v1.PodSpec) 
(*corev1.PodSpec, error) {
        patch, err := json.Marshal(changes)
        if err != nil {
diff --git a/pkg/trait/pod_test.go b/pkg/trait/pod_test.go
index c48e6d07c..199c3fca6 100755
--- a/pkg/trait/pod_test.go
+++ b/pkg/trait/pod_test.go
@@ -37,16 +37,14 @@ import (
 
 func TestConfigurePodTraitDoesSucceed(t *testing.T) {
        trait, environment, _ := createPodTest("")
-       configured, condition, err := trait.Configure(environment)
+       configured, _, err := trait.Configure(environment)
 
        assert.True(t, configured)
-       assert.NotNil(t, condition)
        require.NoError(t, err)
 
-       configured, condition, err = trait.Configure(environment)
+       configured, _, err = trait.Configure(environment)
 
        assert.True(t, configured)
-       assert.NotNil(t, condition)
        require.NoError(t, err)
 }
 
@@ -222,9 +220,8 @@ func testPodTemplateSpec(t *testing.T, template string) 
corev1.PodTemplateSpec {
 
        trait, environment, _ := createPodTest(template)
 
-       _, condition, err := trait.Configure(environment)
+       _, _, err := trait.Configure(environment)
        require.NoError(t, err)
-       assert.NotNil(t, condition)
 
        err = trait.Apply(environment)
        require.NoError(t, err)

Reply via email to