Skip to content

Allow custom ports for the primary container's livenessProbe#16572

Merged
knative-prow[bot] merged 1 commit intoknative:mainfrom
Fedosin:custom-container-ports
Apr 25, 2026
Merged

Allow custom ports for the primary container's livenessProbe#16572
knative-prow[bot] merged 1 commit intoknative:mainfrom
Fedosin:custom-container-ports

Conversation

@Fedosin
Copy link
Copy Markdown
Contributor

@Fedosin Fedosin commented Apr 23, 2026

Proposed Changes

  • When the multi-container-probing feature flag is enabled, the reconciler now preserves user-specified custom ports on the primary container's HTTP and TCP liveness probes instead of unconditionally overwriting them to the serving containerPort.
  • This supports applications (e.g. Spring Boot Actuator) that expose health endpoints on a separate management port (e.g. 8081), which previously entered a crash loop because the probe was forced to hit the serving port where no health endpoint existed.
  • When the flag is disabled (default), existing strict port-rewriting behavior is preserved — no change for current users.

Release Note

When the `multi-container-probing` feature flag is enabled, user-specified custom ports on the primary container's `livenessProbe` are now respected instead of being overwritten to the serving container port.

…enabled

When the multi-container-probing feature flag is enabled, the reconciler
now preserves user-specified custom ports on the primary container's
HTTP and TCP liveness probes instead of overwriting them to the serving
containerPort. This supports applications (e.g. Spring Boot Actuator)
that expose health endpoints on a separate management port.

When the flag is disabled (default), existing strict behavior is
preserved.

Signed-off-by: Mikhail Fedosin <mfedosin@redhat.com>
@knative-prow knative-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 23, 2026
@knative-prow knative-prow Bot requested review from dsimansk and skonto April 23, 2026 13:33
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.32%. Comparing base (7c94473) to head (ace4673).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16572      +/-   ##
==========================================
- Coverage   80.36%   80.32%   -0.05%     
==========================================
  Files         217      217              
  Lines       17305    17310       +5     
==========================================
- Hits        13907    13904       -3     
- Misses       3035     3043       +8     
  Partials      363      363              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Fedosin
Copy link
Copy Markdown
Contributor Author

Fedosin commented Apr 23, 2026

/test istio-latest-no-mesh

1 similar comment
@Fedosin
Copy link
Copy Markdown
Contributor Author

Fedosin commented Apr 24, 2026

/test istio-latest-no-mesh

@dsimansk
Copy link
Copy Markdown
Contributor

/approve
/lgtm

@knative-prow knative-prow Bot added the lgtm Indicates that a PR is ready to be merged. label Apr 25, 2026
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented Apr 25, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dsimansk, Fedosin

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 25, 2026
@knative-prow knative-prow Bot merged commit b85cf85 into knative:main Apr 25, 2026
70 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants