Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

enable autoscaler in cc-based cluster #3720

Merged
merged 1 commit into from
Oct 25, 2022
Merged

Conversation

zhouke1991
Copy link
Contributor

@zhouke1991 zhouke1991 commented Oct 20, 2022

What this PR does / why we need it

Add autoscaler(optional) to the utkg cluster lifecycle.

@github-actions
Copy link

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/3720/20221020041419/clustergen.diff.txt
Author/reviewers:
Please review to verify that the effects on the generated cluster configurations are exactly what the PR intended, and give a thumbs-up if so.

@zhouke1991 zhouke1991 force-pushed the topic/kez1/autoscaler_enable_cc branch from c01cb52 to 9975553 Compare October 20, 2022 06:32
@github-actions
Copy link

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/3720/20221020064338/clustergen.diff.txt
Author/reviewers:
Please review to verify that the effects on the generated cluster configurations are exactly what the PR intended, and give a thumbs-up if so.

@zhouke1991
Copy link
Contributor Author

//usebom:sandbox/v1.7.0-zshippable/430690895461907853/tkg-compatibility:v12

@zhouke1991 zhouke1991 force-pushed the topic/kez1/autoscaler_enable_cc branch from 9975553 to eada599 Compare October 20, 2022 13:59
@github-actions
Copy link

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/3720/20221020140836/clustergen.diff.txt
Author/reviewers:
Please review to verify that the effects on the generated cluster configurations are exactly what the PR intended, and give a thumbs-up if so.

@codecov
Copy link

codecov bot commented Oct 20, 2022

Codecov Report

Merging #3720 (2afe651) into main (863aba1) will decrease coverage by 0.78%.
The diff coverage is 73.52%.

@@            Coverage Diff             @@
##             main    #3720      +/-   ##
==========================================
- Coverage   46.22%   45.44%   -0.79%     
==========================================
  Files         400      425      +25     
  Lines       39642    41221    +1579     
==========================================
+ Hits        18326    18731     +405     
- Misses      19626    20780    +1154     
- Partials     1690     1710      +20     
Impacted Files Coverage Δ
tkg/client/upgrade_cluster.go 44.62% <0.00%> (+1.57%) ⬆️
tkg/clusterclient/clusterclient.go 49.42% <71.42%> (+0.62%) ⬆️
tkg/client/cluster.go 15.65% <73.68%> (+1.50%) ⬆️
tkg/client/upgrade_cluster_clusterclass.go 100.00% <100.00%> (ø)
addons/controllers/machine_controller.go 65.65% <0.00%> (-3.04%) ⬇️
addons/controllers/clusterbootstrap_controller.go 63.26% <0.00%> (-0.60%) ⬇️
cmd/cli/plugin/cluster/credentials_update.go 9.23% <0.00%> (ø)
cmd/cli/plugin/cluster/osimage.go 100.00% <0.00%> (ø)
cmd/cli/plugin/cluster/get_machinehealthcheck.go 11.42% <0.00%> (ø)
...in/cluster/get_machinehealthcheck_control_plane.go 11.11% <0.00%> (ø)
... and 25 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@zhouke1991
Copy link
Contributor Author

//usebom:sandbox/v1.7.0-zshippable/430854692847751580/tkg-compatibility:v12

@zhouke1991 zhouke1991 force-pushed the topic/kez1/autoscaler_enable_cc branch from eada599 to b00c8c5 Compare October 21, 2022 11:39
@github-actions
Copy link

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/3720/20221021114547/clustergen.diff.txt
Author/reviewers:
Please review to verify that the effects on the generated cluster configurations are exactly what the PR intended, and give a thumbs-up if so.

@zhouke1991 zhouke1991 force-pushed the topic/kez1/autoscaler_enable_cc branch from b00c8c5 to 805ce55 Compare October 21, 2022 15:05
@github-actions
Copy link

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/3720/20221021151332/clustergen.diff.txt
Author/reviewers:
Please review to verify that the effects on the generated cluster configurations are exactly what the PR intended, and give a thumbs-up if so.

@zhouke1991 zhouke1991 force-pushed the topic/kez1/autoscaler_enable_cc branch from 805ce55 to b2bdc86 Compare October 21, 2022 15:42
@github-actions
Copy link

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/3720/20221021154935/clustergen.diff.txt
Author/reviewers:
Please review to verify that the effects on the generated cluster configurations are exactly what the PR intended, and give a thumbs-up if so.

@zhouke1991 zhouke1991 force-pushed the topic/kez1/autoscaler_enable_cc branch from b2bdc86 to 2afe651 Compare October 21, 2022 16:25
@github-actions
Copy link

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/3720/20221021163233/clustergen.diff.txt
Author/reviewers:
Please review to verify that the effects on the generated cluster configurations are exactly what the PR intended, and give a thumbs-up if so.

Copy link
Contributor

@wjun wjun left a comment

Choose a reason for hiding this comment

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

LGTM.

@wjun wjun added the ok-to-merge PRs should be labelled with this before merging label Oct 25, 2022
@@ -685,6 +691,47 @@ func (c *client) WaitForAutoscalerDeployment(deploymentName, namespace string) e
return c.GetResource(&appsv1.Deployment{}, deploymentName, namespace, VerifyAutoscalerDeploymentAvailable, &PollOptions{Interval: CheckResourceInterval, Timeout: CheckAutoscalerDeploymentTimeout})
}

func (c *client) ApplyPatchForAutoScalerDeployment(tkgBomClient tkgconfigbom.Client, clusterName string, k8sVersion string, namespace string) error {
var autoScalerDeployment appsv1.Deployment
autoscalerDeploymentName := clusterName + "-cluster-autoscaler"
Copy link
Contributor

Choose a reason for hiding this comment

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

Use constant value. This can be fixed in a later pr.

@wjun wjun merged commit aa74cc8 into main Oct 25, 2022
@wjun wjun deleted the topic/kez1/autoscaler_enable_cc branch October 25, 2022 01:51
m1zzx2 pushed a commit that referenced this pull request Oct 31, 2022
Add autoscaler(optional) to the utkg cluster lifecycle.
This is done as part of cluster.yaml output.
Disable worker replica of clusterclass when autosacler is enabled.
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
cla-not-required ok-to-merge PRs should be labelled with this before merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants