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 42657f2d9609aaa9a44e8850d67399786f11072f Author: Pasquale Congiusti <[email protected]> AuthorDate: Thu Mar 16 12:32:30 2023 +0100 doc(install): camel k fine tuning --- docs/modules/ROOT/nav.adoc | 12 +-- .../ROOT/pages/configuration/dependencies.adoc | 4 +- .../ROOT/pages/installation/advanced/advanced.adoc | 88 ++++++++++++++++ .../advanced}/http-proxy.adoc | 0 .../advanced}/maven.adoc | 4 +- .../advanced}/multi-architecture.adoc | 0 .../ROOT/pages/installation/installation.adoc | 114 ++++++++++++++------- .../knative.adoc => running/knative-sink.adoc} | 0 install/operator/kustomization.yaml | 1 - 9 files changed, 175 insertions(+), 48 deletions(-) diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index 80376d3fc..85df328d1 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -15,11 +15,13 @@ *** xref:installation/registry/gcr.adoc[Gcr.io] *** xref:installation/registry/icr.adoc[IBM Container Registry] *** xref:installation/registry/k3s.adoc[K3s] -** Advanced -*** xref:installation/advanced/knative.adoc[Knative Sinks] +** xref:installation/advanced/advanced.adoc[Advanced] +*** xref:installation/advanced/kustomize.adoc[Install Using Kustomize] *** xref:installation/advanced/resources.adoc[Resource management] *** xref:installation/advanced/multi.adoc[Multiple Operators] -*** xref:installation/advanced/kustomize.adoc[Install Using Kustomize] +*** xref:installation/advanced/http-proxy.adoc[HTTP Proxy] +*** xref:installation/advanced/maven.adoc[Maven] +*** xref:installation/advanced/multi-architecture.adoc[Multi Architecture] * Command Line Interface ** xref:cli/cli.adoc[Kamel CLI] ** xref:cli/file-based-config.adoc[File-based Config] @@ -29,6 +31,7 @@ ** xref:running/run-from-github.adoc[Run from GitHub] ** xref:running/local.adoc[Run Locally] ** xref:running/promoting.adoc[Promote an Integration] +** xref:running/knative-sink.adoc[Knative Sinks] ** xref:tutorials/tutorials.adoc[Examples] * xref:configuration/configuration.adoc[Configuration] ** xref:configuration/build-time-properties.adoc[Build time properties] @@ -37,9 +40,6 @@ ** xref:configuration/runtime-properties.adoc[Properties] ** xref:configuration/runtime-config.adoc[Runtime configuration] ** xref:configuration/runtime-resources.adoc[Runtime resources] -** xref:configuration/http-proxy.adoc[HTTP Proxy] -** xref:configuration/maven.adoc[Maven] -** xref:configuration/multi-architecture.adoc[Multi Architecture] * Observability ** xref:observability/logging.adoc[Logging] *** xref:observability/logging/operator.adoc[Operator] diff --git a/docs/modules/ROOT/pages/configuration/dependencies.adoc b/docs/modules/ROOT/pages/configuration/dependencies.adoc index 40062af3b..396220347 100644 --- a/docs/modules/ROOT/pages/configuration/dependencies.adoc +++ b/docs/modules/ROOT/pages/configuration/dependencies.adoc @@ -43,7 +43,7 @@ In this case, the dependency will be added with the correct version. Note that t ``` kamel run -d mvn:com.google.guava:guava:26.0-jre Integration.java ``` -Note that if your dependencies belong to a private repository, this repository needs to be defined. See xref:configuration/maven.adoc[Configure maven]. +Note that if your dependencies belong to a private repository, this repository needs to be defined. See xref:installation/advanced/maven.adoc[Configure maven]. [[local-dependencies]] *Local dependencies* can be added using the `-d` flag and the `file://` prefix: @@ -84,7 +84,7 @@ gitee:user/repo/version azure:user/repo/version ``` -The `version` can be omitted when you are willing to use the `main` branch. Otherwise it will represent the branch or tag used in the project repo. +The `version` can be omitted when you are willing to use the `main` branch. Otherwise it will represent the branch or tag used in the project repo. [[dependencies-dynamic]] == Dynamic URIs diff --git a/docs/modules/ROOT/pages/installation/advanced/advanced.adoc b/docs/modules/ROOT/pages/installation/advanced/advanced.adoc new file mode 100644 index 000000000..2303b193b --- /dev/null +++ b/docs/modules/ROOT/pages/installation/advanced/advanced.adoc @@ -0,0 +1,88 @@ +[[fine-tuning]] += Camel K Operator fine tuning + +Camel K Operators offers several possibility of customization. The default installation could be good in the most of the cases, but, we have a series of configuration that can be applied when you want to fine tune your Camel K operator and get the very best of it. The following settings will work for an installation via `kamel` CLI, but the same configuration could be done with the other xref:installation/installation.adoc[installation procedures] by applying the required changes on the [...] + +[[storage]] +== Storage + +Since version 2.0, Camel K requires some persistent storage. You can change the storage configuration using the following settings: + +``` +--storage If false, it won't use a persistent storage (recommended for development purpose only) (default true) +--storage-access-mode string Persistent Volume Access Mode (any of ReadWriteOnce, ReadOnlyMany, ReadWriteMany or ReadWriteOncePod)(default "ReadWriteOnce") +--storage-capacity string How much capacity to use (default "20Gi") +--storage-class-name string Use a storage class name to create a dynamic volume (if empty will look up for cluster default) +``` + +[[resources]] +== Resource management + +We provide certain configuration to better "operationalize" the Camel K Operator: + +``` +--node-selector stringArray Add a NodeSelector to the operator Pod +--operator-resources stringArray Define the resources requests and limits assigned to the operator Pod as <requestType.requestResource=value> (i.e., limits.memory=256Mi) +--toleration stringArray Add a Toleration to the operator Pod +``` + +More detailed information on the xref:installation/advanced/resources.adoc[resource management] page. + +[[build-configuration]] +== Build configuration + +We have several configuration used to influence the building of an integration: + +``` +--base-image string Set the base Image used to run integrations +--build-publish-strategy string Set the build publish strategy +--build-publish-strategy-option stringArray Add a build publish strategy option, as <name=value> +--build-strategy string Set the build strategy +--build-timeout string Set how long the build process can last +``` +A very important set of configuration you can provide is related to Maven: +``` +--maven-ca-secret string Configure the secret key containing the Maven CA certificates (secret/key) +--maven-cli-option stringArray Add a default Maven CLI option to the list of arguments for Maven commands +--maven-extension stringArray Add a Maven build extension +--maven-local-repository string Path of the local Maven repository +--maven-property stringArray Add a Maven property +--maven-repository stringArray Add a Maven repository +--maven-settings string Configure the source of the Maven settings (configmap|secret:name[/key]) +``` +You can learn more in details in the xref:installation/advanced/maven.adoc[Maven configuration] page. + +Finally, you can change the registry where to host your integration containers: + +``` +--organization string A organization on the Docker registry that can be used to publish images +--registry string A Docker registry that can be used to publish images +--registry-auth-file string A docker registry configuration file containing authorization tokens for pushing and pulling images +--registry-auth-password string The docker registry authentication password +--registry-auth-server string The docker registry authentication server +--registry-auth-username string The docker registry authentication username +--registry-insecure Configure to configure registry access in insecure mode or not +--registry-secret string A secret used to push/pull images to the Docker registry +``` +We have a dedicated section to explain more in details xref:installation/registry/registry.adoc[how to configure a registry]. + +== Monitoring + +Camel K Operator provides certain monitoring capabilities. You can change the default settings: + +``` +--health-port int The port of the health endpoint (default 8081) +--monitoring To enable or disable the operator monitoring +--monitoring-port int The port of the metrics endpoint (default 8080) +--log-level string The level of operator logging (default - info): info or 0, debug or 1 (default "info") +``` +You can learn more about xref:observability/monitoring/operator.adoc[how to monitor Camel K Operator]. + +== Installation topology + +We have also certain configuration that let you control how to deploy your Camel K Operator(s): +``` +--global Configure the operator to watch all namespaces. No integration platform is created. You can run integrations in a namespace by installing an integration platform: 'kamel install --skip-operator-setup -n my-namespace' +--operator-id string Set the operator id that is used to select the resources this operator should manage (default "camel-k") +``` +Learn more about xref:installation/advanced/multi.adoc[Camel K multi-tenancy]. \ No newline at end of file diff --git a/docs/modules/ROOT/pages/configuration/http-proxy.adoc b/docs/modules/ROOT/pages/installation/advanced/http-proxy.adoc similarity index 100% rename from docs/modules/ROOT/pages/configuration/http-proxy.adoc rename to docs/modules/ROOT/pages/installation/advanced/http-proxy.adoc diff --git a/docs/modules/ROOT/pages/configuration/maven.adoc b/docs/modules/ROOT/pages/installation/advanced/maven.adoc similarity index 98% rename from docs/modules/ROOT/pages/configuration/maven.adoc rename to docs/modules/ROOT/pages/installation/advanced/maven.adoc index 1f860fd80..54af3674a 100644 --- a/docs/modules/ROOT/pages/configuration/maven.adoc +++ b/docs/modules/ROOT/pages/installation/advanced/maven.adoc @@ -153,7 +153,7 @@ HTTP proxy can be configured on the Camel K operator Deployment, with the usual The operator automatically configures Maven according to the values of these variables. -See the xref:configuration/http-proxy.adoc[HTTP proxy] documentation for more details. +See the xref:installation/advanced/http-proxy.adoc[HTTP proxy] documentation for more details. The generated configuration can be overwritten in the <<maven-settings>> if necessary. @@ -230,7 +230,7 @@ The IntegrationPlatform resource can be edited directly, to add or remove extens $ kubectl edit ip camel-k ---- -Maven extensions are typically used to enable https://maven.apache.org/wagon/wagon-providers/[Wagon Providers], used for the transport of artifacts between repository. +Maven extensions are typically used to enable https://maven.apache.org/wagon/wagon-providers/[Wagon Providers], used for the transport of artifacts between repository. [[use-case]] == S3 Bucket as a Maven Repository diff --git a/docs/modules/ROOT/pages/configuration/multi-architecture.adoc b/docs/modules/ROOT/pages/installation/advanced/multi-architecture.adoc similarity index 100% rename from docs/modules/ROOT/pages/configuration/multi-architecture.adoc rename to docs/modules/ROOT/pages/installation/advanced/multi-architecture.adoc diff --git a/docs/modules/ROOT/pages/installation/installation.adoc b/docs/modules/ROOT/pages/installation/installation.adoc index 38a4448f7..1c0b95de0 100644 --- a/docs/modules/ROOT/pages/installation/installation.adoc +++ b/docs/modules/ROOT/pages/installation/installation.adoc @@ -1,64 +1,104 @@ [[installation]] = Installation -Camel K allows us to run integrations directly on a Kubernetes or OpenShift cluster. -To use it, you need to be connected to a cloud environment or to a local cluster created for development purposes. +Camel K allows us to run Camel integrations directly on a Kubernetes or OpenShift cluster. To use it, you need to be connected to a cloud environment or to a local cluster created for development purposes (ie, Minikube or Kind). -[[requirements]] -== Requirements - -Camel K installation is usually straightforward, but for certain cluster types you need to apply specific configuration settings -before installing it. Customized instructions are needed for the following cluster types: - -- xref:installation/platform/minikube.adoc[Minikube] -- xref:installation/platform/crc.adoc[Red Hat CodeReady Containers (CRC)] -- xref:installation/platform/gke.adoc[Google Kubernetes Engine (GKE)] -- xref:installation/platform/openshift.adoc[OpenShift] -- xref:installation/platform/iks.adoc[IBM Kubernetes Services (IKS)] -- xref:installation/platform/k3s.adoc[K3s] -- xref:installation/platform/kind.adoc[Kind] - -Other cluster types (such as OpenShift clusters) should *not need* prior configuration. - -NOTE: Minishift is no longer supported since Camel K 1.5.0. You can use xref:installation/platform/crc.adoc[CRC] for a local OpenShift cluster. - -[[procedure]] -== Procedure +[[cli]] +== Installation via Kamel CLI To start using Camel K you need the **"kamel"** CLI tool, that can be used to both configure the cluster and run integrations. Look into the https://github.com/apache/camel-k/releases[release page] for the latest version of the *camel-k-client* tool for your specific platform. -Download and uncompress the archive. It contains a small binary file named `kamel` that you should put into your system path. -For example, if you're using Linux, you can put `kamel` in `/usr/bin`. +Download and uncompress the archive. It contains a small binary file named `kamel` that you should put into your system path. For example, if you're using Linux, you can put `kamel` in `/usr/bin`. Once you have put the `kamel` CLI in the path, log into your cluster using the standard `oc` (OpenShift) or `kubectl` (Kubernetes) client tool and execute the following command to install Camel K: [source] ---- -kamel install +$ kamel install --olm=false ---- -This will configure the cluster with the Camel K custom resource definitions and install the operator on the current namespace. +This will configure the cluster with the Camel K custom resource definitions and install the operator on the current namespace with the default settings. IMPORTANT: Custom Resource Definitions (CRD) are cluster-wide objects and you need admin rights to install them. Fortunately, this operation can be done *once per cluster*. So, if the `kamel install` operation fails, you'll be asked to repeat it when logged as admin. For CRC, this means executing `oc login -u system:admin` then `kamel install --cluster-setup` only for the first-time installation. -You're now ready to xref:running/running.adoc[run some integrations]. +[[kustomize]] +== Installation via Kustomize + +Camel K can be installed using https://kustomize.io[Kustomize], providing an interface for configuring more advanced features. + +``` +# Clone the project repository +$ https://github.com/apache/camel-k.git +$ cd camel-k +# You can use any release branch or skip this step to use it the last code on `main` +$ git checkout release-a.b.x +$ cd install +$ kubectl apply -k setup-cluster +$ kubectl apply -k setup +$ kubectl apply -k operator +$ kubectl apply -k platform +``` + +NOTE: you probably want to edit the configuration. Please, do any change right after cloning the repository. + +More information on the xref:installation/advanced/kustomize.adoc[Kustomize Camel K installation procedure] page. + +[[olm]] +== Installation via Operator Hub + +Camel K is also available in Operator Hub: + +``` +$ kubectl create -f https://operatorhub.io/install/camel-k.yaml +``` + +You will need to OLM framework to be propely installed in your cluster. More instructions on the https://operatorhub.io/operator/camel-k[Camel K Operator Hub] page. + +As an alternative, you can also use the `kamel` CLI to perform the same installation: + +``` +$ kamel install --olm=true +``` + +NOTE: Some Kubernetes clusters such as Openshift (or CRC) may let you to perform the same operation from a GUI as well. Refer to the cluster instruction to learn how to perform such action. + [[helm]] -== Installation via Helm +== Installation via Helm Hub -Camel K is also available in Helm Hub for installation. -Follow the instructions on the https://hub.helm.sh/charts/camel-k/camel-k[Camel K] page for more information. +Camel K is also available in Helm Hub: -[[kustomize]] -== Installation via Kustomize +``` +$ helm repo add camel-k https://apache.github.io/camel-k/charts/ +$ helm install my-camel-k camel-k/camel-k +``` -Camel K can be installed using https://kustomize.io[Kustomize], providing an interface for configuring more advanced features. -Please go to xref:installation/advanced/kustomize.adoc[this page] for more information. +More instructions on the https://hub.helm.sh/charts/camel-k/camel-k[Camel K Helm] page. + +[[test]] +== Test your installation + +Once you've completed any of the above installation procedure, you'll be ready to xref:running/running.adoc[run some integrations]. + +[[special-requirements]] +== Special clusters requirements + +Camel K installation is usually straightforward, but for certain cluster types you need to apply specific configuration settings before installing it. You need customized instructions for the following cluster types: + +- xref:installation/platform/openshift.adoc[OpenShift] +- xref:installation/platform/minikube.adoc[Minikube] +- xref:installation/platform/kind.adoc[Kind] +- xref:installation/platform/crc.adoc[Red Hat CodeReady Containers (CRC)] +- xref:installation/platform/gke.adoc[Google Kubernetes Engine (GKE)] +- xref:installation/platform/iks.adoc[IBM Kubernetes Services (IKS)] +- xref:installation/platform/k3s.adoc[K3s] + +NOTE: Minishift is no longer supported since Camel K 1.5.0. You can use xref:installation/platform/crc.adoc[CRC] for a local OpenShift cluster. -[[advanced]] -== Advanced configuration +[[fine-tuning]] +== Fine Tuning -Camel K installation can be configured with certain special settings available for experienced users. You can manage resources such as limiting memory and CPU, provide a policy for `Pod` scheduling and `Toleration`. You can also configure the application to run multiple operators on the same namespace. Have a look at the "advanced" section under the "installation" menu. +Camel K installation can be configured with certain special settings available for experienced users. You can manage resources such as limiting memory and CPU, provide a policy for `Pod` scheduling and `Toleration`. Please have a look at xref:installation/advanced/advanced.adoc[Camel K fine tuning] to learn more about advanced configuration. diff --git a/docs/modules/ROOT/pages/installation/advanced/knative.adoc b/docs/modules/ROOT/pages/running/knative-sink.adoc similarity index 100% rename from docs/modules/ROOT/pages/installation/advanced/knative.adoc rename to docs/modules/ROOT/pages/running/knative-sink.adoc diff --git a/install/operator/kustomization.yaml b/install/operator/kustomization.yaml index 23a324f29..dc1a8db59 100644 --- a/install/operator/kustomization.yaml +++ b/install/operator/kustomization.yaml @@ -44,7 +44,6 @@ kind: Kustomization resources: - ../config/manager -namespace: camel-k images: - name: docker.io/apache/camel-k newName: docker.io/apache/camel-k
