-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
spring-cloud: add support to enable/disable MSI #1523
Conversation
|
||
helps['spring-cloud app identity remove'] = """ | ||
type: command | ||
short-summary: Remove managed service identity from a app. |
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.
examples
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.
s/a/an
@@ -45,6 +45,8 @@ def load_arguments(self, _): | |||
with self.argument_context('spring-cloud app create') as c: | |||
c.argument( | |||
'is_public', arg_type=get_three_state_flag(), help='If true, assign public domain', default=False) | |||
c.argument('assign_identity', arg_type=get_three_state_flag(), | |||
help='Generate and assign an Azure Active Directory Identity for this app for use with key management services like Azure KeyVault.') |
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.
change the help text here too?
|
||
none = "None" | ||
system_assigned = "SystemAssigned" | ||
user_assigned = "UserAssigned" |
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.
keep none
and system_assigned
only, since the other two is not supported yet. Never mind, our backend handles the other two well
hi @fengzhou-msft could you pls help to look at it? thanks |
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
@@ -425,6 +439,37 @@ def app_tail_log(cmd, client, resource_group, service, name, instance=None, foll | |||
raise exceptions[0] | |||
|
|||
|
|||
def app_identity_assign(cmd, client, resource_group, service, name): | |||
app_resource = models.AppResource() | |||
identity = models.ManagedIdentityProperties(type="systemassigned") |
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.
do you have plan to support other type? if yes better to expose type as a param with default value
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.
Not yet. But we can refactor code if we will support in future.
""" | ||
|
||
helps['spring-cloud app identity assign'] = """ | ||
type: command | ||
short-summary: Enable managed service identity on an app. | ||
examples: | ||
- name: Enable managed service identity on an app. |
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 example provided is for system-assigned MSI only
@@ -45,6 +45,8 @@ def load_arguments(self, _): | |||
with self.argument_context('spring-cloud app create') as c: | |||
c.argument( | |||
'is_public', arg_type=get_three_state_flag(), help='If true, assign public domain', default=False) | |||
c.argument('assign_identity', arg_type=get_three_state_flag(), | |||
help='Manage an app\'s managed service identity.') |
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.
If true, assign managed service identity.
Refine text and examples
add to S168 |
This reverts commit 666bab7. Co-authored-by: Xiaoyun Ding <[email protected]>
* spring-cloud: add support to enable/disable MSI (#1523) * Update src/spring-cloud/HISTORY.md Co-authored-by: Feiyue Yu <[email protected]> Co-authored-by: Xiaoyun Ding <[email protected]> Co-authored-by: Feiyue Yu <[email protected]>
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 azdev
required)python scripts/ci/test_index.py -q
locally?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.json
automatically.The precondition is to put your code inside this repo and upgrade the version in the PR but do not modify
src/index.json
.