-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Aks [nodepool] update without args prompts to reconcile. #4759
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
Merged
Merged
Changes from 9 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
42f4b4f
update with no args to reconcile
8da34a7
allow no argument to agentpool update to reconcile that
cb85d4e
keep patch
46a065f
try and test reconcile case
ef35758
help for update with out arguments
f7114f7
Update _help.py
paulgmiller 1a63bfb
Merge branch 'main' of github.com:Azure/azure-cli-extensions into upd…
f0e54e5
xMerge remote-tracking branch 'paul/updateasreconcile' into updateasr…
ea452ce
short summaries
a8308a9
Update src/aks-preview/azext_aks_preview/_help.py
paulgmiller beabdb5
Update src/aks-preview/azext_aks_preview/_help.py
paulgmiller fb94ed7
matchris comments
a991245
bump vesion
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -52,7 +52,7 @@ | |
| from dateutil.parser import parse # pylint: disable=import-error | ||
| from dateutil.relativedelta import relativedelta # pylint: disable=import-error | ||
| from knack.log import get_logger | ||
| from knack.prompting import NoTTYException, prompt_pass | ||
| from knack.prompting import NoTTYException, prompt_pass, prompt_y_n | ||
| from knack.util import CLIError | ||
| from msrestazure.azure_exceptions import CloudError | ||
| from six.moves.urllib.error import URLError # pylint: disable=import-error | ||
|
|
@@ -398,7 +398,6 @@ def delete_role_assignments(cli_ctx, ids=None, assignee=None, role=None, resourc | |
| assignments_client.delete_by_id(i) | ||
| return | ||
| if not any([ids, assignee, role, resource_group_name, scope, assignee, yes]): | ||
| from knack.prompting import prompt_y_n | ||
| msg = 'This will delete all role assignments under the subscription. Are you sure?' | ||
| if not prompt_y_n(msg, default="n"): | ||
| return | ||
|
|
@@ -1058,8 +1057,6 @@ def aks_kollect(cmd, # pylint: disable=too-many-statements,too-many-locals | |
|
|
||
| readonly_sas_token = readonly_sas_token.strip('?') | ||
|
|
||
| from knack.prompting import prompt_y_n | ||
|
|
||
| print() | ||
| print('This will deploy a daemon set to your cluster to collect logs and diagnostic information and ' | ||
| f'save them to the storage account ' | ||
|
|
@@ -1240,7 +1237,6 @@ def aks_upgrade(cmd, # pylint: disable=unused-argument, too-many-return-state | |
| node_image_only=False, | ||
| aks_custom_headers=None, | ||
| yes=False): | ||
| from knack.prompting import prompt_y_n | ||
| msg = 'Kubernetes may be unavailable during cluster upgrades.\n Are you sure you want to perform this operation?' | ||
| if not yes and not prompt_y_n(msg, default="n"): | ||
| return None | ||
|
|
@@ -1837,10 +1833,12 @@ def aks_agentpool_update(cmd, # pylint: disable=unused-argument | |
| disable_cluster_autoscaler + update_cluster_autoscaler | ||
|
|
||
| if (update_autoscaler != 1 and not tags and not scale_down_mode and not mode and not max_surge and labels is None and node_taints is None): | ||
| raise CLIError('Please specify one or more of "--enable-cluster-autoscaler" or ' | ||
| '"--disable-cluster-autoscaler" or ' | ||
| '"--update-cluster-autoscaler" or ' | ||
| '"--tags" or "--mode" or "--max-surge" or "--scale-down-mode" or "--labels" or "--node-taints') | ||
| reconcilePrompt = "no argument specified to update would you like to reconcile to current settings?" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. minor: Use |
||
| if not prompt_y_n(reconcilePrompt, default="n"): | ||
| raise CLIError('Please specify one or more of "--enable-cluster-autoscaler" or ' | ||
| '"--disable-cluster-autoscaler" or ' | ||
| '"--update-cluster-autoscaler" or ' | ||
| '"--tags" or "--mode" or "--max-surge" or "--scale-down-mode" or "--labels" or "--node-taints') | ||
|
|
||
| instance = client.get(resource_group_name, cluster_name, nodepool_name) | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.