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 ef08a044c fix(trait): remove default params from status
ef08a044c is described below

commit ef08a044cb30fb91a784701fddb74e764a10cf31
Author: Pasquale Congiusti <[email protected]>
AuthorDate: Sat Feb 7 09:45:19 2026 +0100

    fix(trait): remove default params from status
    
    Closes #6478
---
 helm/camel-k/crds/camel-k-crds.yaml                | 64 ----------------------
 pkg/apis/camel/v1/trait/gitops.go                  |  5 --
 .../camel.apache.org_integrationplatforms.yaml     | 16 ------
 .../camel.apache.org_integrationprofiles.yaml      | 16 ------
 .../crd/bases/camel.apache.org_integrations.yaml   | 16 ------
 .../config/crd/bases/camel.apache.org_pipes.yaml   | 16 ------
 pkg/trait/gitops.go                                | 53 ++++++++++++++++--
 7 files changed, 47 insertions(+), 139 deletions(-)

diff --git a/helm/camel-k/crds/camel-k-crds.yaml 
b/helm/camel-k/crds/camel-k-crds.yaml
index 9cbf81416..0ebf7aa71 100644
--- a/helm/camel-k/crds/camel-k-crds.yaml
+++ b/helm/camel-k/crds/camel-k-crds.yaml
@@ -4391,12 +4391,10 @@ spec:
                         description: the git commit (full SHA) to check out.
                         type: string
                       committerEmail:
-                        default: [email protected]
                         description: The email used to commit the GitOps 
changes (default
                           `[email protected]`).
                         type: string
                       committerName:
-                        default: Camel K Operator
                         description: The name used to commit the GitOps 
changes (default
                           `Camel K Operator`).
                         type: string
@@ -4412,21 +4410,15 @@ spec:
                           traits share this common property.
                         type: boolean
                       integrationDirectory:
-                        default: integrations
                         description: The root path where to store Kustomize 
overlays
                           (default `integrations`).
                         type: string
                       overlays:
-                        default:
-                        - dev
-                        - stag
-                        - prod
                         description: a list of overlays to provide (default 
{"dev","stag","prod"}).
                         items:
                           type: string
                         type: array
                       overwriteOverlay:
-                        default: false
                         description: a flag (default, false) to overwrite any 
existing
                           overlay.
                         type: boolean
@@ -6900,12 +6892,10 @@ spec:
                         description: the git commit (full SHA) to check out.
                         type: string
                       committerEmail:
-                        default: [email protected]
                         description: The email used to commit the GitOps 
changes (default
                           `[email protected]`).
                         type: string
                       committerName:
-                        default: Camel K Operator
                         description: The name used to commit the GitOps 
changes (default
                           `Camel K Operator`).
                         type: string
@@ -6921,21 +6911,15 @@ spec:
                           traits share this common property.
                         type: boolean
                       integrationDirectory:
-                        default: integrations
                         description: The root path where to store Kustomize 
overlays
                           (default `integrations`).
                         type: string
                       overlays:
-                        default:
-                        - dev
-                        - stag
-                        - prod
                         description: a list of overlays to provide (default 
{"dev","stag","prod"}).
                         items:
                           type: string
                         type: array
                       overwriteOverlay:
-                        default: false
                         description: a flag (default, false) to overwrite any 
existing
                           overlay.
                         type: boolean
@@ -9309,12 +9293,10 @@ spec:
                         description: the git commit (full SHA) to check out.
                         type: string
                       committerEmail:
-                        default: [email protected]
                         description: The email used to commit the GitOps 
changes (default
                           `[email protected]`).
                         type: string
                       committerName:
-                        default: Camel K Operator
                         description: The name used to commit the GitOps 
changes (default
                           `Camel K Operator`).
                         type: string
@@ -9330,21 +9312,15 @@ spec:
                           traits share this common property.
                         type: boolean
                       integrationDirectory:
-                        default: integrations
                         description: The root path where to store Kustomize 
overlays
                           (default `integrations`).
                         type: string
                       overlays:
-                        default:
-                        - dev
-                        - stag
-                        - prod
                         description: a list of overlays to provide (default 
{"dev","stag","prod"}).
                         items:
                           type: string
                         type: array
                       overwriteOverlay:
-                        default: false
                         description: a flag (default, false) to overwrite any 
existing
                           overlay.
                         type: boolean
@@ -11695,12 +11671,10 @@ spec:
                         description: the git commit (full SHA) to check out.
                         type: string
                       committerEmail:
-                        default: [email protected]
                         description: The email used to commit the GitOps 
changes (default
                           `[email protected]`).
                         type: string
                       committerName:
-                        default: Camel K Operator
                         description: The name used to commit the GitOps 
changes (default
                           `Camel K Operator`).
                         type: string
@@ -11716,21 +11690,15 @@ spec:
                           traits share this common property.
                         type: boolean
                       integrationDirectory:
-                        default: integrations
                         description: The root path where to store Kustomize 
overlays
                           (default `integrations`).
                         type: string
                       overlays:
-                        default:
-                        - dev
-                        - stag
-                        - prod
                         description: a list of overlays to provide (default 
{"dev","stag","prod"}).
                         items:
                           type: string
                         type: array
                       overwriteOverlay:
-                        default: false
                         description: a flag (default, false) to overwrite any 
existing
                           overlay.
                         type: boolean
@@ -20939,12 +20907,10 @@ spec:
                         description: the git commit (full SHA) to check out.
                         type: string
                       committerEmail:
-                        default: [email protected]
                         description: The email used to commit the GitOps 
changes (default
                           `[email protected]`).
                         type: string
                       committerName:
-                        default: Camel K Operator
                         description: The name used to commit the GitOps 
changes (default
                           `Camel K Operator`).
                         type: string
@@ -20960,21 +20926,15 @@ spec:
                           traits share this common property.
                         type: boolean
                       integrationDirectory:
-                        default: integrations
                         description: The root path where to store Kustomize 
overlays
                           (default `integrations`).
                         type: string
                       overlays:
-                        default:
-                        - dev
-                        - stag
-                        - prod
                         description: a list of overlays to provide (default 
{"dev","stag","prod"}).
                         items:
                           type: string
                         type: array
                       overwriteOverlay:
-                        default: false
                         description: a flag (default, false) to overwrite any 
existing
                           overlay.
                         type: boolean
@@ -23281,12 +23241,10 @@ spec:
                         description: the git commit (full SHA) to check out.
                         type: string
                       committerEmail:
-                        default: [email protected]
                         description: The email used to commit the GitOps 
changes (default
                           `[email protected]`).
                         type: string
                       committerName:
-                        default: Camel K Operator
                         description: The name used to commit the GitOps 
changes (default
                           `Camel K Operator`).
                         type: string
@@ -23302,21 +23260,15 @@ spec:
                           traits share this common property.
                         type: boolean
                       integrationDirectory:
-                        default: integrations
                         description: The root path where to store Kustomize 
overlays
                           (default `integrations`).
                         type: string
                       overlays:
-                        default:
-                        - dev
-                        - stag
-                        - prod
                         description: a list of overlays to provide (default 
{"dev","stag","prod"}).
                         items:
                           type: string
                         type: array
                       overwriteOverlay:
-                        default: false
                         description: a flag (default, false) to overwrite any 
existing
                           overlay.
                         type: boolean
@@ -33888,12 +33840,10 @@ spec:
                             description: the git commit (full SHA) to check 
out.
                             type: string
                           committerEmail:
-                            default: [email protected]
                             description: The email used to commit the GitOps 
changes
                               (default `[email protected]`).
                             type: string
                           committerName:
-                            default: Camel K Operator
                             description: The name used to commit the GitOps 
changes
                               (default `Camel K Operator`).
                             type: string
