-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[AKS] add ephemeral os functionality #2344
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
Conversation
|
If this PR is for a new extension or change to an existing extension, use the following to try out the changes in this PR: |
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.
reason for change?
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.
I got lint errors on this running python linters as specified by CLI. (len-as-condition, pylint C1801)
seems like that's a bit debatable as far as being preferable itself, though: pylint-dev/pylint#1405 (comment)
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.
surprised CI didn't catch that
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.
is this required? or optional? if optional pls set it to None
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.
optional, will do
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.
Since arg_type=get_enum_type([CONST_OS_DISK_TYPE_MANAGED, CONST_OS_DISK_TYPE_EPHEMERAL]) is used in _param.py, the framework will automatically add "Allowed values" list for it. We do not need to add manually here.
And if the default value is "Managed", we can directly define the custom function as below:
def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,too-many-branches
client, client,
resource_group_name, resource_group_name,
name, name,
ssh_key_value, ssh_key_value,
dns_name_prefix=None, dns_name_prefix=None,
location=None, location=None,
admin_username="azureuser", admin_username="azureuser",
windows_admin_username=None, windows_admin_username=None,
windows_admin_password=None, windows_admin_password=None,
kubernetes_version='', kubernetes_version='',
node_vm_size="Standard_DS2_v2", node_vm_size="Standard_DS2_v2",
node_osdisk_type="Managed",
The framework will also add Default value in help message automatically.
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.
I'll remove it from the help 👍 but I don't think we want to default this value client side, we want it to be empty and we will default it server side.
In October, the defaulting behavior on server side will get slightly more complex when the value isn't provided and I would strongly prefer not to copy that defaulting behavior into the client.
7f19ed8 to
cc8490b
Compare
|
If this PR is for a new extension or change to an existing extension, use the following to try out the changes in this PR: |
|
had to re-run appgw tests to get fresh recording to pass (think this is related to recent issues with normalization in the names), sorry about that |
arrownj
left a comment
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.
The code is good to me.
This checklist is used to make sure that common guidelines for a pull request are followed.
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally?For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your PR is merged into master branch, a new PR will be created to update
src/index.jsonautomatically.The precondition is to put your code inside this repo and upgrade the version in the PR but do not modify
src/index.json.