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

K8s Service redeployment #19795

Merged
merged 1 commit into from
Sep 1, 2021
Merged

Conversation

manusa
Copy link
Contributor

@manusa manusa commented Aug 31, 2021

Fixes #19701

Deploy step checks if resource needs to be deleted before creation. In case deletion is needed (KNATIVE or Service, others should be opted-in in the new shouldDeleteExisting method), client deletes any existing resource matching Group+Version+Kind+Namespace+Name and waits for its deletion (10 seconds ---> Maybe should add a constant somewhere?)

I'd like to add some tests for this, but I'm not sure where.

/cc @geoand

@quarkus-bot
Copy link

quarkus-bot bot commented Aug 31, 2021

Thanks for your pull request!

The title of your pull request does not follow our editorial rules. Could you have a look?

  • title should preferably start with an uppercase character (if it makes sense!)
  • title should not start with chore/docs/feat/fix/refactor but be a proper sentence

This message is automatically generated by a bot.

Copy link
Contributor

@iocanel iocanel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@geoand geoand changed the title fix: K8s Service can be re-applied Fix K8s Service redeployment Aug 31, 2021
@geoand
Copy link
Contributor

geoand commented Aug 31, 2021

I'd like to add some tests for this, but I'm not sure where.

For the time being, we don't have a cluster are part of our upstream CI.

@Sgitario it would be great if you could test this at some point

@Sgitario
Copy link
Contributor

I'd like to add some tests for this, but I'm not sure where.

For the time being, we don't have a cluster are part of our upstream CI.

@Sgitario it would be great if you could test this at some point

I'd like to add some tests for this, but I'm not sure where.

For the time being, we don't have a cluster are part of our upstream CI.

@Sgitario it would be great if you could test this at some point

This is a good one! I will add an automated test into our repo https://github.com/quarkus-qe/quarkus-test-suite to reproduce this issue using https://github.com/quarkus-qe/quarkus-test-framework#kubernetes

@geoand
Copy link
Contributor

geoand commented Aug 31, 2021

Thanks!

@gsmet
Copy link
Member

gsmet commented Aug 31, 2021

@Sgitario any chance you can validate this one before next Monday? It would be nice to have it in 2.2.2.Final.

@manusa manusa changed the title Fix K8s Service redeployment K8s Service redeployment Aug 31, 2021
@Sgitario
Copy link
Contributor

Sgitario commented Sep 1, 2021

@Sgitario any chance you can validate this one before next Monday? It would be nice to have it in 2.2.2.Final.

@geoand @gsmet I could not verify the issue at first place: #19701 (comment)

@geoand
Copy link
Contributor

geoand commented Sep 1, 2021

So you were able to redeploy the application without problems?

@Sgitario
Copy link
Contributor

Sgitario commented Sep 1, 2021

So you were able to redeploy the application without problems?

Yes, without the changes from this PR.

@geoand
Copy link
Contributor

geoand commented Sep 1, 2021

Weird... I think I was able to reproduce the problem in Minikube

@manusa
Copy link
Contributor Author

manusa commented Sep 1, 2021

So you were able to redeploy the application without problems?

I did reproduce the issue too (and obviously I verified the fix) in Minikube. It's a common problem that you can easily reproduce even using kubectl with the generated YAMLs (since there is an already allocated node port/IP, the service cannot start).

What I'm not sure if the issue is reproducible in the 1.x LTS version, since in some versions of the client a specific Service handler might have taken care of this.

@Sgitario
Copy link
Contributor

Sgitario commented Sep 1, 2021

Weird... I think I was able to reproduce the problem in Minikube

We use kind and OCP, but not minikube.
As @manusa said, if he could reproduce it in minikube, then I guess it should be fine.

@geoand
Copy link
Contributor

geoand commented Sep 1, 2021

Let's merge this as it clearly fixes a problem and doesn't seem to cause any new ones.

Thanks folks

@geoand geoand merged commit 0c58c03 into quarkusio:main Sep 1, 2021
@quarkus-bot quarkus-bot bot added this to the 2.3 - main milestone Sep 1, 2021
@manusa manusa deleted the fix/k8s-service-reapply branch September 1, 2021 08:39
@gsmet gsmet modified the milestones: 2.3 - main, 2.2.2.Final Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fail to redeploy to Kubernetes
5 participants