-
Notifications
You must be signed in to change notification settings - Fork 558
Support --set flag in deploy command #3188
Support --set flag in deploy command #3188
Conversation
…t/deploy-set-flag
Codecov Report
@@ Coverage Diff @@
## master #3188 +/- ##
==========================================
- Coverage 52.32% 52.24% -0.09%
==========================================
Files 103 103
Lines 15452 15487 +35
==========================================
+ Hits 8086 8091 +5
- Misses 6638 6668 +30
Partials 728 728 |
cmd/deploy.go
Outdated
@@ -139,11 +170,40 @@ func (dc *deployCmd) load(cmd *cobra.Command, args []string) error { | |||
} | |||
|
|||
// do not validate when initially loading the apimodel, validation is done later after autofilling values | |||
dc.containerService, dc.apiVersion, err = apiloader.LoadContainerServiceFromFile(dc.apimodelPath, false, false, nil) | |||
dc.containerService, dc.apiVersion, err = apiloader.LoadContainerServiceFromFile(dc.apimodelPath, true, false, nil) |
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.
What's the reason for changing this to true? See #3112
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.
@CecileRobertMichon, good catch, no reason. It was a mistake. I've just fixed it. I've messed up with the generate command where we are loading the api model with validation. This is typically the "duplicated" code I was talking about that we need to find a way to share.
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jcorioland Assign the PR to them by writing 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 |
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
What this PR does / why we need it:
Brings support for using --set flag to override values from the api model JSON file directly from acs-engine deploy command
Ex:
Which issue this PR fixes: fixes #2796
Special notes for your reviewer:
I've done some refactoring in the deploy.go file to be able to extract the api model validation from the api model loading. That means that there is now 5 steps:
I think some code could be refactored more and shared between generate and deploy command, but it may be better to handle this in another issue/PR.
If applicable:
Release note: