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

chore: remove deprecated AKS code paths #4040

Merged
merged 3 commits into from
Nov 18, 2020

Conversation

jackfrancis
Copy link
Member

Reason for Change:

This PR removes all deprecated (no longer used by) AKS code paths, in order to make ongoing maintenance of AKS Engine more streamlined.

Issue Fixed:

Credit Where Due:

Does this change contain code from or inspired by another project?

  • No
  • Yes

If "Yes," did you notify that project's maintainers and provide attribution?

  • No
  • Yes

Requirements:

Notes:

@jackfrancis
Copy link
Member Author

cc @xuto2 @yangl900

@codecov
Copy link

codecov bot commented Nov 17, 2020

Codecov Report

Merging #4040 (8d8397b) into master (acf7eaa) will increase coverage by 0.14%.
The diff coverage is 78.29%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4040      +/-   ##
==========================================
+ Coverage   73.08%   73.22%   +0.14%     
==========================================
  Files         145      135      -10     
  Lines       21776    20640    -1136     
==========================================
- Hits        15914    15113     -801     
+ Misses       4829     4550     -279     
+ Partials     1033      977      -56     
Impacted Files Coverage Δ
cmd/rotate_certs.go 64.06% <0.00%> (ø)
pkg/api/defaults-cloud-controller-manager.go 93.10% <ø> (-0.45%) ⬇️
pkg/api/defaults-controller-manager.go 100.00% <ø> (ø)
pkg/engine/networksecuritygroups.go 100.00% <ø> (ø)
pkg/engine/params.go 60.43% <ø> (-2.83%) ⬇️
pkg/engine/template_generator.go 66.82% <ø> (-0.62%) ⬇️
pkg/engine/templates_generated.go 43.70% <ø> (ø)
pkg/engine/virtualnetworks.go 92.85% <ø> (-1.99%) ⬇️
pkg/operations/kubernetesupgrade/upgrader.go 62.64% <ø> (+0.36%) ⬆️
cmd/deploy.go 61.12% <33.33%> (+0.53%) ⬆️
... and 21 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update acf7eaa...8d8397b. Read the comment docs.

mboersma
mboersma previously approved these changes Nov 17, 2020
Copy link
Member

@mboersma mboersma left a comment

Choose a reason for hiding this comment

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

/lgtm

My comments are optional feedback.

@@ -424,7 +418,7 @@ func (cs *ContainerService) setOrchestratorDefaults(isUpgrade, isScale bool) {

// Upgrade scenario:
// We need to force set EnableRbac to true for upgrades to 1.15.0 and greater if it was previously set to false (AKS Engine only)
if !a.OrchestratorProfile.KubernetesConfig.IsRBACEnabled() && common.IsKubernetesVersionGe(o.OrchestratorVersion, "1.15.0") && isUpgrade && !cs.Properties.IsHostedMasterProfile() {
if !a.OrchestratorProfile.KubernetesConfig.IsRBACEnabled() && common.IsKubernetesVersionGe(o.OrchestratorVersion, "1.15.0") && isUpgrade {
Copy link
Member

Choose a reason for hiding this comment

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

Optionally, we could also drop the common.IsKubernetesVersionGe(o.OrchestratorVersion, "1.15.0") test here. I guess I missed that in #3851.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah we should do a follow-up workstream just to (1) get rid of the unnecessary version stuff, and (2) automate these versions in tests so we don't have to ever again manually maintain them

cmd/deploy.go Outdated Show resolved Hide resolved
cmd/generate.go Outdated Show resolved Hide resolved
@@ -136,7 +136,7 @@ func (rcc *rotateCertsCmd) run(cmd *cobra.Command, args []string) error {
if rcc.containerService.Properties.MasterProfile != nil {
rcc.outputDirectory = path.Join("_output", rcc.containerService.Properties.MasterProfile.DNSPrefix)
} else {
rcc.outputDirectory = path.Join("_output", rcc.containerService.Properties.HostedMasterProfile.DNSPrefix)
return errors.New("can't determine output directory from nil MasterProfile")
Copy link
Member

Choose a reason for hiding this comment

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

Can we add a unit test for this error path to rotate_certs_test.go? Or at least put a pin in it by creating a GitHub issue.

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually I'm going to punt on this one as this whole thing is going to make @jadarsie's life harder and so why not make it even worse.

(mostly) kidding... but tl;dr I'll work with him on rebasing once this lands and then adapting his rewrite of rotate certs to deal with this stuff.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added a thumbs down for visual fidelity

pkg/api/apiloader_test.go Show resolved Hide resolved
Copy link
Member

@mboersma mboersma left a comment

Choose a reason for hiding this comment

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

/lgtm

encore

@acs-bot acs-bot added the lgtm label Nov 17, 2020
@acs-bot
Copy link

acs-bot commented Nov 17, 2020

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jackfrancis, mboersma

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:
  • OWNERS [jackfrancis,mboersma]

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

@jackfrancis jackfrancis merged commit 71de031 into Azure:master Nov 18, 2020
@jackfrancis jackfrancis deleted the hostedMasterProfile-deprecate branch November 18, 2020 01:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants