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

kamel scale integration to zero not possible #1094

Closed
davsclaus opened this issue Nov 26, 2019 · 4 comments · Fixed by #1100
Closed

kamel scale integration to zero not possible #1094

davsclaus opened this issue Nov 26, 2019 · 4 comments · Fixed by #1100
Milestone

Comments

@davsclaus
Copy link
Contributor

If you just want to scale a integration to zero (eg to stop it) then the operator will start it afterwards, so you can only delete it

kamel run --name polyglot routes.xml beans.groovy JavaRoute.java

kubectl scale deployment --replicas=0 polyglot

And then the operator creates a new polyglot integration, when k8s has scaled it down

Maybe we need a command on kamel so you can stop an integration, either via scale

kamel scale --replicas=0 polyglot
@nicolaferraro
Copy link
Member

I think we support scaling via oc or kubectl iirc (@astefanutti).

kubectl scale it polyglot --replicas 0

@astefanutti
Copy link
Member

Yes, it's possible to scale the integration either with:

$ kubectl scale it polyglot --replicas 0

Or:

$ kubectl patch it polyglot --type='merge' -p '{"spec":{"replicas":"0"}}'

For some reasons (concurrency control IIRC), kubectl scale mandates to have the .spec.replicas already set for it to work. So you can use the latter command to set the field initially, or use kubectl edit it polyglot alternatively.

@davsclaus
Copy link
Contributor Author

davsclaus commented Nov 26, 2019

I tried the first command above and then the kamel k operator sees the "change" and then start another pod with the integration. eg the operator dont know it was scaled down on purpose.

@astefanutti
Copy link
Member

astefanutti commented Nov 26, 2019

There is a bug with a recent change done in the GC trait that comes into the way of rescaling. I'm working on a PR right now that should fix the issue.

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

Successfully merging a pull request may close this issue.

3 participants