diff --git a/.github/actions/registry-setting/action.yml b/.github/actions/registry-setting/action.yml index 5fb48b4edc..6ec9d27543 100644 --- a/.github/actions/registry-setting/action.yml +++ b/.github/actions/registry-setting/action.yml @@ -39,11 +39,11 @@ runs: # --docker-server $KAMEL_INSTALL_REGISTRY \ # --docker-username admin \ # --docker-password password \ - # -n camel-k + # -n camel kubectl create configmap camel-k-operator-configmap-configuration \ --from-literal=REGISTRY_ADDRESS="$DEV_REGISTRY" \ - -n camel-k + -n camel # Uncomment to provide a push secret # --from-literal=REGISTRY_SECRET="my-registry" - \ No newline at end of file + diff --git a/.github/workflows/arkmq.yml b/.github/workflows/arkmq.yml index d1be3e1e22..5b5544ff09 100644 --- a/.github/workflows/arkmq.yml +++ b/.github/workflows/arkmq.yml @@ -75,9 +75,9 @@ jobs: - name: Install operator shell: bash run: | - kubectl create ns camel-k + kubectl create ns camel kubectl apply -k install/overlays/all-namespaces/ --server-side --force-conflicts - kubectl wait --for=condition=available deployment/camel-k-operator -n camel-k --timeout=60s + kubectl wait --for=condition=available deployment/camel-k-operator -n camel --timeout=60s - name: Run test shell: bash diff --git a/.github/workflows/cert-manager.yml b/.github/workflows/cert-manager.yml index 7d3acf5792..1eb0b5cbd8 100644 --- a/.github/workflows/cert-manager.yml +++ b/.github/workflows/cert-manager.yml @@ -75,9 +75,9 @@ jobs: - name: Install operator shell: bash run: | - kubectl create ns camel-k + kubectl create ns camel kubectl apply -k install/overlays/all-namespaces/ --server-side --force-conflicts - kubectl wait --for=condition=available deployment/camel-k-operator -n camel-k --timeout=60s + kubectl wait --for=condition=available deployment/camel-k-operator -n camel --timeout=60s - name: Run test shell: bash diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index b931cb295f..5ae2b7e786 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -73,22 +73,22 @@ jobs: - name: Install operator shell: bash run: | - kubectl create ns camel-k + kubectl create ns camel # the extra configuration is required to run the container registry with secret kubectl create configmap camel-k-operator-configmap-configuration \ --from-literal=ENABLE_DEV_REGISTRY_SECRET="true" \ --from-literal=MAVEN_REPOSITORIES_ALLOWED="https://maven.repository.redhat.com/ga@id=redhat" \ - -n camel-k + -n camel # make the test aware that each Integration requires a pull secret E2E_TEST_REGISTRY_SECRET_COPY=true echo "E2E_TEST_REGISTRY_SECRET_COPY=$E2E_TEST_REGISTRY_SECRET_COPY" >> $GITHUB_ENV echo "Setting E2E_TEST_REGISTRY_SECRET_COPY=true in order to automate the copy of the pull secret and the setting in each test" kubectl apply -k install/overlays/all-namespaces/ --server-side --force-conflicts - kubectl wait --for=condition=available deployment/camel-k-operator -n camel-k --timeout=60s + kubectl wait --for=condition=available deployment/camel-k-operator -n camel --timeout=60s # Install Apache Kamelets catalog mvn -q dependency:copy -Dartifact=org.apache.camel.kamelets:camel-kamelets:4.22.0:jar -Dmdep.useBaseVersion=true -DoutputDirectory=/tmp - unzip /tmp/camel-kamelets-4.22.0.jar -d /tmp && kubectl apply -f /tmp/kamelets -n camel-k + unzip /tmp/camel-kamelets-4.22.0.jar -d /tmp && kubectl apply -f /tmp/kamelets -n camel - name: Run test shell: bash diff --git a/.github/workflows/gateway.yml b/.github/workflows/gateway.yml index 8c3b546b81..2382834260 100644 --- a/.github/workflows/gateway.yml +++ b/.github/workflows/gateway.yml @@ -75,9 +75,9 @@ jobs: - name: Install operator shell: bash run: | - kubectl create ns camel-k + kubectl create ns camel kubectl apply -k install/overlays/all-namespaces/ --server-side --force-conflicts - kubectl wait --for=condition=available deployment/camel-k-operator -n camel-k --timeout=60s + kubectl wait --for=condition=available deployment/camel-k-operator -n camel --timeout=60s - name: Run test shell: bash diff --git a/.github/workflows/kafka.yml b/.github/workflows/kafka.yml index d3473128a6..c0e550f401 100644 --- a/.github/workflows/kafka.yml +++ b/.github/workflows/kafka.yml @@ -75,9 +75,9 @@ jobs: - name: Install operator shell: bash run: | - kubectl create ns camel-k + kubectl create ns camel kubectl apply -k install/overlays/all-namespaces/ --server-side --force-conflicts - kubectl wait --for=condition=available deployment/camel-k-operator -n camel-k --timeout=60s + kubectl wait --for=condition=available deployment/camel-k-operator -n camel --timeout=60s - name: Run test shell: bash diff --git a/.github/workflows/knative.yml b/.github/workflows/knative.yml index d42a0ab274..a393d315b9 100644 --- a/.github/workflows/knative.yml +++ b/.github/workflows/knative.yml @@ -75,12 +75,12 @@ jobs: - name: Install operator shell: bash run: | - kubectl create ns camel-k + kubectl create ns camel kubectl apply -k install/overlays/all-namespaces/ --server-side --force-conflicts - kubectl wait --for=condition=available deployment/camel-k-operator -n camel-k --timeout=60s + kubectl wait --for=condition=available deployment/camel-k-operator -n camel --timeout=60s # Install Apache Kamelets catalog mvn -q dependency:copy -Dartifact=org.apache.camel.kamelets:camel-kamelets:4.18.1:jar -Dmdep.useBaseVersion=true -DoutputDirectory=/tmp - unzip /tmp/camel-kamelets-4.18.1.jar -d /tmp && kubectl apply -f /tmp/kamelets -n camel-k + unzip /tmp/camel-kamelets-4.18.1.jar -d /tmp && kubectl apply -f /tmp/kamelets -n camel - name: Run test shell: bash diff --git a/.github/workflows/native.yml b/.github/workflows/native.yml index 13627fd018..5f6b38117a 100644 --- a/.github/workflows/native.yml +++ b/.github/workflows/native.yml @@ -76,12 +76,12 @@ jobs: - name: Install operator shell: bash run: | - kubectl create ns camel-k + kubectl create ns camel kubectl apply -k install/overlays/all-namespaces/ --server-side --force-conflicts - kubectl wait --for=condition=available deployment/camel-k-operator -n camel-k --timeout=60s + kubectl wait --for=condition=available deployment/camel-k-operator -n camel --timeout=60s # Install Apache Kamelets catalog mvn -q dependency:copy -Dartifact=org.apache.camel.kamelets:camel-kamelets:4.18.1:jar -Dmdep.useBaseVersion=true -DoutputDirectory=/tmp - unzip /tmp/camel-kamelets-4.18.1.jar -d /tmp && kubectl apply -f /tmp/kamelets -n camel-k + unzip /tmp/camel-kamelets-4.18.1.jar -d /tmp && kubectl apply -f /tmp/kamelets -n camel - name: Run test shell: bash diff --git a/.github/workflows/network-policy.yml b/.github/workflows/network-policy.yml index f0b095e18c..985298ab0d 100644 --- a/.github/workflows/network-policy.yml +++ b/.github/workflows/network-policy.yml @@ -72,12 +72,12 @@ jobs: - name: Install operator shell: bash run: | - kubectl create ns camel-k + kubectl create ns camel kubectl create configmap camel-k-operator-configmap-configuration \ --from-literal=MAVEN_REPOSITORIES_ALLOWED="https://maven.repository.redhat.com/ga@id=redhat" \ - -n camel-k + -n camel kubectl apply -k install/overlays/all-namespaces/ --server-side --force-conflicts - kubectl wait --for=condition=available deployment/camel-k-operator -n camel-k --timeout=60s + kubectl wait --for=condition=available deployment/camel-k-operator -n camel --timeout=60s - name: Run NetworkPolicy E2E test shell: bash diff --git a/.github/workflows/nightly-multi.yml b/.github/workflows/nightly-multi.yml index 405bd75af3..549249f854 100644 --- a/.github/workflows/nightly-multi.yml +++ b/.github/workflows/nightly-multi.yml @@ -58,15 +58,15 @@ jobs: THIS_VERSION="$(make get-version)" VERSION="$(make get-version | sed s/-SNAPSHOT//)-nightly" sed -i "s#apache/camel-k:$THIS_VERSION#testcamelk/camel-k:$VERSION#g" install/base/config/manager/operator-deployment.yaml - kubectl create ns camel-k + kubectl create ns camel kubectl create configmap camel-k-operator-configmap-configuration \ --from-literal=MAVEN_REPOSITORIES_ALLOWED="https://maven.repository.redhat.com/ga@id=redhat" \ - -n camel-k + -n camel kubectl apply -k install/overlays/all-namespaces/ --server-side --force-conflicts - kubectl wait --for=condition=available deployment/camel-k-operator -n camel-k --timeout=60s + kubectl wait --for=condition=available deployment/camel-k-operator -n camel --timeout=60s # Install Apache Kamelets catalog mvn -q dependency:copy -Dartifact=org.apache.camel.kamelets:camel-kamelets:4.18.1:jar -Dmdep.useBaseVersion=true -DoutputDirectory=/tmp - unzip /tmp/camel-kamelets-4.18.1.jar -d /tmp && kubectl apply -f /tmp/kamelets -n camel-k + unzip /tmp/camel-kamelets-4.18.1.jar -d /tmp && kubectl apply -f /tmp/kamelets -n camel - name: Run test shell: bash @@ -98,15 +98,15 @@ jobs: run: | VERSION="$(make get-version | sed s/-SNAPSHOT//)-nightly-21-jdk" CUSTOM_IMAGE=testcamelk/camel-k CUSTOM_VERSION=$VERSION make bundle - kubectl create ns camel-k + kubectl create ns camel kubectl create configmap camel-k-operator-configmap-configuration \ --from-literal=MAVEN_REPOSITORIES_ALLOWED="https://maven.repository.redhat.com/ga@id=redhat" \ - -n camel-k + -n camel kubectl apply -k install/overlays/all-namespaces/ --server-side --force-conflicts - kubectl wait --for=condition=available deployment/camel-k-operator -n camel-k --timeout=60s + kubectl wait --for=condition=available deployment/camel-k-operator -n camel --timeout=60s # Install Apache Kamelets catalog mvn -q dependency:copy -Dartifact=org.apache.camel.kamelets:camel-kamelets:4.18.1:jar -Dmdep.useBaseVersion=true -DoutputDirectory=/tmp - unzip /tmp/camel-kamelets-4.18.1.jar -d /tmp && kubectl apply -f /tmp/kamelets -n camel-k + unzip /tmp/camel-kamelets-4.18.1.jar -d /tmp && kubectl apply -f /tmp/kamelets -n camel - name: Run test shell: bash diff --git a/.github/workflows/telemetry.yml b/.github/workflows/telemetry.yml index e6af676f51..6019b26eb5 100644 --- a/.github/workflows/telemetry.yml +++ b/.github/workflows/telemetry.yml @@ -70,9 +70,9 @@ jobs: - name: Install operator shell: bash run: | - kubectl create ns camel-k + kubectl create ns camel kubectl apply -k install/overlays/all-namespaces/ --server-side --force-conflicts - kubectl wait --for=condition=available deployment/camel-k-operator -n camel-k --timeout=60s + kubectl wait --for=condition=available deployment/camel-k-operator -n camel --timeout=60s - name: Install OTLP Collector uses: ./.github/actions/install-otlp-collector diff --git a/.github/workflows/upgrade.yml b/.github/workflows/upgrade.yml index 43ccc06c0d..5742afc3b1 100644 --- a/.github/workflows/upgrade.yml +++ b/.github/workflows/upgrade.yml @@ -74,7 +74,7 @@ jobs: - name: Create upgrade test namespace shell: bash run: | - kubectl create ns camel-k + kubectl create ns camel - name: Registry setting uses: ./.github/actions/registry-setting diff --git a/docs/modules/ROOT/pages/contributing/e2e.adoc b/docs/modules/ROOT/pages/contributing/e2e.adoc index bf34475fde..82ce1697ee 100644 --- a/docs/modules/ROOT/pages/contributing/e2e.adoc +++ b/docs/modules/ROOT/pages/contributing/e2e.adoc @@ -12,7 +12,7 @@ Since both unit test and integration test names end with `_test.go`, both would Look into the https://github.com/apache/camel-k/tree/main/e2e[/e2e] directory for examples of integration tests. -Before running an integration test, you need to be connected to a Kubernetes/OpenShift namespace and have the Camel K operator installed globally into a namespaced named `camel-k`. After you log into your cluster, you can run the following command to execute the suite of smoke tests: +Before running an integration test, you need to be connected to a Kubernetes/OpenShift namespace and have the Camel K operator installed globally into a namespaced named `camel`. After you log into your cluster, you can run the following command to execute the suite of smoke tests: [source] ---- diff --git a/docs/modules/ROOT/pages/contributing/local-development.adoc b/docs/modules/ROOT/pages/contributing/local-development.adoc index c61d9a9213..87e9b91b17 100644 --- a/docs/modules/ROOT/pages/contributing/local-development.adoc +++ b/docs/modules/ROOT/pages/contributing/local-development.adoc @@ -24,11 +24,11 @@ For other cluster types you may check the specific documentation. As soon as you make images ---- -This command will build and publish your actual Camel K development version to the container registry. At this stage installing the Camel K development version will be as easy as a typical installation. We are supporting a series of makefile targets to let you easily install the operator on your local cluster in one single line. These targets are though to cover plain Kubernetes and Openshift cluster in either global (default in `camel-k` namespace) and namespaced (default in `default` namespace) installation: +This command will build and publish your actual Camel K development version to the container registry. At this stage installing the Camel K development version will be as easy as a typical installation. We are supporting a series of makefile targets to let you easily install the operator on your local cluster in one single line. These targets are though to cover plain Kubernetes and Openshift cluster in either global (default in `camel` namespace) and namespaced (default in `default` namespace) installation: [source] ---- -make install-k8s-global (default in camel-k namespace) +make install-k8s-global (default in camel namespace) make install-k8s-ns (default in default namespace) ---- diff --git a/docs/modules/ROOT/pages/installation/advanced/jdk-version.adoc b/docs/modules/ROOT/pages/installation/advanced/jdk-version.adoc index 8a7ad980e8..e5e2e29e2a 100644 --- a/docs/modules/ROOT/pages/installation/advanced/jdk-version.adoc +++ b/docs/modules/ROOT/pages/installation/advanced/jdk-version.adoc @@ -10,7 +10,7 @@ The list of available container images is published in (https://hub.docker.com/r If you want to use a different container image instead of the default, you will need to edit your operator Deployment by replacing the default image with the one you're choosing. You can use the following script in order to change on the fly the value and install a Camel K JDK 21 based operator: ```bash -kustomize build github.com/apache/camel-k/install/overlays/all-namespaces?ref=v2.6.0 | sed 's#docker.io/apache/camel-k:2.6.0#docker.io/apache/camel-k:2.6.0-21-jdk#g' | kubectl apply -f - --server-side -n camel-k +kustomize build github.com/apache/camel-k/install/overlays/all-namespaces?ref=v2.6.0 | sed 's#docker.io/apache/camel-k:2.6.0#docker.io/apache/camel-k:2.6.0-21-jdk#g' | kubectl apply -f - --server-side -n camel ``` During the build, you should see the version used in the Maven building log traces: diff --git a/docs/modules/ROOT/pages/installation/installation.adoc b/docs/modules/ROOT/pages/installation/installation.adoc index fbc508c6f8..8fdfd9643f 100644 --- a/docs/modules/ROOT/pages/installation/installation.adoc +++ b/docs/modules/ROOT/pages/installation/installation.adoc @@ -13,7 +13,7 @@ https://kustomize.io[Kustomize] provides a declarative approach to the configura $ kubectl apply -k github.com/apache/camel-k/install/overlays/all-namespaces?ref=v{last-released-version} --server-side ---- -You can specify as `ref` parameter the version you're willing to install (ie, `v{last-released-version}`). The command above will install a descoped (global) operator in the camel-k namespace. This is the suggested configuration in order to manage Integrations in all namespaces. +You can specify as `ref` parameter the version you're willing to install (ie, `v{last-released-version}`). The command above will install a descoped (global) operator in the camel namespace. This is the suggested configuration in order to manage Integrations in all namespaces. [[helm]] == Installation via Helm Hub @@ -22,7 +22,7 @@ Camel K is available in Helm Hub: ``` $ helm repo add camel-k https://apache.github.io/camel-k/charts/ -$ helm install camel-k camel-k/camel-k -n camel-k +$ helm install camel-k camel-k/camel-k -n camel ``` More instructions on the https://hub.helm.sh/charts/camel-k/camel-k[Camel K Helm] page. @@ -67,7 +67,7 @@ Each installation method have its proper way to setup configuration. A common on In order to verify that the operator is up and running, you should be able to see a Camel K operator `Pod` running in the namespace used, for example: ``` -kubectl get pods -n camel-k +kubectl get pods -n camel NAME READY STATUS RESTARTS AGE camel-k-operator-5b686db99f-c2k2s 1/1 Running 0 3m46s ``` diff --git a/docs/modules/ROOT/pages/installation/registry/special/minikube.adoc b/docs/modules/ROOT/pages/installation/registry/special/minikube.adoc index 564895d74d..618cb0ca82 100644 --- a/docs/modules/ROOT/pages/installation/registry/special/minikube.adoc +++ b/docs/modules/ROOT/pages/installation/registry/special/minikube.adoc @@ -39,5 +39,5 @@ You can also provide those configuration in the Camel K configmap: kubectl create configmap camel-k-operator-configmap-configuration \ --from-literal=REGISTRY_ADDRESS="10.102.190.238" \ --from-literal=REGISTRY_INSECURE="true" \ - -n camel-k + -n camel ``` \ No newline at end of file diff --git a/docs/modules/ROOT/pages/installation/registry/special/openshift.adoc b/docs/modules/ROOT/pages/installation/registry/special/openshift.adoc index b7b9e73b8d..2784a4845a 100644 --- a/docs/modules/ROOT/pages/installation/registry/special/openshift.adoc +++ b/docs/modules/ROOT/pages/installation/registry/special/openshift.adoc @@ -9,7 +9,7 @@ NOTE: before version 2.6, Camel K used S2I as a default publishing strategy agai The first thing you need to do is to create an access token for the service account you want to use to pull/push images from the registry. We suggest to use the `camel-k-builder` Service Account which was created during the installation procedure and is normally used to perform "building" operations. ```bash -oc serviceaccounts new-token camel-k-builder -n camel-k +oc serviceaccounts new-token camel-k-builder -n camel eyJhb[...]Uhz0 ``` @@ -17,7 +17,7 @@ WARNING: treat the token with the due level of confidentiality. You will need to use this token to create a secret: ```bash -oc create secret docker-registry ocp-registry --docker-server image-registry.openshift-image-registry.svc:5000 --docker-username camel-k-builder --docker-password eyJhb[...]Uhz0 -n camel-k +oc create secret docker-registry ocp-registry --docker-server image-registry.openshift-image-registry.svc:5000 --docker-username camel-k-builder --docker-password eyJhb[...]Uhz0 -n camel ``` NOTE: `image-registry.openshift-image-registry.svc:5000` is the default internal route exposed by Openshift. You may need to use an alternative route according to the configuration of your cluster. @@ -27,8 +27,8 @@ NOTE: `image-registry.openshift-image-registry.svc:5000` is the default internal Before being able to pull and push containers images to the registry, you need to provide the proper privileges to access: ```bash -oc policy add-role-to-user registry-viewer -z camel-k-builder -n camel-k -oc policy add-role-to-user registry-editor -z camel-k-builder -n camel-k +oc policy add-role-to-user registry-viewer -z camel-k-builder -n camel +oc policy add-role-to-user registry-editor -z camel-k-builder -n camel ``` NOTE: `-z` identifies a Service Account. diff --git a/docs/modules/ROOT/pages/installation/uninstalling.adoc b/docs/modules/ROOT/pages/installation/uninstalling.adoc index 7e5db4558a..e1cb59e0d9 100644 --- a/docs/modules/ROOT/pages/installation/uninstalling.adoc +++ b/docs/modules/ROOT/pages/installation/uninstalling.adoc @@ -37,11 +37,11 @@ Another alternative is to delete the resources the operator is using in a contro == Uninstall operator only (keeps CRDs and any running Integration) -In order to remove the operator and any configuration resource it uses you'll need to perform the following cleaning operation. Here we're assuming you have installed an operator in the namespace camel-k: +In order to remove the operator and any configuration resource it uses you'll need to perform the following cleaning operation. Here we're assuming you have installed an operator in the namespace camel: ``` -$ kubectl delete deploy -l app=camel-k -n camel-k -$ kubectl delete configmap,secret,sa,rolebindings,clusterrolebindings,roles,clusterroles,integrationplatform -l app=camel-k -n camel-k +$ kubectl delete deploy -l app=camel-k -n camel +$ kubectl delete configmap,secret,sa,rolebindings,clusterrolebindings,roles,clusterroles,integrationplatform -l app=camel-k -n camel ``` Notice that you need to perform two operation to let the Kubernetes finalizers running in the Deployment object to complete before removing any required additional resource (ie, the ServiceAccount holding such privileges). diff --git a/docs/modules/ROOT/pages/kamelets/distribution.adoc b/docs/modules/ROOT/pages/kamelets/distribution.adoc index 9514f79c8a..4910adf623 100644 --- a/docs/modules/ROOT/pages/kamelets/distribution.adoc +++ b/docs/modules/ROOT/pages/kamelets/distribution.adoc @@ -10,11 +10,11 @@ There is not a prescribed way how to release the Kamelets on the cluster. It can When you install Camel K, you may want a series of Kamelets which are coming from the xref:camel-kamelets::index.adoc[Apache Kamelet Catalog]. This is a facility that will let you immediately use a wide set of connector-style resources to interact with any event source and sink. -You can install any catalog version available by downloading locally the catalog and installing to the cluster. For example, this script download a given version of the catalog and install into the `camel-k` namespace: +You can install any catalog version available by downloading locally the catalog and installing to the cluster. For example, this script download a given version of the catalog and install into the `camel` namespace: ``` mvn -q dependency:copy -Dartifact=org.apache.camel.kamelets:camel-kamelets:4.18.0:jar -Dmdep.useBaseVersion=true -DoutputDirectory=/tmp -unzip /tmp/camel-kamelets-4.18.1.jar -d /tmp && kubectl apply -f /tmp/kamelets -n camel-k +unzip /tmp/camel-kamelets-4.18.1.jar -d /tmp && kubectl apply -f /tmp/kamelets -n camel ``` NOTE: you can install any other custom catalog in a similar manner. diff --git a/e2e/support/test_support.go b/e2e/support/test_support.go index b0adbccc3e..1609b29d49 100644 --- a/e2e/support/test_support.go +++ b/e2e/support/test_support.go @@ -1956,9 +1956,9 @@ func WithNamedTestNamespace(t *testing.T, doRun func(context.Context, *gomega.Wi } func WithExistingNamedTestNamespace(t *testing.T, doRun func(context.Context, *gomega.WithT, string), namespace string) { - // Required to copy the registry secret previously set on the camel-k namespace + // Required to copy the registry secret previously set on the camel namespace if os.Getenv("E2E_TEST_REGISTRY_SECRET_COPY") == "true" { - copySecret(t, testContext, TestClient(t), registrySecret, "camel-k", namespace) + copySecret(t, testContext, TestClient(t), registrySecret, "camel", namespace) } invokeUserTestCode(t, testContext, namespace, doRun) @@ -1968,7 +1968,7 @@ func invokeUserTestCode(t *testing.T, ctx context.Context, ns string, doRun func defer func() { DumpNamespace(t, ctx, ns) // Also dump the operator namespace in case it's common - DumpNamespace(t, ctx, "camel-k") + DumpNamespace(t, ctx, "camel") }() g := gomega.NewWithT(t) @@ -2110,9 +2110,9 @@ func NewNamedTestNamespace(t *testing.T, ctx context.Context, name string) ctrl. namespaceOrProject = namespace } - // Required to copy the registry secret previously set on the camel-k namespace + // Required to copy the registry secret previously set on the camel namespace if os.Getenv("E2E_TEST_REGISTRY_SECRET_COPY") == "true" { - copySecret(t, ctx, c, registrySecret, "camel-k", name) + copySecret(t, ctx, c, registrySecret, "camel", name) } return namespaceOrProject diff --git a/e2e/upgrade/upgrade_test.go b/e2e/upgrade/upgrade_test.go index 0a4fd43ba7..b75b1bfee0 100644 --- a/e2e/upgrade/upgrade_test.go +++ b/e2e/upgrade/upgrade_test.go @@ -24,8 +24,10 @@ package upgrade import ( "context" + "fmt" "os" "os/exec" + "path/filepath" "testing" "time" @@ -48,12 +50,23 @@ func TestUpgrade(t *testing.T) { g.Expect(ok).To(BeTrue(), "Missing last released version: you need to set it into LAST_RELEASED_VERSION env var") // Install previous version: mind that the registry configuration has to be stored by the action - // and expected in camel-k namespace + // and expected in operatorNs namespace. Since previous versions used the camel-k namespace in their + // kustomization overlay, we wrap the remote overlay with a local kustomization to target operatorNs. + kustDir := t.TempDir() + kustFile := filepath.Join(kustDir, "kustomization.yaml") + kustContent := fmt.Sprintf(`apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- github.com/apache/camel-k/install/overlays/all-namespaces?ref=v%s +namespace: %s +`, lastVersion, operatorNs) + g.Expect(os.WriteFile(kustFile, []byte(kustContent), 0o600)).To(Succeed()) + applyCmd := exec.Command( "kubectl", "apply", "-k", - "github.com/apache/camel-k/install/overlays/all-namespaces?ref=v"+lastVersion, + kustDir, "--server-side", "--force-conflicts", ) @@ -77,7 +90,7 @@ func TestUpgrade(t *testing.T) { // Get the info of the runtime, as we need for further check later lastRuntimeVersion := Integration(t, ctx, nsIntegration, name)().Status.RuntimeVersion - // Let's upgrade the operator with the newer installation (default in camel-k namespace) + // Let's upgrade the operator with the newer installation (default in camel namespace) installNextCmd := exec.Command( "kubectl", "apply", @@ -94,7 +107,7 @@ func TestUpgrade(t *testing.T) { disableDevRegistryCmd := exec.Command( "kubectl", "-n", - "camel-k", + operatorNs, "set", "env", "deployment/camel-k-operator", @@ -146,5 +159,5 @@ func TestUpgrade(t *testing.T) { g.Eventually(IntegrationPodPhase(t, ctx, nsIntegration, name)). Should(Equal(corev1.PodRunning)) }) - }, "camel-k") + }, "camel") } diff --git a/install/overlays/all-namespaces/kustomization.yaml b/install/overlays/all-namespaces/kustomization.yaml index 223739fef5..d6c58c8e19 100644 --- a/install/overlays/all-namespaces/kustomization.yaml +++ b/install/overlays/all-namespaces/kustomization.yaml @@ -21,7 +21,7 @@ resources: - ../../base - ../../base/config/rbac/descoped -namespace: camel-k +namespace: camel patches: - path: patch-watch-namespace-global.yaml diff --git a/script/Makefile b/script/Makefile index 199829e6b7..60858cda12 100644 --- a/script/Makefile +++ b/script/Makefile @@ -785,7 +785,7 @@ goimport: ##### KUSTOMIZE_DIR = "install/overlays/all-namespaces" -DEFAULT_NS = "camel-k" +DEFAULT_NS = "camel" .PHONY: install install-k8s-global install-k8s-ns install-openshift-global install-openshift-ns @@ -829,7 +829,7 @@ endif cd $(KUST_TMP)/install/overlays/platform && kustomize edit set namespace $(NAMESPACE) kubectl apply -k $(KUST_TMP)/$(KUSTOMIZE_DIR) --server-side --force-conflicts -install-k8s-global: DEFAULT_NS="camel-k" +install-k8s-global: DEFAULT_NS="camel" install-k8s-global: KUSTOMIZE_DIR="install/overlays/all-namespaces" install-k8s-global: clone-kustomize-dir set-operator-id set-operator-env install-operator