Skip to content
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

containerapp: fix create or update containerapp --yaml exposedPort #6074

11 changes: 10 additions & 1 deletion src/containerapp/azext_containerapp/_sdk_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,7 @@ class Configuration(Model):
'ingress': {'key': 'ingress', 'type': 'Ingress'},
'dapr': {'key': 'dapr', 'type': 'Dapr'},
'registries': {'key': 'registries', 'type': '[RegistryCredentials]'},
'max_inactive_revisions': {'key': 'maxInactiveRevisions', 'type': 'int'},
}

def __init__(self, **kwargs):
Expand Down Expand Up @@ -1515,6 +1516,10 @@ class Dapr(Model):
'app_id': {'key': 'appId', 'type': 'str'},
'app_protocol': {'key': 'appProtocol', 'type': 'str'},
'app_port': {'key': 'appPort', 'type': 'int'},
'http_read_buffer_size': {'key': 'httpReadBufferSize', 'type': 'int'},
'http_max_request_size': {'key': 'httpMaxRequestSize', 'type': 'int'},
'log_level': {'key': 'logLevel', 'type': 'str'},
'enable_api_logging': {'key': 'enableApiLogging', 'type': 'bool'},
}

def __init__(self, **kwargs):
Expand Down Expand Up @@ -2096,11 +2101,14 @@ class Ingress(Model):
'fqdn': {'key': 'fqdn', 'type': 'str'},
'external': {'key': 'external', 'type': 'bool'},
'target_port': {'key': 'targetPort', 'type': 'int'},
'exposed_port': {'key': 'exposedPort', 'type': 'int'},
'transport': {'key': 'transport', 'type': 'str'},
'traffic': {'key': 'traffic', 'type': '[TrafficWeight]'},
'custom_domains': {'key': 'customDomains', 'type': '[CustomDomain]'},
'allow_insecure': {'key': 'allowInsecure', 'type': 'bool'},
'ipSecurityRestrictions': {'key': 'ipSecurityRestrictions', 'type': '[IPSecurityRestrictions]'},
'ip_security_restrictions': {'key': 'ipSecurityRestrictions', 'type': '[IPSecurityRestrictions]'},
'client_certificate_mode': {'key': 'clientCertificateMode', 'type': 'str'},
'cors_policy': {'key': 'corsPolicy', 'type': 'CorsPolicy'},
}

def __init__(self, **kwargs):
Expand Down Expand Up @@ -2697,6 +2705,7 @@ class RegistryCredentials(Model):
'server': {'key': 'server', 'type': 'str'},
'username': {'key': 'username', 'type': 'str'},
'password_secret_ref': {'key': 'passwordSecretRef', 'type': 'str'},
'identity': {'key': 'identity', 'type': 'str'},
}

def __init__(self, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion src/containerapp/azext_containerapp/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,7 @@ def update_managed_environment(cmd,
if logs_destination == "log-analytics":
safe_set(env_def, "properties", "appLogsConfiguration", "logAnalyticsConfiguration", "customerId", value=logs_customer_id)
safe_set(env_def, "properties", "appLogsConfiguration", "logAnalyticsConfiguration", "sharedKey", value=logs_key)
else:
elif logs_destination:
safe_set(env_def, "properties", "appLogsConfiguration", "logAnalyticsConfiguration", value=None)

# Custom domains
Expand Down
Loading