-
Notifications
You must be signed in to change notification settings - Fork 233
WIP: Inject tls policy results #3151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Add reusable infrastructure for reading and watching OpenShift's APIServer TLS security profile configuration: - tlsprofile.go: Functions to fetch TLS config from APIServer and convert OpenSSL cipher names to IANA format. Includes TLS 1.3 cipher support copied from library-go (see TODO comments for future cleanup). - apiserver_watch.go: Generic watch mechanism that triggers component reconciliation when cluster TLS policy changes. - lister_adapters.go: Generic adapter using Go generics to convert typed listers to ResourceLister interface for all Tekton component types. - RBAC: Added permissions to read apiservers.config.openshift.io Note: TLS cipher conversion functions are copied from library-go to include TLS 1.3 support without requiring dependency upgrades that conflict with current k8s versions. These should be replaced with library-go imports once Tekton components upgrade to k8s 0.34+.
Activate the TLS profile infrastructure for the Results component: - extension.go: Add injectTLSConfig transformer that injects TLS_MIN_VERSION and TLS_CIPHER_SUITES env vars into the Results API deployment based on cluster APIServer configuration. TLS config is fetched once during Transformers() call, not per-resource. - controller.go: Set up APIServer watch to trigger reconciliation when the cluster TLS security profile changes. The Results API deployment will automatically pick up TLS configuration from the OpenShift APIServer resource and update when it changes.
81c9fa4 to
a2b6ec3
Compare
|
@enarha I've reviewed your implementation and wanted to share some feedback and an alternative approach I've been working on. All use library-go/pkg/operator/configobserver for exactly this purpose. However i think it is smart to use the env var approch rather than configmaps
|
Changes
The change include two commits. The first one adds generic TLS profiles centrally managed on the cluster level as OpenShift APIServer resources. It allows each Tekton component to use that functionality and set the TLS policy for their services.
The second change enables the centralized TLS profile for Tekton Results.
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
make test lintbefore submitting a PRSee the contribution guide for more details.
Release Notes