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

Scale down of aws-custom-route-controller #634

Merged
merged 3 commits into from
Oct 24, 2022

Conversation

elchead
Copy link
Contributor

@elchead elchead commented Oct 21, 2022

How to categorize this PR?

/area control-plane
/kind bug
/platform aws

What this PR does / why we need it:

Which issue(s) this PR fixes:
Fixes #628

Special notes for your reviewer:

Release note:


@gardener-robot gardener-robot added the platform/aws Amazon web services platform/infrastructure label Oct 21, 2022
@gardener-robot
Copy link

@elchead Labels area/todo, kind/todo do not exist.

@gardener-robot
Copy link

@elchead Thank you for your contribution.

@gardener-robot gardener-robot added needs/review Needs review size/xs Size of pull request is tiny (see gardener-robot robot/bots/size.py) labels Oct 21, 2022
@gardener-robot-ci-3
Copy link
Contributor

Thank you @elchead for your contribution. Before I can start building your PR, a member of the organization must set the required label(s) {'reviewed/ok-to-test'}. Once started, you can check the build status in the PR checks section below.

@elchead
Copy link
Contributor Author

elchead commented Oct 24, 2022

e2e tested

@elchead elchead marked this pull request as ready for review October 24, 2022 08:22
@elchead elchead requested review from a team as code owners October 24, 2022 08:22
@gardener-robot gardener-robot added area/control-plane Control plane related kind/bug Bug labels Oct 24, 2022
@kon-angelo
Copy link
Contributor

/invite @ialidzhikov @MartinWeindel

Copy link
Member

@MartinWeindel MartinWeindel left a comment

Choose a reason for hiding this comment

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

Thanks, looks good to me.
I have only one small change request. There is another test case named "should return correct control plane chart values (k8s >= 1.18)" (valuesprovider_test.go, line 296ff). Can you check here for replicas = 0?

@gardener-robot gardener-robot added the needs/changes Needs (more) changes label Oct 24, 2022
@kon-angelo
Copy link
Contributor

/reviewed ok-to-test

@gardener-robot gardener-robot added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 24, 2022
@elchead
Copy link
Contributor Author

elchead commented Oct 24, 2022

@MartinWeindel i am doing this already see l.257 in the definition of crcChartValues

@DockToFuture
Copy link
Member

Didn't know that there was a PR open on this, just discovered it. Did the same thing in my code to remove the overlay but also checked if the UseCustomRouteController field is nil and then disabled the awsRouteController. This will keep it disabled for existing clusters as long as they specify no overlay.

	awsCustomRouteControllerEnabled := false
	replicas := extensionscontroller.GetControlPlaneReplicas(cluster, scaledDown, 1)
	if cpConfig.CloudControllerManager != nil &&
		cpConfig.CloudControllerManager.UseCustomRouteController != nil {
		awsCustomRouteControllerEnabled = true
	}
	if awsCustomRouteControllerEnabled && !*cpConfig.CloudControllerManager.UseCustomRouteController {
		replicas = 0
	}

	values := map[string]interface{}{
		"enabled":     awsCustomRouteControllerEnabled,
		"replicas":    replicas,
...

Do you prefer to enable the aws route controller always or only for clusters which have the UseCustomRouteController field specified?

@kon-angelo
Copy link
Contributor

@DockToFuture AFAIK, the problem is that without setting the enabled field the replica update won't be propagated because the chart will not be applied.

Ideally, we would be able to discern if the chart had already been applied at least once (hence there was a CRC running at some point) and only then apply the replicas, but I think this complicates the flow. Since we want to support disabling CRC and effectively setting replicas to 0 (since we don't delete the deployment), why not have only this case to care about.

@DockToFuture
Copy link
Member

@DockToFuture AFAIK, the problem is that without setting the enabled field the replica update won't be propagated because the chart will not be applied.

Sure without setting the enabled field the chart won't be applied. If we want to keep it like this im fine with it. Can we get it merged then I will rebase my PR on this.

Copy link
Member

@DockToFuture DockToFuture left a comment

Choose a reason for hiding this comment

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

/lgtm

@gardener-robot gardener-robot added reviewed/lgtm Has approval for merging and removed needs/changes Needs (more) changes needs/review Needs review labels Oct 24, 2022
Copy link
Contributor

@kon-angelo kon-angelo left a comment

Choose a reason for hiding this comment

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

/lgtm

@gardener-robot-ci-1 gardener-robot-ci-1 added needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Oct 24, 2022
Copy link
Member

@MartinWeindel MartinWeindel left a comment

Choose a reason for hiding this comment

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

/lgtm

@kon-angelo kon-angelo merged commit e93f856 into gardener:master Oct 24, 2022
@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label Oct 24, 2022
@elchead elchead deleted the disable-custom-route-replicas branch October 24, 2022 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/control-plane Control plane related kind/bug Bug needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) platform/aws Amazon web services platform/infrastructure reviewed/lgtm Has approval for merging size/xs Size of pull request is tiny (see gardener-robot robot/bots/size.py) status/closed Issue is closed (either delivered or triaged)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scale down of aws-custom-route-controller is not working when it is disabled
7 participants