Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to remove Kamelets installation when installing IntegrationPlatform CRD? #2756

Closed
zhiminglim opened this issue Nov 18, 2021 · 2 comments
Closed

Comments

@zhiminglim
Copy link
Contributor

Hello,

I'm working with Camel K with Helm, and instead of doing the traditional kamel run I'm deploying it via a helm chart, hence I have to write the CRDs.

As I have to work with deploying the same integrations in multiple namespaces, I have to set up an IntegrationPlatform per namespace via a YAML file.

---
apiVersion: camel.apache.org/v1
kind: IntegrationPlatform
metadata:
  name: camel-k
  labels:
    {{ include "chart.labels" . | nindent 4 }}
  namespace: {{ .Release.namespace }} 
spec:
  build:
    maven:
      settings:
        secretKeyRef:
          key: settings.xml
          name: camel-k-maven-settings
    registry:
      address: xxx.acr.io
      secret: camel-k-registry-secret
    timeout: 30m0s

As I apply the above manifest into Kubernetes, the Camel K Operator also installs Kamelets into each namespace. But when i uninstall the helm chart, the Kamelets are still left in the namespace intact. Is there a way to disable the creation of Kamelets when working directly with the IntegrationPlatform CRD so that I won't have leftover Kamelets CRDs (and also CamelCatalogs) in the namespace when I no longer wish to use the IntegrationPlatform/Integrations?

@tadayosi
Copy link
Member

If you set KAMEL_INSTALL_DEFAULT_KAMELETS=false to the operator's env, Kamelets installation can be suppressed. If you are using Camel K 1.7.0 you can also do:

kamel install --operator-env-vars=KAMEL_INSTALL_DEFAULT_KAMELETS=false

@zhiminglim
Copy link
Contributor Author

zhiminglim commented Nov 18, 2021

Thank you for your reply!

I have patched the camel k operator deployment env with your solution, it is working now and suppressing the kamelets installation when i create an IntegrationPlatform in other namespaces. A question on this: if I'm using Camel K 1.6.0, is this the only way to go about setting that env variable?

Also, I noticed that a CamelCatalog CR is also created when I create the IntegrationPlatform via helm, and it remains in the namespace when I remove the IntegrationPlatform. Is there also a way to clean this up?

The reason for these questions, and us not using the Kamel CLI uninstall option, is because we use Camel K CRDs (such as IntegrationPlatform and Integration) within a helm chart for our integration use cases. Hence when I uninstall the helm chart, I would like to clean up the Kamelets and CamelCatalog which are created as a by-product by the camel k operator.

Edit: Have performed upgrade of Camel K Operator to 1.7.0, hence the question has been answered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants