Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ public static IResourceBuilder<AzureAppServiceEnvironmentResource> AddAzureAppSe
{
Sku = new AppServiceSkuDescription
{
Name = "B1",
Tier = "Basic"
Name = "P0V3",
Tier = "Premium"
Comment on lines +87 to +88
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm having second thoughts about this one.

},
Kind = "Linux",
IsReserved = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public void BuildWebSite(AzureResourceInfrastructure infra)
AppServicePlanId = appServicePlanParameter,
SiteConfig = new SiteConfigProperties()
{
LinuxFxVersion = BicepFunction.Interpolate($"DOCKER|{containerImage}"),
LinuxFxVersion = "SITECONTAINERS",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confused by this change. Why do we need sidecars? Or is this just the new way of using containers?

Copy link

@btardif btardif May 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes this is what we want to do going fwd instead of overloading the linuxFX version. There is no sidecar being configured here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the port hardcoded to 8080?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed setting the port as it is inferred by the platform. Validated with the changes in fork code

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this need to be set to the internal port of the http endpoint?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When TargetPort is not specified, our container orchestrator can infer the exposed PORT in the container image and use it for serving the http traffic. So, explicitly mentioning TargetPort is not required.

AcrUserManagedIdentityId = acrClientIdParameter,
UseManagedIdentityCreds = true,
AppSettings = []
Expand All @@ -226,6 +226,19 @@ public void BuildWebSite(AzureResourceInfrastructure infra)
},
};

var mainContainer = new SiteContainer("mainContainer")
{
Parent = webSite,
Name = "main",
Image = containerImage,
TargetPort = "8080",
AuthType = SiteContainerAuthType.UserAssigned,
UserManagedIdentityClientId = acrClientIdParameter,
IsMain = true
};

infra.Add(mainContainer);

foreach (var kv in EnvironmentVariables)
{
var (val, secretType) = ProcessValue(kv.Value);
Expand Down