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

feat(k8s): wait for pool to be ready and add 'nodes' in its output #393

Merged
merged 1 commit into from
Feb 20, 2020

Conversation

debovema
Copy link
Contributor

@debovema debovema commented Feb 7, 2020

Depends on scaleway/scaleway-sdk-go#312

To test with the scaleway-sdk-go patch from scaleway/scaleway-sdk-go#312,
run:

echo 'replace github.com/scaleway/scaleway-sdk-go => github.com/debovema/scaleway-sdk-go wait-for-nodes' >> go.mod

=> scaleway/scaleway-sdk-go#312 was merged

Copy link
Contributor

@Sh4d1 Sh4d1 left a comment

Choose a reason for hiding this comment

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

Waiting on how the sdk PR goes to finish the review but a few things:

  • waiting on the node ready on the read doesn't seems like a good idea (for instance if a node has crashed, and autohealing is off, the read will fail). Maybe just add it on create/upgrade
  • add the name of the node :)

scaleway/resource_k8s_cluster_beta.go Show resolved Hide resolved
scaleway/resource_k8s_pool_beta.go Show resolved Hide resolved
@debovema
Copy link
Contributor Author

I added node name and pool ID in the output.

@debovema
Copy link
Contributor Author

I also moved the waiting for nodes in create/update only. Otherwise it leads to unpredictable behaviour as you mentioned.

@debovema debovema force-pushed the pool-nodes branch 3 times, most recently from 4e49d4e to dd12f2b Compare February 18, 2020 12:22
Copy link
Contributor

@Sh4d1 Sh4d1 left a comment

Choose a reason for hiding this comment

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

It would be nice to add the wait_for_pool_ready on the pool as well.
Also could you add some tests to check that the behaviour is ok:

  • just wait on the pools ready, and check that the status of the nodes is running and the number is correct
  • also modify the documentation to reflect the changes

scaleway/resource_k8s_cluster_beta.go Outdated Show resolved Hide resolved
@ghost ghost added documentation size/L and removed size/M labels Feb 18, 2020
@ghost ghost added size/M and removed size/L labels Feb 18, 2020
@debovema debovema changed the title feat(k8s): add 'nodes' computed value in pools feat(k8s): wait for pool to be ready and add 'nodes' in its output Feb 19, 2020
@debovema debovema force-pushed the pool-nodes branch 2 times, most recently from 0606f8f to 49c55a4 Compare February 19, 2020 10:34
@ghost ghost added size/XL and removed size/L labels Feb 19, 2020
@debovema debovema force-pushed the pool-nodes branch 4 times, most recently from fb3593d to c9ee2a6 Compare February 19, 2020 12:07
@debovema debovema marked this pull request as ready for review February 19, 2020 12:08
@Sh4d1
Copy link
Contributor

Sh4d1 commented Feb 19, 2020

LGTM
@kindermoumoute @jerome-quere ?

scaleway/helpers_k8s.go Outdated Show resolved Hide resolved
scaleway/resource_k8s_cluster_beta.go Outdated Show resolved Hide resolved
scaleway/resource_k8s_cluster_beta.go Show resolved Hide resolved
scaleway/resource_k8s_cluster_beta.go Show resolved Hide resolved
scaleway/resource_k8s_pool_beta.go Outdated Show resolved Hide resolved
scaleway/resource_k8s_pool_beta.go Outdated Show resolved Hide resolved
@debovema debovema force-pushed the pool-nodes branch 4 times, most recently from 6419b53 to b2b95d5 Compare February 20, 2020 08:53
Copy link
Contributor

@loicbourgois loicbourgois left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@kindermoumoute kindermoumoute left a comment

Choose a reason for hiding this comment

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

LGTM

@kindermoumoute kindermoumoute merged commit 1295c06 into scaleway:master Feb 20, 2020
@debovema debovema deleted the pool-nodes branch February 20, 2020 10:42
@debovema
Copy link
Contributor Author

Thanks @Sh4d1 @loicbourgois @kindermoumoute !

@remyleone remyleone added the k8s Kubernetes Kapsule issues, bugs and feature requests label Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation k8s Kubernetes Kapsule issues, bugs and feature requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants