-
Notifications
You must be signed in to change notification settings - Fork 560
only enable aggregated api if rbac != disabled #3813
Conversation
Fixes a regression introduced in this PR: |
@@ -137,15 +137,15 @@ func (cli *CLIProvisioner) provision() error { | |||
|
|||
c, err := config.ParseConfig() | |||
if err != nil { | |||
return errors.New("unable to parse base config") | |||
return errors.Wrap(err, "unable to parse base config") |
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.
By not wrapping the errors they were not being bubbled up and exposed in our E2E runs (which is why it took 10 days to find this).
@@ -59,6 +59,14 @@ func IsTrueBoolPointer(b *bool) bool { | |||
return false | |||
} | |||
|
|||
// IsFalseBoolPointer is a simple boolean helper function for boolean pointers | |||
func IsFalseBoolPointer(b *bool) bool { |
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.
Question: Do you think IsFalse would suffice as there being a bool pointer as the argument is already suggestive?
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.
Because we already have lots of places using IsTrueBoolPointer
it makes the most sense to keep the same naming pattern.
Codecov Report
@@ Coverage Diff @@
## master #3813 +/- ##
=========================================
Coverage ? 55.63%
=========================================
Files ? 109
Lines ? 16251
Branches ? 0
=========================================
Hits ? 9042
Misses ? 6424
Partials ? 785 |
@@ -703,7 +703,7 @@ var _ = Describe("Azure Container Cluster using the Kubernetes Orchestrator", fu | |||
}) | |||
|
|||
It("should be able to autoscale", func() { | |||
if eng.HasLinuxAgents() { | |||
if eng.HasLinuxAgents() && eng.ExpandedDefinition.Properties.OrchestratorProfile.KubernetesConfig.EnableAggregatedAPIs { |
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.
HPA implementation uses metrics-server, which requires aggregated api
See:
https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: CecileRobertMichon, jackfrancis 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:
Approvers can indicate their approval by writing |
What this PR does / why we need it: Prior to this change, default configuration for RBAC and enable aggregated APIs was distinct. These default enforcements need to happen in tandem, as aggregated API functionality depends upon RBAC. So, if RBAC is disabled, we need to ensure that aggregated API functionality is not by-default enabled.
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #Special notes for your reviewer:
If applicable:
Release note: