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

chore: tolerate lowercase LB SKU vals #1838

Merged
merged 2 commits into from
Aug 23, 2019

Conversation

jackfrancis
Copy link
Member

Reason for Change:

Explicitly tolerate both "basic" and "Basic", and "standard" and "Standard" as values for kubernetesConfig.loadBalancerSku; and then do a conversion to the capitalized values before sending to Azure API.

(In fact we are tolerating all variants of "basiC", "STANDaRD", etc etc)

Issue Fixed:

Requirements:

Notes:

@@ -306,6 +306,12 @@ func (cs *ContainerService) setOrchestratorDefaults(isUpgrade, isScale bool) {
}
}

if strings.ToLower(a.OrchestratorProfile.KubernetesConfig.LoadBalancerSku) == strings.ToLower(BasicLoadBalancerSku) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Here we are doing some "convenient" string rationalization so that by the time we compose our Azure API spec, we are always using LB SKU values of the "capitalized" form.

@@ -276,6 +276,12 @@ func (a *Properties) ValidateOrchestratorProfile(isUpdate bool) error {
}
}

if o.KubernetesConfig.LoadBalancerSku != "" {
Copy link
Member Author

Choose a reason for hiding this comment

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

We were never actually doing basic SKU value validation for vlabs. Here we check against case-insensitive variants of "basic" and "standard"

Copy link
Contributor

@CecileRobertMichon CecileRobertMichon left a comment

Choose a reason for hiding this comment

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

lgtm

@codecov
Copy link

codecov bot commented Aug 22, 2019

Codecov Report

Merging #1838 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #1838      +/-   ##
==========================================
+ Coverage   76.41%   76.42%   +<.01%     
==========================================
  Files         130      130              
  Lines       19413    19421       +8     
==========================================
+ Hits        14835    14843       +8     
  Misses       3780     3780              
  Partials      798      798

Copy link
Member

@ritazh ritazh left a comment

Choose a reason for hiding this comment

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

lgtm

@acs-bot
Copy link

acs-bot commented Aug 22, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CecileRobertMichon, jackfrancis, ritazh

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 [CecileRobertMichon,jackfrancis,ritazh]

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 0f2dbaf into Azure:master Aug 23, 2019
@jackfrancis jackfrancis deleted the tolerate-lowercase-lb-vals branch August 23, 2019 16:54
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.

None yet

4 participants