Skip to content

Conversation

@danehans
Copy link
Contributor

@danehans danehans commented Nov 5, 2025

What type of PR is this?

/kind feature
/area conformance-machinery

What this PR does / why we need it:

Optionally adds a response header for the listening port of the echo server.

Which issue(s) this PR fixes:

Fixes #4229

Does this PR introduce a user-facing change?:

A user can add the `INCLUDE_HTTP_PORT_HEADER=true` env var in the echo server pod and it will include the HTTP listening port in the "X-Echo-HTTP-Port" response header.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. area/conformance-machinery Issues or PRs related to the machinery and the suite used to run conformance tests. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 5, 2025
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 5, 2025
Copy link
Member

@robscott robscott left a comment

Choose a reason for hiding this comment

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

Thanks @danehans!

writeEchoResponseHeaders(w, r.Header)
// Optionally advertise the http port this process is serving.
if advertisePortHeader {
w.Header().Set("X-Echo-HTTP-Port", httpPort)
Copy link
Member

Choose a reason for hiding this comment

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

Instead of a response header, why not put this in the JSON response body like most other attributes? (I don't have a strong preference here, just trying to understand).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I simply followed the pattern for echo'ing the pod ns, name, etc using headers. The latest commit adds the listening port to the response body, PTAL.

- Required to support JSON-based echo response validation.

Signed-off-by: Daneyon Hansen <[email protected]>
Copy link
Member

@robscott robscott left a comment

Choose a reason for hiding this comment

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

Thanks @danehans! Would appreciate another set of eyes on this in case I missed anything.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danehans, robscott

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

The pull request process is described here

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 6, 2025
@robscott
Copy link
Member

robscott commented Nov 6, 2025

/cc @rikatz @youngnick

@youngnick
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 6, 2025
@k8s-ci-robot k8s-ci-robot merged commit 079e477 into kubernetes-sigs:main Nov 6, 2025
20 checks passed
@danehans danehans deleted the issue_4229 branch November 6, 2025 16:51
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. area/conformance-machinery Issues or PRs related to the machinery and the suite used to run conformance tests. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Conformance: Add Port Support to Echo Server

4 participants