@@ -33909,21 +33859,15 @@ spec:
                               All traits share this common property.
                             type: boolean
                           integrationDirectory:
-                            default: integrations
                             description: The root path where to store 
Kustomize overlays
                               (default `integrations`).
                             type: string
                           overlays:
-                            default:
-                            - dev
-                            - stag
-                            - prod
                             description: a list of overlays to provide 
(default {"dev","stag","prod"}).
                             items:
                               type: string
                             type: array
                           overwriteOverlay:
-                            default: false
                             description: a flag (default, false) to overwrite 
any
                               existing overlay.
                             type: boolean
@@ -36162,12 +36106,10 @@ spec:
                         description: the git commit (full SHA) to check out.
                         type: string
                       committerEmail:
-                        default: [email protected]
                         description: The email used to commit the GitOps 
changes (default
                           `[email protected]`).
                         type: string
                       committerName:
-                        default: Camel K Operator
                         description: The name used to commit the GitOps 
changes (default
                           `Camel K Operator`).
                         type: string
@@ -36183,21 +36125,15 @@ spec:
                           traits share this common property.
                         type: boolean
                       integrationDirectory:
-                        default: integrations
                         description: The root path where to store Kustomize 
overlays
                           (default `integrations`).
                         type: string
                       overlays:
-                        default:
-                        - dev
-                        - stag
-                        - prod
                         description: a list of overlays to provide (default 
{"dev","stag","prod"}).
                         items:
                           type: string
                         type: array
                       overwriteOverlay:
-                        default: false
                         description: a flag (default, false) to overwrite any 
existing
                           overlay.
                         type: boolean
diff --git a/pkg/apis/camel/v1/trait/gitops.go 
b/pkg/apis/camel/v1/trait/gitops.go
index b5769b6f6..b8bfdd7e6 100644
--- a/pkg/apis/camel/v1/trait/gitops.go
+++ b/pkg/apis/camel/v1/trait/gitops.go
@@ -40,18 +40,13 @@ type GitOpsTrait struct {
        // the git branch to push to. If omitted, the operator will push to a 
new branch named as `cicd/release-candidate-<datetime>`.
        BranchPush string `json:"branchPush,omitempty" property:"branch-push"`
        // a list of overlays to provide (default {"dev","stag","prod"}).
-       // +kubebuilder:default={"dev","stag","prod"}
        Overlays []string `json:"overlays,omitempty" property:"overlays"`
        // a flag (default, false) to overwrite any existing overlay.
-       // +kubebuilder:default=false
        OverwriteOverlay bool `json:"overwriteOverlay,omitempty" 
property:"overwrite-overlay"`
        // The root path where to store Kustomize overlays (default 
`integrations`).
-       // +kubebuilder:default="integrations"
        IntegrationDirectory string `json:"integrationDirectory,omitempty" 
property:"integration-directory"`
        // The name used to commit the GitOps changes (default `Camel K 
Operator`).
-       // +kubebuilder:default="Camel K Operator"
        CommiterName string `json:"committerName,omitempty" 
property:"committed-name"`
        // The email used to commit the GitOps changes (default 
`[email protected]`).
-       // +kubebuilder:default="[email protected]"
        CommiterEmail string `json:"committerEmail,omitempty" 
property:"committed-email"`
 }
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 0f73c3592..e0945c82a 100644
--- a/pkg/resources/config/crd/bases/camel.apache.org_integrationplatforms.yaml
+++ b/pkg/resources/config/crd/bases/camel.apache.org_integrationplatforms.yaml
@@ -1117,12 +1117,10 @@ spec:
                         description: the git commit (full SHA) to check out.
                         type: string
                       committerEmail:
-                        default: [email protected]
                         description: The email used to commit the GitOps 
changes (default
                           `[email protected]`).
                         type: string
                       committerName:
-                        default: Camel K Operator
                         description: The name used to commit the GitOps 
changes (default
                           `Camel K Operator`).
                         type: string
@@ -1138,21 +1136,15 @@ spec:
                           traits share this common property.
                         type: boolean
                       integrationDirectory:
-                        default: integrations
                         description: The root path where to store Kustomize 
overlays
                           (default `integrations`).
                         type: string
                       overlays:
-                        default:
-                        - dev
-                        - stag
-                        - prod
                         description: a list of overlays to provide (default 
{"dev","stag","prod"}).
                         items:
                           type: string
                         type: array
                       overwriteOverlay:
-                        default: false
                         description: a flag (default, false) to overwrite any 
existing
                           overlay.
                         type: boolean
@@ -3626,12 +3618,10 @@ spec:
                         description: the git commit (full SHA) to check out.
                         type: string
                       committerEmail:
-                        default: [email protected]
                         description: The email used to commit the GitOps 
changes (default
                           `[email protected]`).
                         type: string
                       committerName:
-                        default: Camel K Operator
                         description: The name used to commit the GitOps 
changes (default
                           `Camel K Operator`).
                         type: string
@@ -3647,21 +3637,15 @@ spec:
                           traits share this common property.
                         type: boolean
                       integrationDirectory:
-                        default: integrations
                         description: The root path where to store Kustomize 
overlays
                           (default `integrations`).
                         type: string
                       overlays:
-                        default:
-                        - dev
-                        - stag
-                        - prod
                         description: a list of overlays to provide (default 
{"dev","stag","prod"}).
                         items:
                           type: string
                         type: array
                       overwriteOverlay:
-                        default: false
                         description: a flag (default, false) to overwrite any 
existing
                           overlay.
                         type: boolean
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 471165280..5b4e02414 100644
--- a/pkg/resources/config/crd/bases/camel.apache.org_integrationprofiles.yaml
+++ b/pkg/resources/config/crd/bases/camel.apache.org_integrationprofiles.yaml
@@ -983,12 +983,10 @@ spec:
                         description: the git commit (full SHA) to check out.
                         type: string
                       committerEmail:
-                        default: [email protected]
                         description: The email used to commit the GitOps 
changes (default
                           `[email protected]`).
                         type: string
                       committerName:
-                        default: Camel K Operator
                         description: The name used to commit the GitOps 
changes (default
                           `Camel K Operator`).
                         type: string
@@ -1004,21 +1002,15 @@ spec:
                           traits share this common property.
                         type: boolean
                       integrationDirectory:
-                        default: integrations
                         description: The root path where to store Kustomize 
overlays
                           (default `integrations`).
                         type: string
                       overlays:
-                        default:
-                        - dev
-                        - stag
-                        - prod
                         description: a list of overlays to provide (default 
{"dev","stag","prod"}).
                         items:
                           type: string
                         type: array
                       overwriteOverlay:
-                        default: false
                         description: a flag (default, false) to overwrite any 
existing
                           overlay.
                         type: boolean
@@ -3369,12 +3361,10 @@ spec:
                         description: the git commit (full SHA) to check out.
                         type: string
                       committerEmail:
-                        default: [email protected]
                         description: The email used to commit the GitOps 
changes (default
                           `[email protected]`).
                         type: string
                       committerName:
-                        default: Camel K Operator
                         description: The name used to commit the GitOps 
changes (default
                           `Camel K Operator`).
                         type: string
@@ -3390,21 +3380,15 @@ spec:
                           traits share this common property.
                         type: boolean
                       integrationDirectory:
-                        default: integrations
                         description: The root path where to store Kustomize 
overlays
                           (default `integrations`).
                         type: string
                       overlays:
-                        default:
-                        - dev
-                        - stag
-                        - prod
                         description: a list of overlays to provide (default 
{"dev","stag","prod"}).
                         items:
                           type: string
                         type: array
                       overwriteOverlay:
-                        default: false
                         description: a flag (default, false) to overwrite any 
existing
                           overlay.
                         type: boolean
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 c89bf48de..53b9cd25c 100644
--- a/pkg/resources/config/crd/bases/camel.apache.org_integrations.yaml
+++ b/pkg/resources/config/crd/bases/camel.apache.org_integrations.yaml
@@ -7821,12 +7821,10 @@ spec:
                         description: the git commit (full SHA) to check out.
                         type: string
                       committerEmail:
-                        default: [email protected]
                         description: The email used to commit the GitOps 
changes (default
                           `[email protected]`).
                         type: string
                       committerName:
-                        default: Camel K Operator
                         description: The name used to commit the GitOps 
changes (default
                           `Camel K Operator`).
                         type: string
@@ -7842,21 +7840,15 @@ spec:
                           traits share this common property.
                         type: boolean
                       integrationDirectory:
-                        default: integrations
                         description: The root path where to store Kustomize 
overlays
                           (default `integrations`).
                         type: string
                       overlays:
-                        default:
-                        - dev
-                        - stag
-                        - prod
                         description: a list of overlays to provide (default 
{"dev","stag","prod"}).
                         items:
                           type: string
                         type: array
                       overwriteOverlay:
-                        default: false
                         description: a flag (default, false) to overwrite any 
existing
                           overlay.
                         type: boolean
@@ -10163,12 +10155,10 @@ spec:
                         description: the git commit (full SHA) to check out.
                         type: string
                       committerEmail:
-                        default: [email protected]
                         description: The email used to commit the GitOps 
changes (default
                           `[email protected]`).
                         type: string
                       committerName:
-                        default: Camel K Operator
                         description: The name used to commit the GitOps 
changes (default
                           `Camel K Operator`).
                         type: string
@@ -10184,21 +10174,15 @@ spec:
                           traits share this common property.
                         type: boolean
                       integrationDirectory:
-                        default: integrations
                         description: The root path where to store Kustomize 
overlays
                           (default `integrations`).
                         type: string
                       overlays:
-                        default:
-                        - dev
-                        - stag
-                        - prod
                         description: a list of overlays to provide (default 
{"dev","stag","prod"}).
                         items:
                           type: string
                         type: array
                       overwriteOverlay:
-                        default: false
                         description: a flag (default, false) to overwrite any 
existing
                           overlay.
                         type: boolean
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 f6c7187eb..6cbf3f26d 100644
--- a/pkg/resources/config/crd/bases/camel.apache.org_pipes.yaml
+++ b/pkg/resources/config/crd/bases/camel.apache.org_pipes.yaml
@@ -7876,12 +7876,10 @@ spec:
                             description: the git commit (full SHA) to check 
out.
                             type: string
                           committerEmail:
-                            default: [email protected]
                             description: The email used to commit the GitOps 
changes
                               (default `[email protected]`).
                             type: string
                           committerName:
-                            default: Camel K Operator
                             description: The name used to commit the GitOps 
changes
                               (default `Camel K Operator`).
                             type: string
@@ -7897,21 +7895,15 @@ spec:
                               All traits share this common property.
                             type: boolean
                           integrationDirectory:
-                            default: integrations
                             description: The root path where to store 
Kustomize overlays
                               (default `integrations`).
                             type: string
                           overlays:
-                            default:
-                            - dev
-                            - stag
-                            - prod
                             description: a list of overlays to provide 
(default {"dev","stag","prod"}).
                             items:
                               type: string
                             type: array
                           overwriteOverlay:
-                            default: false
                             description: a flag (default, false) to overwrite 
any
                               existing overlay.
                             type: boolean
@@ -10150,12 +10142,10 @@ spec:
                         description: the git commit (full SHA) to check out.
                         type: string
                       committerEmail:
-                        default: [email protected]
                         description: The email used to commit the GitOps 
changes (default
                           `[email protected]`).
                         type: string
                       committerName:
-                        default: Camel K Operator
                         description: The name used to commit the GitOps 
changes (default
                           `Camel K Operator`).
                         type: string
@@ -10171,21 +10161,15 @@ spec:
                           traits share this common property.
                         type: boolean
                       integrationDirectory:
-                        default: integrations
                         description: The root path where to store Kustomize 
overlays
                           (default `integrations`).
                         type: string
                       overlays:
-                        default:
-                        - dev
-                        - stag
-                        - prod
                         description: a list of overlays to provide (default 
{"dev","stag","prod"}).
                         items:
                           type: string
                         type: array
                       overwriteOverlay:
-                        default: false
                         description: a flag (default, false) to overwrite any 
existing
                           overlay.
                         type: boolean
diff --git a/pkg/trait/gitops.go b/pkg/trait/gitops.go
index 58a4eab5b..936ca930d 100644
--- a/pkg/trait/gitops.go
+++ b/pkg/trait/gitops.go
@@ -135,7 +135,7 @@ func (t *gitOpsTrait) pushGitOpsItInGitRepo(ctx 
context.Context, it *v1.Integrat
        }
 
        // Generate Kustomize content (it may override upstream content)
-       ciCdDir := filepath.Join(dir, t.IntegrationDirectory)
+       ciCdDir := filepath.Join(dir, t.getIntegrationsDirectory())
        err = os.MkdirAll(ciCdDir, io.FilePerm755)
        if err != nil {
                return err
@@ -146,23 +146,23 @@ func (t *gitOpsTrait) pushGitOpsItInGitRepo(ctx 
context.Context, it *v1.Integrat
                return err
        }
 
-       for _, overlay := range t.Overlays {
+       for _, overlay := range t.getOverlays() {
                destIntegration := util.EditIntegration(it, kit, overlay, "")
-               err = util.AppendKustomizeIntegration(destIntegration, ciCdDir, 
t.OverwriteOverlay)
+               err = util.AppendKustomizeIntegration(destIntegration, ciCdDir, 
t.getOverwriteOverlay())
                if err != nil {
                        return err
                }
        }
 
        // Commit and push new content
-       _, err = w.Add(t.IntegrationDirectory)
+       _, err = w.Add(t.getIntegrationsDirectory())
        if err != nil {
                return err
        }
        _, err = w.Commit(commitMessage, &git.CommitOptions{
                Author: &object.Signature{
-                       Name:  t.CommiterName,
-                       Email: t.CommiterEmail,
+                       Name:  t.getCommitterName(),
+                       Email: t.getCommitterEmail(),
                        When:  time.Now(),
                },
        })
@@ -227,3 +227,44 @@ func (t *gitOpsTrait) gitConf(it *v1.Integration) 
v1.GitConfigSpec {
 
        return gitConf
 }
+
+// Return the trait overlays or a default value.
+func (t *gitOpsTrait) getOverlays() []string {
+       if t.Overlays == nil {
+               return []string{"dev", "stag", "prod"}
+       }
+
+       return t.Overlays
+}
+
+// Return the trait overwrite overlay parameter or a default value.
+func (t *gitOpsTrait) getOverwriteOverlay() bool {
+       return t.OverwriteOverlay
+}
+
+// Return the trait Integrations directory parameter or a default value.
+func (t *gitOpsTrait) getIntegrationsDirectory() string {
+       if t.IntegrationDirectory == "" {
+               return "integrations"
+       }
+
+       return t.IntegrationDirectory
+}
+
+// Return the trait committer name parameter or a default value.
+func (t *gitOpsTrait) getCommitterName() string {
+       if t.CommiterName == "" {
+               return "Camel K Operator"
+       }
+
+       return t.CommiterName
+}
+
+// Return the trait committer email parameter or a default value.
+func (t *gitOpsTrait) getCommitterEmail() string {
+       if t.CommiterEmail == "" {
+               return "[email protected]"
+       }
+
+       return t.CommiterEmail
+}

Reply via email to