Skip to content

feat: add shared tls package for reading TLS config from environment#3324

Open
Fedosin wants to merge 1 commit intoknative:mainfrom
Fedosin:tls-opts
Open

feat: add shared tls package for reading TLS config from environment#3324
Fedosin wants to merge 1 commit intoknative:mainfrom
Fedosin:tls-opts

Conversation

@Fedosin
Copy link

@Fedosin Fedosin commented Feb 27, 2026

Changes

Extract TLS configuration parsing into a reusable knative.dev/pkg/tls package so that any Knative component (not just webhooks) can read TLS_MIN_VERSION, TLS_MAX_VERSION, TLS_CIPHER_SUITES, and TLS_CURVE_PREFERENCES from environment variables with an optional prefix.

The webhook package is updated to use the new tls package, extending env var support from just WEBHOOK_TLS_MIN_VERSION to all four WEBHOOK_TLS_* variables. Programmatic Options values continue to take precedence over environment variables.

/kind enhancement

Fixes #

Release Note

Add new `knative.dev/pkg/tls` package for shared TLS configuration. Webhook now supports `WEBHOOK_TLS_MAX_VERSION`, `WEBHOOK_TLS_CIPHER_SUITES`, and `WEBHOOK_TLS_CURVE_PREFERENCES` environment variables in addition to the existing `WEBHOOK_TLS_MIN_VERSION`.

Docs


@knative-prow knative-prow bot requested review from Cali0707 and skonto February 27, 2026 09:37
@knative-prow knative-prow bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Feb 27, 2026
@knative-prow
Copy link

knative-prow bot commented Feb 27, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Fedosin
Once this PR has been reviewed and has the lgtm label, please assign dsimansk 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

@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.89%. Comparing base (b239e96) to head (1723d0e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3324      +/-   ##
==========================================
+ Coverage   74.63%   74.89%   +0.26%     
==========================================
  Files         188      189       +1     
  Lines        8219     8297      +78     
==========================================
+ Hits         6134     6214      +80     
+ Misses       1844     1843       -1     
+ Partials      241      240       -1     

☔ 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 Fedosin force-pushed the tls-opts branch 5 times, most recently from 62d1981 to 554c259 Compare February 27, 2026 11:26
Extract TLS configuration parsing into a reusable knative.dev/pkg/tls
package so that any Knative component (not just webhooks) can read
TLS_MIN_VERSION, TLS_MAX_VERSION, TLS_CIPHER_SUITES, and
TLS_CURVE_PREFERENCES from environment variables with an optional prefix.

The webhook package is updated to use the new tls package, extending env
var support from just WEBHOOK_TLS_MIN_VERSION to all four WEBHOOK_TLS_*
variables. Programmatic Options values continue to take precedence over
environment variables.

Signed-off-by: Mikhail Fedosin <mfedosin@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant