-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Fixed issue when registry creds are provided for ACRs using containerapp up command
#7198
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
Changes from 17 commits
8efb0f9
7cad26a
4c3235d
1dd747e
1d8b8e7
45ed9d9
b7dde54
b062baf
cb94f12
cd9f035
cbada5e
6071218
6162cf2
e8743b4
02dc57d
0c8a7bb
6a35dd4
67717d0
c37d9fd
50bf63b
51cbb88
0c4f9d6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1348,7 +1348,8 @@ def _set_up_defaults( | |
| env: "ContainerAppEnvironment", | ||
| app: "ContainerApp", | ||
| custom_location: "CustomLocation", | ||
| extension: "Extension" | ||
| extension: "Extension", | ||
| is_registry_server_params_set=None | ||
| ): | ||
| # If no RG passed in and a singular app exists with the same name, get its env and rg | ||
| _get_app_env_and_group(cmd, name, resource_group, env, location, custom_location) | ||
|
|
@@ -1378,7 +1379,8 @@ def _set_up_defaults( | |
|
|
||
| _infer_existing_custom_location_or_extension(cmd, name, location, resource_group, env, custom_location, extension) | ||
|
|
||
| _get_acr_from_image(cmd, app) | ||
| if not is_registry_server_params_set: | ||
This comment was marked as off-topic.
Sorry, something went wrong.
Contributor
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. Currently with |
||
| _get_acr_from_image(cmd, app) | ||
|
|
||
|
|
||
| # Try to get existed connected environment | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -184,7 +184,7 @@ def delete_weaviate_service(cmd, service_name, resource_group_name, no_wait=Fals | |
|
|
||
|
|
||
| def create_milvus_service(cmd, service_name, environment_name, resource_group_name, no_wait=False, | ||
| disable_warnings=True): | ||
| disable_warnings=True): | ||
| return DevServiceUtils.create_service(cmd, service_name, environment_name, resource_group_name, no_wait, | ||
| disable_warnings, DEV_MILVUS_IMAGE, DEV_MILVUS_SERVICE_TYPE, | ||
| DEV_MILVUS_CONTAINER_NAME) | ||
|
|
@@ -1184,7 +1184,9 @@ def containerapp_up(cmd, | |
| env = ContainerAppEnvironment(cmd, environment, resource_group, location=location, logs_key=logs_key, logs_customer_id=logs_customer_id, custom_location_id=custom_location_id, connected_cluster_id=connected_cluster_id) | ||
| app = ContainerApp(cmd, name, resource_group, None, image, env, target_port, registry_server, registry_user, registry_pass, env_vars, workload_profile_name, ingress) | ||
|
|
||
| _set_up_defaults(cmd, name, resource_group_name, logs_customer_id, location, resource_group, env, app, custom_location, extension) | ||
| # Check and see if registry username and passwords are specified. If so, set is_registry_server_params_set to True to use those creds. | ||
| is_registry_server_params_set = bool(registry_server and registry_user and registry_pass) | ||
This comment was marked as off-topic.
Sorry, something went wrong.
Contributor
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. Sorry, I noticed the command |
||
| _set_up_defaults(cmd, name, resource_group_name, logs_customer_id, location, resource_group, env, app, custom_location, extension, is_registry_server_params_set) | ||
|
|
||
| if app.check_exists(): | ||
| if app.get()["properties"]["provisioningState"] == "InProgress": | ||
|
|
@@ -1972,6 +1974,7 @@ def init_dapr_components(cmd, resource_group_name, environment_name, statestore= | |
| } | ||
| } | ||
|
|
||
|
|
||
| def assign_env_managed_identity(cmd, name, resource_group_name, system_assigned=False, user_assigned=None, no_wait=False): | ||
| _validate_subscription_registered(cmd, CONTAINER_APPS_RP) | ||
| managed_env_def = None | ||
|
|
@@ -2049,7 +2052,7 @@ def assign_env_managed_identity(cmd, name, resource_group_name, system_assigned= | |
| payload["identity"]["type"] = "SystemAssigned,UserAssigned" | ||
| if managed_env_def["identity"]["type"] == "UserAssigned" and assign_system_identity: | ||
| payload["identity"]["type"] = "SystemAssigned,UserAssigned" | ||
|
|
||
| else: | ||
| if assign_system_identity and assign_user_identities: | ||
| payload["identity"]["type"] = "SystemAssigned,UserAssigned" | ||
|
|
@@ -2068,6 +2071,7 @@ def assign_env_managed_identity(cmd, name, resource_group_name, system_assigned= | |
| except Exception as e: | ||
| handle_raw_exception(e) | ||
|
|
||
|
|
||
| def remove_env_managed_identity(cmd, name, resource_group_name, system_assigned=False, user_assigned=None, no_wait=False): | ||
| _validate_subscription_registered(cmd, CONTAINER_APPS_RP) | ||
|
|
||
|
|
@@ -2091,8 +2095,6 @@ def remove_env_managed_identity(cmd, name, resource_group_name, system_assigned= | |
|
|
||
| if not managed_env_def: | ||
| raise ResourceNotFoundError("The containerapp env '{}' does not exist".format(name)) | ||
|
|
||
|
|
||
| # If identity not returned | ||
| try: | ||
| managed_env_def["identity"] | ||
|
|
@@ -2148,14 +2150,15 @@ def remove_env_managed_identity(cmd, name, resource_group_name, system_assigned= | |
| cmd=cmd, resource_group_name=resource_group_name, name=name, managed_environment_envelope=payload, no_wait=no_wait) | ||
| except Exception as e: | ||
| handle_raw_exception(e) | ||
|
|
||
| try: | ||
| return r["identity"] | ||
| except: | ||
| r["identity"] = {} | ||
| r["identity"]["type"] = "None" | ||
| return r["identity"] | ||
|
|
||
|
|
||
| def show_env_managed_identity(cmd, name, resource_group_name): | ||
| _validate_subscription_registered(cmd, CONTAINER_APPS_RP) | ||
|
|
||
|
|
||
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.
0.3.47has been released, please move this description toupcoming.