Skip to content
Merged
1 change: 1 addition & 0 deletions src/containerapp/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ upcoming
* 'az containerapp show-custom-domain-verification-id': show verfication id used for binding custom domain
* 'az containerapp list-usages': list usages in subscription
* 'az containerapp env list-usages': list usages in environment
* 'az containerapp update': --yaml support property additionalPortMappings for api-version 2023-05-02-preview

0.3.37
++++++
Expand Down
8 changes: 0 additions & 8 deletions src/containerapp/azext_containerapp/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,14 +613,6 @@ def _update_revision_env_secretrefs(containers, name):
var["secretRef"] = var["secretRef"].replace("{}-".format(name), "")


def _update_revision_env_secretrefs(containers, name):
for container in containers:
if "env" in container:
for var in container["env"]:
if "secretRef" in var:
var["secretRef"] = var["secretRef"].replace("{}-".format(name), "")


def store_as_secret_and_return_secret_ref(secrets_list, registry_user, registry_server, registry_pass, update_existing_secret=False, disable_warnings=False):
if registry_pass.startswith("secretref:"):
# If user passed in registry password using a secret
Expand Down
700 changes: 641 additions & 59 deletions src/containerapp/azext_containerapp/containerapp_decorator.py

Large diffs are not rendered by default.

441 changes: 14 additions & 427 deletions src/containerapp/azext_containerapp/custom.py

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -1247,6 +1247,32 @@ def test_containerapp_preview_create_with_yaml(self, resource_group):
JMESPathCheck("properties.template.scale.rules[0].http.auth[0].secretRef", "secretref"),
])

# test managedEnvironmentId
containerapp_yaml_text = f"""
properties:
configuration:
activeRevisionsMode: Multiple
ingress:
external: false
additionalPortMappings:
- external: false
targetPort: 321
- external: false
targetPort: 8080
exposedPort: 1234
"""

write_test_file(containerapp_file_name, containerapp_yaml_text)

self.cmd(f'containerapp update -n {app} -g {resource_group} --yaml {containerapp_file_name}', checks=[
JMESPathCheck("properties.provisioningState", "Succeeded"),
JMESPathCheck("properties.configuration.ingress.external", False),
JMESPathCheck("properties.configuration.ingress.additionalPortMappings[0].external", False),
JMESPathCheck("properties.configuration.ingress.additionalPortMappings[0].targetPort", 321),
JMESPathCheck("properties.configuration.ingress.additionalPortMappings[1].external", False),
JMESPathCheck("properties.configuration.ingress.additionalPortMappings[1].targetPort", 8080),
JMESPathCheck("properties.configuration.ingress.additionalPortMappings[1].exposedPort", 1234),
])
clean_up_test_file(containerapp_file_name)

@AllowLargeResponse(8192)
Expand Down