Skip to content

✨ controllercmd: add WithServingTLSConfig for programmatic TLS override on the health/metrics server#2149

Open
zhujian7 wants to merge 1 commit intoopenshift:masterfrom
zhujian7:add-serving-tls-config
Open

✨ controllercmd: add WithServingTLSConfig for programmatic TLS override on the health/metrics server#2149
zhujian7 wants to merge 1 commit intoopenshift:masterfrom
zhujian7:add-serving-tls-config

Conversation

@zhujian7
Copy link
Copy Markdown
Member

@zhujian7 zhujian7 commented Mar 27, 2026

Summary

  • Add ServingMinTLSVersion and ServingCipherSuites fields to ControllerCommandConfig with a chainable WithServingTLSConfig(minTLSVersion, cipherSuites) setter
  • In StartController(), apply these overrides to config.ServingInfo before builder.WithServer() so that SetRecommendedHTTPServingInfoDefaults (which uses DefaultString) does not clobber them
  • Lets callers enforce a minimum TLS version (e.g. VersionTLS13) or custom cipher suites on the 8443 health/metrics server

Related issue(s)

N/A

Testing

Added unit tests in pkg/controller/controllercmd/cmd_test.go covering:

  • WithServingTLSConfig sets fields correctly
  • Method chaining works
  • Overrides are applied to config.ServingInfo before defaults are set
  • No override leaves ServingInfo empty so defaults kick in normally

🤖 Generated with Claude Code

Add ServingMinTLSVersion and ServingCipherSuites fields to
ControllerCommandConfig, along with a chainable WithServingTLSConfig
setter. In StartController(), apply these overrides to
config.ServingInfo before passing it to builder.WithServer(), so that
SetRecommendedHTTPServingInfoDefaults (which uses DefaultString) does
not clobber them.

This lets callers enforce a minimum TLS version (e.g. VersionTLS13)
on the 8443 health/metrics server.

🤖 Generated with Claude Code

Signed-off-by: zhujian <jiazhu@redhat.com>
@openshift-ci openshift-ci bot requested review from deads2k and p0lyn0mial March 27, 2026 08:36
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 27, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: zhujian7
Once this PR has been reviewed and has the lgtm label, please assign bertinatto for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@zhujian7 zhujian7 force-pushed the add-serving-tls-config branch from ff8fbd2 to c6a5902 Compare March 27, 2026 08:36
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 27, 2026

@zhujian7: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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