gansheer commented on code in PR #5610: URL: https://github.com/apache/camel-k/pull/5610#discussion_r1634376403
########## docs/modules/ROOT/pages/installation/uninstalling.adoc: ########## @@ -12,11 +15,66 @@ This will uninstall all Camel K resources along with the operator from the clust NOTE: By _default_ the resources possibly shared between clusters such as https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources[CustomResourceDefinitions (CRD)], https://kubernetes.io/docs/reference/access-authn-authz/rbac[ClusterRole] and https://docs.openshift.com/container-platform/4.1/applications/operators/olm-understanding-olm.html[Operator Lifecycle Manager(OLM)] will be **excluded**. To force the inclusion of all resources you can use the **--all** flag. If the **--olm=false** option was specified during installation, which is the case when installing Camel K from sources on CRC, then it also must be used with the uninstall command. +[[helms]] +== Uninstall via Helm + +The Helm procedure takes care to delete only the operator Deployment: + +``` +$ helm uninstall camel-k +``` + +Check instructions on https://hub.helm.sh/charts/camel-k/camel-k[Camel K Helm] page to remove CRDs and any other installation resource. + +[[operatorhub]] +== Uninstall via Operator Hub + +In order to uninstall via OLM, you'll need to identify and remove the Subscription custom resource related to Camel K. Check instructions on https://olm.operatorframework.io/docs/tasks/uninstall-operator/[uninstall an operator] page from OLM. + +[[kustomize]] +== Uninstall via Kustomize + +Uninstalling via Kustomize may require you to store the configuration you've used at install time and delete the applied resources. However this is something we discourage as it may remove also the application that are running and you may not want to delete (see generic cleaning for an alternative approach). + +WARNING: this operation may remove CRDs and any application that is still running. + +``` +$ kustomize build 'overlays/my-configuration' | kubectl delete -f Review Comment: This command is missing the tailing character `-`: `kubectl delete -f -` ########## docs/modules/ROOT/pages/installation/uninstalling.adoc: ########## @@ -12,11 +15,66 @@ This will uninstall all Camel K resources along with the operator from the clust NOTE: By _default_ the resources possibly shared between clusters such as https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources[CustomResourceDefinitions (CRD)], https://kubernetes.io/docs/reference/access-authn-authz/rbac[ClusterRole] and https://docs.openshift.com/container-platform/4.1/applications/operators/olm-understanding-olm.html[Operator Lifecycle Manager(OLM)] will be **excluded**. To force the inclusion of all resources you can use the **--all** flag. If the **--olm=false** option was specified during installation, which is the case when installing Camel K from sources on CRC, then it also must be used with the uninstall command. +[[helms]] +== Uninstall via Helm + +The Helm procedure takes care to delete only the operator Deployment: + +``` +$ helm uninstall camel-k +``` + +Check instructions on https://hub.helm.sh/charts/camel-k/camel-k[Camel K Helm] page to remove CRDs and any other installation resource. + +[[operatorhub]] +== Uninstall via Operator Hub + +In order to uninstall via OLM, you'll need to identify and remove the Subscription custom resource related to Camel K. Check instructions on https://olm.operatorframework.io/docs/tasks/uninstall-operator/[uninstall an operator] page from OLM. + +[[kustomize]] +== Uninstall via Kustomize + +Uninstalling via Kustomize may require you to store the configuration you've used at install time and delete the applied resources. However this is something we discourage as it may remove also the application that are running and you may not want to delete (see generic cleaning for an alternative approach). + +WARNING: this operation may remove CRDs and any application that is still running. + +``` +$ kustomize build 'overlays/my-configuration' | kubectl delete -f +``` + +[[generic]] +== Uninstall cleaning cluster resources + +Another alternative is to delete the resources the operator is using in a controlled way by cleaning them one by one. + +== 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: + +``` +$ kubectl delete deploy,configmap,secret,sa,rolebindings,clusterrolebindings,roles,clusterroles,integrationplatform -l app=camel-k +``` + +NOTE: CRDs and Integration will be maintained alive and running. + +== Uninstall CRDs (and running Integration) + +In order to remove the CRDs you need to execute: + +``` +$ kubectl delete crd -l app=camel-k +``` + +NOTE: Integration will be garbage collected by the cluster and so any running application. + +[[verify]] +== Verify your cluster + To verify that all resources have been removed you can use the following command: [source] ---- -kubectl get all,pvc,configmap,rolebindings,clusterrolebindings,secrets,sa,roles,clusterroles,crd -l 'app=camel-k' +kubectl get all,configmap,rolebindings,clusterrolebindings,secrets,sa,roles,clusterroles,crd -l 'app=camel-k' Review Comment: This command is missing integrationplatform. ########## docs/modules/ROOT/pages/installation/installation.adoc: ########## @@ -93,20 +50,35 @@ $ kubectl create -f https://operatorhub.io/install/camel-k.yaml You can edit the `Subscription` custom resource, setting the channel you want to use. From Camel K version 2 onward, we're going to provide an installation channel for each major version we're releasing (ie, `stable-v2`). This will simplify the upgrade process if you choose to perform an automatic upgrade. -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. +NOTE: Some Kubernetes clusters such as Openshift 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 from user interface. +[[kustomize]] +== Installation via Kustomize -[[helm]] -== Installation via Helm Hub +https://kustomize.io[Kustomize] provides a declarative approach to the configuration customization of a Camel-K installation. Kustomize works either with a standalone executable or as a built-in to `kubectl`. The https://github.com/apache/camel-k/tree/main/install[/install] directory provides a series of base and overlays configuration that you can use. You can create your own overlays or customize the one available in the repository to accommodate your need. -Camel K is also available in Helm Hub: +``` +# Clone the project repository +$ https://github.com/apache/camel-k.git +$ cd camel-k +# You can use any release tag (recommended as it is immutable) or branch +$ git checkout v2.4.0 +$ cd install/overlays +``` + +In this directory you may find a series of default configuration for Kubernetes, Openshift and any other sensible profile. For Kubernetes, you can see we have prepared a `descoped` configuration and a `namespaced` which are installing the operator globally or in a specific namespace. ``` -$ helm repo add camel-k https://apache.github.io/camel-k/charts/ -$ helm install my-camel-k camel-k/camel-k +# Change the registry address (edit the file for more configuration if required) +$ sed -i 's/namespace: .*/namespace: my-registry-host.io/' kubernetes/descoped/integration-platform.yaml Review Comment: I am really unsure about what this command is supposed to do: change the registry ? apply a namespace in the descoped integration-platform.yaml file ? For the registry that would be more something like : `sed -i 's/address: .*/address: 10.97.159.135/' kubernetes/descoped/integration-platform.yaml` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org