diff --git a/config/manifests/bases/camel-k.clusterserviceversion.yaml b/config/manifests/bases/camel-k.clusterserviceversion.yaml index db02c16a40..d30c619c87 100644 --- a/config/manifests/bases/camel-k.clusterserviceversion.yaml +++ b/config/manifests/bases/camel-k.clusterserviceversion.yaml @@ -87,10 +87,12 @@ spec: Apache Camel K ============== - Apache Camel K is a lightweight integration platform, born on Kubernetes, with serverless superpowers. + Apache Camel K is a lightweight integration platform, born on Kubernetes, with serverless superpowers: + the easiest way to build and manage your Camel applications on Kubernetes. ## Installation + You may need to specify the container registry where to store the container images created for the Camel applications. To start using Camel K, install the operator and then create the following `IntegrationPlatform`: ``` apiVersion: camel.apache.org/v1 @@ -99,34 +101,39 @@ spec: name: camel-k labels: app: "camel-k" + spec: + build: + registry: + address: docker.io/my-org ``` - An `IntegrationPlatform` resource is automatically created by default on OpenShift, so you can skip this step. - Also, You can edit the `IntegrationPlatform`, to configure Camel K. - The configuration from the `IntegrationPlatform` will apply to the Camel integrations created in the same namespace/project. + An `IntegrationPlatform` resource is automatically created by default on OpenShift, so you can skip this step when using Openshift cluster. ## Running an Integration - After the initial setup, you can run a Camel integration on the cluster by creating an example `Integration`, e.g.: + Run a Camel application on the cluster by creating a sample `Integration`, e.g.: ``` apiVersion: camel.apache.org/v1 kind: Integration metadata: - name: example + annotations: + camel.apache.org/operator.id: camel-k + name: test spec: - sources: - - name: Example.java - content: | - import org.apache.camel.builder.RouteBuilder; - - public class Example extends RouteBuilder { - @Override - public void configure() throws Exception { - from("timer:tick") - .setBody(constant("Hello World!")) - .to("log:info?skipBodyLineSeparator=false"); - } - } + flows: + - from: + parameters: + period: "1000" + steps: + - setBody: + simple: Hello Camel from ${routeId} + - log: ${body} + uri: timer:yaml + ``` + Log the result of the running application: + ``` + kubectl wait --for=condition=ready integration test --timeout=180s + kubectl logs deployment/test -f ``` displayName: Camel K Operator icon: diff --git a/config/rbac/knative/kustomization.yaml b/config/rbac/knative/kustomization.yaml new file mode 100644 index 0000000000..d637001995 --- /dev/null +++ b/config/rbac/knative/kustomization.yaml @@ -0,0 +1,36 @@ +# --------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# --------------------------------------------------------------------------- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: my-ns +resources: +# Required in order to perform namespace replacement below +- operator-service-account.yaml +- operator-role-knative.yaml +- operator-role-binding-knative.yaml +- operator-cluster-role-binding-custom-resource-definitions.yaml +replacements: +- source: + fieldPath: metadata.namespace + kind: ServiceAccount + name: camel-k-operator + targets: + - fieldPaths: + - subjects.[name=camel-k-operator].namespace + select: + kind: ClusterRoleBinding + name: camel-k-operator-custom-resource-definitions diff --git a/config/rbac/knative/operator-cluster-role-binding-custom-resource-definitions.yaml b/config/rbac/knative/operator-cluster-role-binding-custom-resource-definitions.yaml new file mode 100644 index 0000000000..14d3fa1a88 --- /dev/null +++ b/config/rbac/knative/operator-cluster-role-binding-custom-resource-definitions.yaml @@ -0,0 +1,31 @@ +# --------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# --------------------------------------------------------------------------- + +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: camel-k-operator-custom-resource-definitions + labels: + app: "camel-k" +subjects: +- kind: ServiceAccount + name: camel-k-operator + namespace: placeholder +roleRef: + kind: ClusterRole + name: camel-k-operator-custom-resource-definitions + apiGroup: rbac.authorization.k8s.io diff --git a/config/rbac/operator-role-binding-knative.yaml b/config/rbac/knative/operator-role-binding-knative.yaml similarity index 100% rename from config/rbac/operator-role-binding-knative.yaml rename to config/rbac/knative/operator-role-binding-knative.yaml diff --git a/config/rbac/operator-role-knative.yaml b/config/rbac/knative/operator-role-knative.yaml similarity index 100% rename from config/rbac/operator-role-knative.yaml rename to config/rbac/knative/operator-role-knative.yaml diff --git a/config/rbac/knative/operator-service-account.yaml b/config/rbac/knative/operator-service-account.yaml new file mode 100644 index 0000000000..fabf3d38f9 --- /dev/null +++ b/config/rbac/knative/operator-service-account.yaml @@ -0,0 +1,23 @@ +# --------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# --------------------------------------------------------------------------- + +apiVersion: v1 +kind: ServiceAccount +metadata: + name: camel-k-operator + labels: + app: "camel-k" diff --git a/config/rbac/kustomization.yaml b/config/rbac/kustomization.yaml index f2600f1626..c7556889ef 100644 --- a/config/rbac/kustomization.yaml +++ b/config/rbac/kustomization.yaml @@ -24,7 +24,6 @@ kind: Kustomization resources: - user-cluster-role.yaml - operator-role-events.yaml -- operator-role-knative.yaml - operator-role.yaml - operator-role-keda.yaml - operator-role-leases.yaml @@ -32,7 +31,6 @@ resources: - operator-role-strimzi.yaml - operator-role-binding-events.yaml - operator-role-binding-keda.yaml -- operator-role-binding-knative.yaml - operator-role-binding-leases.yaml - operator-role-binding-local-registry.yaml - operator-role-binding-podmonitors.yaml diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index f13dbd7efa..017b36dfc2 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -1,6 +1,7 @@ * xref:installation/installation.adoc[Installation] -** xref:installation/advanced/maven.adoc[Configuring Maven] -** xref:installation/registry/registry.adoc[Configuring Registry] +** xref:installation/advanced/maven.adoc[Configure Maven] +** xref:installation/registry/registry.adoc[Configure Registry] +** xref:installation/knative.adoc[Configure Knative] ** xref:contributing/upgrade.adoc[Upgrade] ** xref:contributing/uninstalling.adoc[Uninstalling] ** xref:installation/advanced/advanced.adoc[Advanced] diff --git a/docs/modules/ROOT/pages/installation/knative.adoc b/docs/modules/ROOT/pages/installation/knative.adoc new file mode 100644 index 0000000000..e965a7785e --- /dev/null +++ b/docs/modules/ROOT/pages/installation/knative.adoc @@ -0,0 +1,33 @@ += Knative installation + +"https://knative.dev[Knative] is an Open-Source Enterprise-level solution to build Serverless and Event Driven Applications. The effort done in this project is a great complement to Camel K, which can leverage natively some feature offered by Knative. In particular, Camel K will be able to leverage "scale to 0" (hence, serverless) feature offered by Knative. + +NOTE: Knative is an optional configuration. It is not required to run Camel K. + +[[install-knative]] +== Knative roles configuration + +Camel K needs to have certain privileges to use the resources used by Knative. We have identified them, so, it follows a few configuration that you will need to apply in order to make Camel K work with Knative. + +NOTE: We assume you have already both the Knative operator and the Camel K operator up and running. If not, the first step is to install both operator. See the guide on xref:installation/installation.adoc[how to install Camel K] and the guide on https://knative.dev/docs/install/[how to install Knative] respectively. + +Once all the resources are installed in the cluster, you'll need to perform the following action: + +```bash +kubectl apply -k https://github.com/apache/camel-k/tree/main/config/rbac/knative?ref=v2.1.0 +``` + +The configuration above is using the released version `2.1.0`. You may want to use instead another version or the latest development available on `main` branch. Something else you need to know is that, by default, that configuration above will use `default` namespace. In order to change it, you must perform some customization locally in a similar fashion: + +```bash +git clone https://github.com/apache/camel-k.git +cd camel-k/config/rbac/knative +kustomize edit set namespace +kubectl apply -k . +``` + +NOTE: you will need `kustomize` CLI available. + +As the installation procedure can vary depending on the cluster and the methodology you use (Helm, OLM, Kustomize, ...), feel free to customize in the way that it results more convenient. In the `/config/rbac/knative` you will already find the basic `kustomization.yaml` on top of which you may provide any further level of customization. + +From now on you should be able to run some Camel application leveraging Knative with Camel K (see https://github.com/apache/camel-k-examples/tree/main/generic-examples/knative[examples]). \ No newline at end of file diff --git a/e2e/install/kustomize/setup_test.go b/e2e/install/kustomize/setup_test.go index 2c9fdb0d2f..759b0d7e9f 100644 --- a/e2e/install/kustomize/setup_test.go +++ b/e2e/install/kustomize/setup_test.go @@ -40,10 +40,10 @@ const ( ExpectedCRDs = 8 // camel-k-operator, camel-k-operator-events, - // camel-k-operator-knative, camel-k-operator-leases, + // camel-k-operator-leases, // camel-k-operator-podmonitors, camel-k-operator-strimzi, // camel-k-operator-keda - ExpectedKubePromoteRoles = 7 + ExpectedKubePromoteRoles = 6 // camel-k-edit // camel-k-operator-custom-resource-definitions diff --git a/e2e/knative/knative_test.go b/e2e/knative/knative_test.go index 241940efd1..0dfe1c12a1 100644 --- a/e2e/knative/knative_test.go +++ b/e2e/knative/knative_test.go @@ -24,6 +24,8 @@ package knative import ( "fmt" + "os/exec" + "path" "testing" "time" @@ -46,13 +48,13 @@ func TestKnative(t *testing.T) { t.Run("Service combo", func(t *testing.T) { Expect(KamelRunWithID(operatorID, ns, "files/knative2.groovy").Execute()).To(Succeed()) Eventually(IntegrationPodPhase(ns, "knative2"), TestTimeoutLong).Should(Equal(v1.PodRunning)) - Eventually(IntegrationConditionStatus(ns, "knative2", camelv1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(v1.ConditionTrue)) + Eventually(IntegrationConditionStatus(ns, "knative2", camelv1.IntegrationConditionReady), TestTimeoutMedium).Should(Equal(v1.ConditionTrue)) Expect(KamelRunWithID(operatorID, ns, "files/knative3.groovy").Execute()).To(Succeed()) Eventually(IntegrationPodPhase(ns, "knative3"), TestTimeoutLong).Should(Equal(v1.PodRunning)) - Eventually(IntegrationConditionStatus(ns, "knative3", camelv1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(v1.ConditionTrue)) + Eventually(IntegrationConditionStatus(ns, "knative3", camelv1.IntegrationConditionReady), TestTimeoutMedium).Should(Equal(v1.ConditionTrue)) Expect(KamelRunWithID(operatorID, ns, "files/knative1.groovy").Execute()).To(Succeed()) Eventually(IntegrationPodPhase(ns, "knative1"), TestTimeoutLong).Should(Equal(v1.PodRunning)) - Eventually(IntegrationConditionStatus(ns, "knative1", camelv1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(v1.ConditionTrue)) + Eventually(IntegrationConditionStatus(ns, "knative1", camelv1.IntegrationConditionReady), TestTimeoutMedium).Should(Equal(v1.ConditionTrue)) // Correct logs Eventually(IntegrationLogs(ns, "knative1"), TestTimeoutMedium).Should(ContainSubstring("Received from 2: Hello from knative2")) Eventually(IntegrationLogs(ns, "knative1"), TestTimeoutMedium).Should(ContainSubstring("Received from 3: Hello from knative3")) @@ -123,6 +125,7 @@ func TestKnative(t *testing.T) { Eventually(KnativeService(ns, "http-out"), TestTimeoutShort).ShouldNot(BeNil()) Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed()) }) + } func TestRunBroker(t *testing.T) { @@ -131,6 +134,16 @@ func TestRunBroker(t *testing.T) { WithNewTestNamespaceWithKnativeBroker(t, func(ns string) { operatorID := fmt.Sprintf("camel-k-%s", ns) Expect(KamelInstallWithID(operatorID, ns, "--trait-profile", "knative").Execute()).To(Succeed()) + + // We must include namespace privileges to manage Knative objects + testDir := "../../" + kustomizeCmd := exec.Command("kustomize", "edit", "set", "namespace", ns) + kustomizeCmd.Dir = path.Join(testDir, "config/rbac/knative") + kubectlApplyCmd := exec.Command("kubectl", "apply", "-k", ".") + kubectlApplyCmd.Dir = path.Join(testDir, "config/rbac/knative") + ExpectExecSucceed(t, kustomizeCmd) + ExpectExecSucceed(t, kubectlApplyCmd) + Expect(KamelRunWithID(operatorID, ns, "files/knativeevt1.groovy").Execute()).To(Succeed()) Expect(KamelRunWithID(operatorID, ns, "files/knativeevt2.groovy").Execute()).To(Succeed()) Eventually(IntegrationPodPhase(ns, "knativeevt1"), TestTimeoutLong).Should(Equal(v1.PodRunning)) diff --git a/e2e/knative/pod_test.go b/e2e/knative/pod_test.go index 64b39fda11..bb7d4e083a 100644 --- a/e2e/knative/pod_test.go +++ b/e2e/knative/pod_test.go @@ -39,10 +39,10 @@ func TestPodTraitWithKnative(t *testing.T) { Expect(KamelRunWithID(operatorID, ns, "files/podtest-knative2.groovy", "--pod-template", "files/template-knative.yaml").Execute()).To(Succeed()) Eventually(IntegrationPodPhase(ns, "podtest-knative2"), TestTimeoutLong).Should(Equal(corev1.PodRunning)) - Eventually(IntegrationConditionStatus(ns, "podtest-knative2", v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue)) + Eventually(IntegrationConditionStatus(ns, "podtest-knative2", v1.IntegrationConditionReady), TestTimeoutMedium).Should(Equal(corev1.ConditionTrue)) Expect(KamelRunWithID(operatorID, ns, "files/podtest-knative1.groovy").Execute()).To(Succeed()) Eventually(IntegrationPodPhase(ns, "podtest-knative1"), TestTimeoutLong).Should(Equal(corev1.PodRunning)) - Eventually(IntegrationConditionStatus(ns, "podtest-knative1", v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue)) + Eventually(IntegrationConditionStatus(ns, "podtest-knative1", v1.IntegrationConditionReady), TestTimeoutMedium).Should(Equal(corev1.ConditionTrue)) Eventually(IntegrationLogs(ns, "podtest-knative1"), TestTimeoutShort).Should(ContainSubstring("hello from the template")) Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed()) diff --git a/e2e/knative/support/startup_test.go b/e2e/knative/support/startup_test.go index da04425dbe..80ec583f09 100644 --- a/e2e/knative/support/startup_test.go +++ b/e2e/knative/support/startup_test.go @@ -23,6 +23,8 @@ limitations under the License. package support import ( + "os/exec" + "path" "testing" . "github.com/onsi/gomega" @@ -48,4 +50,13 @@ func TestKNativeCamelKInstallStartup(t *testing.T) { Eventually(Platform(ns.GetName())).ShouldNot(BeNil()) Eventually(PlatformConditionStatus(ns.GetName(), v1.IntegrationPlatformConditionTypeCreated), TestTimeoutShort). Should(Equal(corev1.ConditionTrue)) + + testDir := "../../../" + // Configure Knative RBAC + kustomizeCmd := exec.Command("kustomize", "edit", "set", "namespace", ns.GetName()) + kustomizeCmd.Dir = path.Join(testDir, "config/rbac/knative") + kubectlApplyCmd := exec.Command("kubectl", "apply", "-k", ".") + kubectlApplyCmd.Dir = path.Join(testDir, "config/rbac/knative") + ExpectExecSucceed(t, kustomizeCmd) + ExpectExecSucceed(t, kubectlApplyCmd) } diff --git a/e2e/yaks/common/kamelet/yaks-config.yaml b/e2e/yaks/common/kamelet/yaks-config.yaml index 9090b18af9..7d52fd8876 100644 --- a/e2e/yaks/common/kamelet/yaks-config.yaml +++ b/e2e/yaks/common/kamelet/yaks-config.yaml @@ -19,6 +19,11 @@ config: namespace: temporary: true pre: +- name: knative configuration + run: | + cd ../../../../config/rbac/knative + kustomize edit set namespace $YAKS_NAMESPACE + kubectl apply -k . - name: installation run: | kubectl apply -f timer-source.kamelet.yaml -n $YAKS_NAMESPACE diff --git a/e2e/yaks/common/knative-broker/yaks-config.yaml b/e2e/yaks/common/knative-broker/yaks-config.yaml index cd754db649..b12b35b17e 100644 --- a/e2e/yaks/common/knative-broker/yaks-config.yaml +++ b/e2e/yaks/common/knative-broker/yaks-config.yaml @@ -18,6 +18,12 @@ config: namespace: temporary: true +pre: +- name: knative configuration + run: | + cd ../../../../config/rbac/knative + kustomize edit set namespace $YAKS_NAMESPACE + kubectl apply -k . post: - name: print dump if: env:CI=true && failure() diff --git a/e2e/yaks/common/knative-sinkbinding-http/yaks-config.yaml b/e2e/yaks/common/knative-sinkbinding-http/yaks-config.yaml index e50bd2be4b..9a93e3f46e 100644 --- a/e2e/yaks/common/knative-sinkbinding-http/yaks-config.yaml +++ b/e2e/yaks/common/knative-sinkbinding-http/yaks-config.yaml @@ -19,6 +19,11 @@ config: namespace: temporary: true pre: +- name: knative configuration + run: | + cd ../../../../config/rbac/knative + kustomize edit set namespace $YAKS_NAMESPACE + kubectl apply -k . - name: installation run: | kubectl -n knative-eventing set env deployments eventing-webhook --containers="eventing-webhook" SINK_BINDING_SELECTION_MODE=inclusion diff --git a/e2e/yaks/common/knative-sinkbinding/yaks-config.yaml b/e2e/yaks/common/knative-sinkbinding/yaks-config.yaml index a6cc095467..1540a16415 100644 --- a/e2e/yaks/common/knative-sinkbinding/yaks-config.yaml +++ b/e2e/yaks/common/knative-sinkbinding/yaks-config.yaml @@ -19,6 +19,11 @@ config: namespace: temporary: true pre: +- name: knative configuration + run: | + cd ../../../../config/rbac/knative + kustomize edit set namespace $YAKS_NAMESPACE + kubectl apply -k . - name: installation run: | kubectl apply -n $YAKS_NAMESPACE -f messages-channel.yaml diff --git a/helm/camel-k/README.md b/helm/camel-k/README.md index 64807c12f0..49b6bf1985 100644 --- a/helm/camel-k/README.md +++ b/helm/camel-k/README.md @@ -1,15 +1,13 @@ # Camel K -Apache Camel K is a lightweight integration platform, born on Kubernetes, -with serverless superpowers. +Apache Camel K is a lightweight integration platform, born on Kubernetes, with serverless superpowers: the easiest way to build and manage your Camel applications on Kubernetes. -This chart deploys the Camel K operator and all resources needed to natively run -Apache Camel integrations on any Kubernetes cluster. +This chart deploys the Camel K operator and all resources needed to natively run Apache Camel integrations on any Kubernetes cluster. ## Prerequisites - Kubernetes 1.11+ -- Container Image Registry installed and configured for pull +- Container Image Registry installed and configured for pull (optional in Openshift or Minikube) ## Installing the Chart @@ -19,22 +17,33 @@ To install the chart, first add the Camel K repository: $ helm repo add camel-k https://apache.github.io/camel-k/charts ``` -If you are installing on OpenShift, Camel K can use the OpenShift internal registry to -store and pull images. +Depending on the cloud platform of choice, you will need to specify a container registry at installation time. -Installation on OpenShift can be done with command: +### Plain Kubernetes + +A regular installation requires you to provide a registry, used by Camel K to build application containers. See official [Camel K registry documentation](https://camel.apache.org/camel-k/next/installation/registry/registry.html). + +```bash +$ helm install camel-k \ + --set platform.build.registry.address= \ + camel-k/camel-k +``` + +You may install Camel K and specify a container registry later. + +### Openshift + +If you are installing on OpenShift, Camel K can use the OpenShift internal registry to store and pull images: ```bash -$ helm install \ - --generate-name \ +$ helm install camel-k \ --set platform.cluster=OpenShift \ camel-k/camel-k ``` -When running on a cluster with no embedded internal registry, you need to specify the address -and properties of an image registry that the cluster can use to store image. +### Minikube -For example, on Minikube you can enable the internal registry and get its address: +Minikube offers a container registry addon, which it makes very well suited for local Camel K development and testing purposes. You can export the cluster IP registry addon using the following script: ```bash $ minikube addons enable registry @@ -44,15 +53,21 @@ $ export REGISTRY_ADDRESS=$(kubectl -n kube-system get service registry -o jsonp Then you can install Camel K with: ```bash -$ helm install \ - --generate-name \ +$ helm install camel-k \ --set platform.build.registry.address=${REGISTRY_ADDRESS} \ --set platform.build.registry.insecure=true \ camel-k/camel-k ``` -The [configuration](#configuration) section lists -additional parameters that can be set during installation. +### Knative configuration + +Camel K offers the possibility to run serverless Integrations in conjunction with [Knative operator](https://knative.dev). Once Knative and Camel K are installed on the same platform, you can configure Knative resources to be played by Camel K. + +See instructions [how to enable Knative on Camel K](https://camel.apache.org/camel-k/next/installation/knative.html). + +### Additional installation time configuration + +The [configuration](#configuration) section lists additional parameters that can be set during installation. > **Tip**: List all releases using `helm list` @@ -68,8 +83,7 @@ The command removes all the Kubernetes resources installed. ## Configuration -The following table lists the most commonly configured parameters of the -Camel K chart and their default values. The chart allows configuration of an `IntegrationPlatform` resource, which among others includes build properties and traits configuration. A full list of parameters can be found [in the operator specification][1]. +The following table lists the most commonly configured parameters of the Camel K chart and their default values. The chart allows configuration of an `IntegrationPlatform` resource, which among others includes build properties and traits configuration. A full list of parameters can be found [in the operator specification][1]. | Parameter | Description | Default | |----------------------------------------|---------------------------------------------------------------------------|--------------------------------| @@ -88,9 +102,8 @@ Camel K chart and their default values. The chart allows configuration of an `In We'd like to hear your feedback and we love any kind of contribution! -The main contact points for the Camel K project are the [GitHub repository][2] -and the [Chat room][3]. +The main contact points for the Camel K project are the [GitHub repository][2] and the [Camel K chat room][3]. -[1]: https://camel.apache.org/camel-k/latest/architecture/cr/integration-platform.html +[1]: https://camel.apache.org/camel-k/next/architecture/cr/integration-platform.html [2]: https://github.com/apache/camel-k [3]: https://camel.zulipchat.com diff --git a/pkg/install/operator.go b/pkg/install/operator.go index 9daf61ee0c..4fa87df5f2 100644 --- a/pkg/install/operator.go +++ b/pkg/install/operator.go @@ -41,7 +41,6 @@ import ( "github.com/apache/camel-k/v2/pkg/client" "github.com/apache/camel-k/v2/pkg/resources" "github.com/apache/camel-k/v2/pkg/util/envvar" - "github.com/apache/camel-k/v2/pkg/util/knative" "github.com/apache/camel-k/v2/pkg/util/kubernetes" "github.com/apache/camel-k/v2/pkg/util/minikube" "github.com/apache/camel-k/v2/pkg/util/openshift" @@ -283,24 +282,6 @@ func OperatorOrCollect(ctx context.Context, cmd *cobra.Command, c client.Client, return err } - // Additionally, install Knative resources (roles and bindings) - isKnative, err := knative.IsInstalled(c) - if err != nil { - return err - } - if isKnative { - if err := installKnative(ctx, c, cfg.Namespace, customizer, collection, force); err != nil { - return err - } - if err := installClusterRoleBinding(ctx, c, collection, cfg.Namespace, "camel-k-operator-bind-addressable-resolver", "/rbac/operator-cluster-role-binding-addressable-resolver.yaml"); err != nil { - if k8serrors.IsForbidden(err) { - fmt.Fprintln(cmd.ErrOrStderr(), "Warning: the operator will not be able to bind Knative addressable-resolver ClusterRole. Try installing the operator as cluster-admin.") - } else { - return err - } - } - } - if err = installEvents(ctx, c, cfg.Namespace, customizer, collection, force); err != nil { if k8serrors.IsAlreadyExists(err) { return err @@ -512,13 +493,6 @@ func installKedaBindings(ctx context.Context, c client.Client, namespace string, ) } -func installKnative(ctx context.Context, c client.Client, namespace string, customizer ResourceCustomizer, collection *kubernetes.Collection, force bool) error { - return ResourcesOrCollect(ctx, c, namespace, collection, force, customizer, - "/rbac/operator-role-knative.yaml", - "/rbac/operator-role-binding-knative.yaml", - ) -} - func installEvents(ctx context.Context, c client.Client, namespace string, customizer ResourceCustomizer, collection *kubernetes.Collection, force bool) error { return ResourcesOrCollect(ctx, c, namespace, collection, force, customizer, "/rbac/operator-role-events.yaml",