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 e3a7df29fea9fd6f1badaf2dd39521afb9c25deb
Author: Pasquale Congiusti <[email protected]>
AuthorDate: Tue Jul 2 08:37:04 2024 +0200

    fix(helm): force IntegrationPlatform override
---
 docs/modules/ROOT/pages/installation/installation.adoc | 4 +++-
 e2e/install/helm/setup_test.go                         | 1 +
 helm/camel-k/README.md                                 | 2 +-
 pkg/cmd/operator/operator.go                           | 1 +
 4 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/docs/modules/ROOT/pages/installation/installation.adoc 
b/docs/modules/ROOT/pages/installation/installation.adoc
index 8b78acaa6..71cca15c2 100644
--- a/docs/modules/ROOT/pages/installation/installation.adoc
+++ b/docs/modules/ROOT/pages/installation/installation.adoc
@@ -15,9 +15,11 @@ Camel K is also available in Helm Hub:
 
 ```
 $ helm repo add camel-k https://apache.github.io/camel-k/charts/
-$ helm install camel-k [--set platform.build.registry.address=<my-registry>] 
camel-k/camel-k
+$ helm install camel-k [--set platform.build.registry.address=<my-registry>] 
camel-k/camel-k --force
 ```
 
+NOTE: the `--force` option may be required to override the platform 
configuration with the registry values provided.
+
 More instructions on the https://hub.helm.sh/charts/camel-k/camel-k[Camel K 
Helm] page.
 
 [[olm]]
diff --git a/e2e/install/helm/setup_test.go b/e2e/install/helm/setup_test.go
index 19e942b1e..e69e4b488 100644
--- a/e2e/install/helm/setup_test.go
+++ b/e2e/install/helm/setup_test.go
@@ -62,6 +62,7 @@ func TestHelmInstallation(t *testing.T) {
                                fmt.Sprintf("operator.operatorId=%s", 
operatorID),
                                "-n",
                                ns,
+                               "--force",
                        ),
                )
 
diff --git a/helm/camel-k/README.md b/helm/camel-k/README.md
index 05d9e30ac..cfca2d345 100644
--- a/helm/camel-k/README.md
+++ b/helm/camel-k/README.md
@@ -29,7 +29,7 @@ $ helm install camel-k \
   camel-k/camel-k
 ```
 
-You may install Camel K and specify a container registry later.
+You may install Camel K and specify a container registry later. You may need 
to provide the `--force` option if the installation complains about an existing 
`IntegrationPlatform`.
 
 ### Openshift
 
diff --git a/pkg/cmd/operator/operator.go b/pkg/cmd/operator/operator.go
index ad892e41e..2a8035645 100644
--- a/pkg/cmd/operator/operator.go
+++ b/pkg/cmd/operator/operator.go
@@ -256,6 +256,7 @@ func findOrCreateIntegrationPlatform(ctx context.Context, c 
client.Client, opera
        }
 
        if pl, err := kubernetes.GetIntegrationPlatform(ctx, c, platformName, 
operatorNamespace); pl == nil || k8serrors.IsNotFound(err) {
+               log.Info("No IntegrationPlatform provided. Creating one with 
default values.")
                defaultPlatform := v1.NewIntegrationPlatform(operatorNamespace, 
platformName)
 
                if defaultPlatform.Labels == nil {

Reply via email to