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

Improve initial node deployment creation #6064

Merged
merged 2 commits into from
Dec 2, 2020

Conversation

maciaszczykm
Copy link
Contributor

@maciaszczykm maciaszczykm commented Oct 21, 2020

What this PR does / why we need it: Currently the whole cluster and initial node deployment creation process happens in the API. First we create the cluster, then start the background process for initial node deployment creation and return the created cluster to the user. The main issue with this approach is that if the API will crash or if it will restart during the background process run that handles initial node deployment creation, then the data will be lost and the cluster will have no initial deployment added to it. This pull request changes the approach and adds persistence layer to the process.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged): Fixes #2928.

Special notes for your reviewer:

Documentation:

Does this PR introduce a user-facing change?:

Improved initial node deployment creation process. Right now cluster annotation is used to save the node deployment object before it is created to improve stability.

@kubermatic-bot kubermatic-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. labels Oct 21, 2020
@kubermatic-bot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kubermatic-bot kubermatic-bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. team/ui size/M Denotes a PR that changes 30-99 lines, ignoring generated files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 21, 2020
@kubermatic-bot kubermatic-bot added team/lifecycle and removed approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Oct 28, 2020
@maciaszczykm
Copy link
Contributor Author

/test all

@maciaszczykm maciaszczykm marked this pull request as ready for review October 30, 2020 14:56
@kubermatic-bot kubermatic-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 30, 2020
@maciaszczykm
Copy link
Contributor Author

/test pre-kubermatic-test-integration

@xmudrii xmudrii added the priority/normal Not that urgent, but is important label Nov 5, 2020
@xrstf
Copy link
Contributor

xrstf commented Nov 5, 2020

/retest

@xrstf
Copy link
Contributor

xrstf commented Nov 6, 2020

/approve
/retest
/lgtm

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Nov 6, 2020
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: c56ee00333d06982a39c9155618e8911eab13542

@kubermatic-bot kubermatic-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 6, 2020
@maciaszczykm
Copy link
Contributor Author

/hold

@kubermatic-bot kubermatic-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 6, 2020
@maciaszczykm maciaszczykm marked this pull request as draft November 6, 2020 10:55
@kubermatic-bot kubermatic-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 6, 2020
@kubermatic-bot kubermatic-bot removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. labels Nov 6, 2020
@xrstf
Copy link
Contributor

xrstf commented Nov 26, 2020

Since Marcin is OOO, I am taking over.

@xrstf xrstf changed the title Improve initial node deployment creation WIP - Improve initial node deployment creation Nov 26, 2020
@xrstf xrstf marked this pull request as ready for review November 26, 2020 15:36
@kubermatic-bot kubermatic-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 27, 2020
@maciaszczykm
Copy link
Contributor Author

Looks very good. It seems a little bit better to have it in a new controller as it is easier to read code in that way. I have added some remarks/questions.

@xrstf
Copy link
Contributor

xrstf commented Dec 1, 2020

Added some unit tests as well. This is now ready for review.

@xrstf xrstf changed the title WIP - Improve initial node deployment creation Improve initial node deployment creation Dec 1, 2020
@kubermatic-bot kubermatic-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 1, 2020
pkg/api/v1/types.go Outdated Show resolved Hide resolved
pkg/handler/v2/cluster/cluster.go Show resolved Hide resolved
pkg/handler/common/cluster.go Show resolved Hide resolved
@xrstf
Copy link
Contributor

xrstf commented Dec 2, 2020

/retest

@moadqassem
Copy link
Member

/approve
/lgtm

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Dec 2, 2020
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 478a0e9d84333aca663d5b5e1057b2d12a7173f9

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: maciaszczykm, moadqassem, xrstf

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. lgtm Indicates that a PR is ready to be merged. priority/normal Not that urgent, but is important release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve initial node deployment creation
5 participants