Skip to content

fix(build): pin the .NET 8 image back to port 80 - #130

Merged
MusaMisto merged 1 commit into
mainfrom
fix/dotnet8-listen-port-80
Aug 31, 2026
Merged

fix(build): pin the .NET 8 image back to port 80#130
MusaMisto merged 1 commit into
mainfrom
fix/dotnet8-listen-port-80

Conversation

@MusaMisto

Copy link
Copy Markdown
Member

This is a regression from #127, and I introduced it

The .NET runtime images changed their default listening port between majors:

image default listens on
aspnet:6.0 ASPNETCORE_URLS=http://+:80 80
aspnet:8.0 ASPNETCORE_HTTP_PORTS=8080 8080

The chart hardcodes containerPort: 80 and the Service targets the named http port. So after the base-image bump the app listened on 8080, the Service had no reachable endpoint, and the gateway returned 503 from envoy.

Why it wasn't caught

It fails silently. The chart ships probes.enabled: false, so with no readiness probe the pod still reports 1/1 Ready while serving nothing. Every layer looked healthy:

deploy      image ghcr.io/simplify9/mtm:8.0.2   ready 1/1   restarts 0
svc         port=80 targetPort=http selector={app:mtm,release:mtm}   ✅ matches pod
endpoints   10.108.0.129 ready=true port=80                          ✅ present
httproute   Accepted=True ResolvedRefs=True                          ✅ attached
TLS         TLSverify=0                                              ✅ valid

Only an actual request over the wire revealed it — curl https://mtm.sf9.io/api503, server: envoy.

Fix

ENV ASPNETCORE_HTTP_PORTS=80 in the base stage. This restores the 6.0 behaviour exactly, so the chart, the Service and all six releases keep working with no chart change, and it remains overridable per-deployment.

The alternative — moving the chart's containerPort to 8080 — would break every deployment still running the 6.0.8 image, which listens on 80.

Verification

A/B against a real PostgreSQL, no port env override, exactly as the cluster runs them:

Image curl container :80
ghcr.io/simplify9/mtm:8.0.2 (deployed now) connection reset — nothing bound
this build HTTP 404 — app responding

Follow-up worth considering (not in this PR)

probes.enabled: false is why a completely unreachable pod reported Ready. Turning on a readiness probe would have caught this at deploy time and rolled the release back automatically, since the deploys run with --atomic.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VHkpqv6dB6wjALyFe9ocMU

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) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VHkpqv6dB6wjALyFe9ocMU
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 14 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: simplify9/coderabbit/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 203ee8ed-f7de-4276-bd51-4474bc1f0604

📥 Commits

Reviewing files that changed from the base of the PR and between 332b7dc and fc7a6fe.

📒 Files selected for processing (1)
  • Dockerfile

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@MusaMisto
MusaMisto merged commit ecb883e into main Aug 31, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant