-
Notifications
You must be signed in to change notification settings - Fork 75
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
Add Autoscaler to CSE #678
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
lvirbalas
reviewed
Jun 3, 2024
Signed-off-by: abarreiro <abarreiro@vmware.com>
lvirbalas
approved these changes
Jun 5, 2024
dataclouder
approved these changes
Jun 6, 2024
Didainius
approved these changes
Jun 6, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR automates the steps to deploy an Autoscaler into a Kubernetes cluster stated in this document:
https://www.vmware.com/content/dam/digitalmarketing/vmware/en/pdf/docs/vmw-whitepaper-cluster-auto-scaler.pdf
This procedure affects cluster creation and cluster update operations.
Built on top of #674
Description
A new
autoscaler.tmpl
file has been added to the collection. A new configuration blockAutoscaler
has been added to both theCseWorkerPoolSettings
(settings to create a worker pool in a new cluster) andCseWorkerPoolUpdateInput
(input to update a worker pool in an existing cluster).When any of the Worker Pools settings has an
Autoscaler
struct set, we add theautoscaler.tmpl
rendered YAML to the final bunch of YAML documents that describe the whole cluster. Also, each of the worker pool deployments will have specialmetadata
entries, and won't render thereplicas
field (as it conflicts with the autoscaler).When none of the Worker Pools settings have the
Autoscaler
struct set, we do nothing, we just work withreplicas
as usual and no extra steps are required. This case would define an existing use case for regression tests.With these two scenarios, the cluster is then created with or without autoscaling elements present in the cluster, and also the new metadata entries in each worker pool, if needed.
What about updating a cluster?
In this case, a user can enable or disable the
Autoscaler
in the same way, usingCseWorkerPoolUpdateInput
to update existing worker pools orCseWorkerPoolSettings
to create new worker pools (this mechanism doesn't change). Both have the newAutoscaler
struct (this is the new feature).When updating a cluster, we search for the Autoscaler YAML document, to check whether it is present in the cluster or not.
Tests
Updated
Test_Cse
(the modifications check Autoscaler updates) and createdTest_CseWithAutoscaler
(this one checks cluster creation with Autoscaler). Both check that the autoscaler is created and the information is retrieved (set in the structure) correctly.