Skip to content

Commit

Permalink
fix(helm): force IntegrationPlatform override
Browse files Browse the repository at this point in the history
  • Loading branch information
squakez committed Jul 2, 2024
1 parent bc094e8 commit e3a7df2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion docs/modules/ROOT/pages/installation/installation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand Down
1 change: 1 addition & 0 deletions e2e/install/helm/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func TestHelmInstallation(t *testing.T) {
fmt.Sprintf("operator.operatorId=%s", operatorID),
"-n",
ns,
"--force",
),
)

Expand Down
2 changes: 1 addition & 1 deletion helm/camel-k/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions pkg/cmd/operator/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit e3a7df2

Please sign in to comment.