From fc7a6fed307e1d58d524f48b4426b6d6fe6468f8 Mon Sep 17 00:00:00 2001 From: Musa Misto <64855513+MusaMisto@users.noreply.github.com> Date: Mon, 31 Aug 2026 15:36:38 +0300 Subject: [PATCH] fix(build): pin the .NET 8 image back to port 80 Regression from the .NET 8 base-image bump (#127). The runtime images changed their default listening port between majors: aspnet:6.0 ASPNETCORE_URLS=http://+:80 -> listens on 80 aspnet:8.0 ASPNETCORE_HTTP_PORTS=8080 -> listens on 8080 The chart hardcodes containerPort 80 and the Service targets the named "http" port, so after the bump the app listened on 8080, the Service had no reachable endpoint, and the gateway answered 503 from envoy. It failed silently: the chart ships probes.enabled=false, so with no readiness probe the pod still reported 1/1 Ready while serving nothing. Deployment, Service, EndpointSlice, HTTPRoute and TLS all looked correct -- only an actual request over the wire showed it. Setting ASPNETCORE_HTTP_PORTS=80 restores the 6.0 behaviour exactly, so the chart, the Service and all six releases keep working with no chart change. It stays overridable per-deployment. Verified A/B against a real PostgreSQL, no port env override, exactly as the cluster runs them: ghcr.io/simplify9/mtm:8.0.2 curl :80 -> connection reset (nothing bound) this build curl :80 -> HTTP 404 (app responding) Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01VHkpqv6dB6wjALyFe9ocMU --- Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Dockerfile b/Dockerfile index 53bd3bd..ad55fb9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,13 @@ FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base WORKDIR /app +# .NET 8 runtime images changed the default listening port from 80 to 8080 +# (aspnet:6.0 shipped ASPNETCORE_URLS=http://+:80, aspnet:8.0 ships +# ASPNETCORE_HTTP_PORTS=8080). The Helm chart hardcodes containerPort 80 and +# the Service targets the named "http" port, so without this the app listens +# on 8080, the Service has no reachable endpoint and the gateway returns 503 +# -- silently, because the chart ships probes.enabled=false so the pod still +# reports Ready. Pin the port back to 80 to match the chart and the 6.0 image. +ENV ASPNETCORE_HTTP_PORTS=80 EXPOSE 80 EXPOSE 443