-
Notifications
You must be signed in to change notification settings - Fork 96
CNTRLPLANE-3423: feat: inject centralized TLS into service-ca operand #365
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
Merged
openshift-merge-bot
merged 2 commits into
openshift:main
from
ingvagabund:tls-injection-to-service-ca
Jul 24, 2026
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| namespace: openshift-service-ca | ||
| name: service-ca-controller-config | ||
| data: | ||
| controller-config.yaml: | | ||
| apiVersion: operator.openshift.io/v1alpha1 | ||
| kind: GenericOperatorConfig |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
pkg/operator/configobservation/configobserver_controller.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| package configobservation | ||
|
|
||
| import ( | ||
| "k8s.io/client-go/tools/cache" | ||
|
|
||
| configinformers "github.com/openshift/client-go/config/informers/externalversions" | ||
| configlistersv1 "github.com/openshift/client-go/config/listers/config/v1" | ||
| "github.com/openshift/library-go/pkg/controller/factory" | ||
| "github.com/openshift/library-go/pkg/operator/configobserver" | ||
| libgoapiserver "github.com/openshift/library-go/pkg/operator/configobserver/apiserver" | ||
| "github.com/openshift/library-go/pkg/operator/events" | ||
| "github.com/openshift/library-go/pkg/operator/resourcesynccontroller" | ||
| "github.com/openshift/library-go/pkg/operator/v1helpers" | ||
| ) | ||
|
|
||
| // Listers combines the required listers for config observation | ||
| type Listers struct { | ||
| apiServerLister configlistersv1.APIServerLister | ||
| resourceSyncer resourcesynccontroller.ResourceSyncer | ||
| cacheSyncs []cache.InformerSynced | ||
| } | ||
|
|
||
| // APIServerLister returns the APIServer lister | ||
| func (l Listers) APIServerLister() configlistersv1.APIServerLister { | ||
| return l.apiServerLister | ||
| } | ||
|
|
||
| // ResourceSyncer returns the resource syncer | ||
| func (l Listers) ResourceSyncer() resourcesynccontroller.ResourceSyncer { | ||
| return l.resourceSyncer | ||
| } | ||
|
|
||
| // PreRunHasSynced returns the cache sync functions | ||
| func (l Listers) PreRunHasSynced() []cache.InformerSynced { | ||
| return l.cacheSyncs | ||
| } | ||
|
|
||
| // NewConfigObserverController creates a config observer controller for service-ca-operator | ||
| func NewConfigObserverController( | ||
| operatorClient v1helpers.OperatorClient, | ||
| configInformer configinformers.SharedInformerFactory, | ||
| resourceSyncer resourcesynccontroller.ResourceSyncer, | ||
| eventRecorder events.Recorder, | ||
| ) factory.Controller { | ||
| informers := []factory.Informer{ | ||
| operatorClient.Informer(), | ||
| configInformer.Config().V1().APIServers().Informer(), | ||
| } | ||
|
|
||
| return configobserver.NewConfigObserver( | ||
| "service-ca", | ||
| operatorClient, | ||
| eventRecorder, | ||
| Listers{ | ||
| apiServerLister: configInformer.Config().V1().APIServers().Lister(), | ||
| resourceSyncer: resourceSyncer, | ||
| cacheSyncs: []cache.InformerSynced{ | ||
| operatorClient.Informer().HasSynced, | ||
| configInformer.Config().V1().APIServers().Informer().HasSynced, | ||
| }, | ||
| }, | ||
| informers, | ||
| libgoapiserver.ObserveTLSSecurityProfile, | ||
| ) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
vendor/github.com/openshift/library-go/pkg/operator/configobserver/apiserver/OWNERS
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
vendor/github.com/openshift/library-go/pkg/operator/configobserver/apiserver/listers.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
88 changes: 88 additions & 0 deletions
88
...or/github.com/openshift/library-go/pkg/operator/configobserver/apiserver/observe_audit.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift
Apply the required workload hardening controls.
This workload still lacks explicit
allowPrivilegeEscalation: false,readOnlyRootFilesystem: true,capabilities.drop: ["ALL"], CPU/memory limits, and liveness/readiness probes. Also setautomountServiceAccountToken: falseunless this controller requires in-cluster API credentials, and ensure its namespace has a restrictive NetworkPolicy.As per path instructions, Kubernetes workloads require these security controls, limits, probes, and least-privilege defaults.
🤖 Prompt for AI Agents
Source: Path instructions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not in the scope of the PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ingvagabundUnderstood—this hardening work is outside the scope of the centralized TLS configuration change. I’ll treat it as a follow-up rather than a blocker for this PR. Would you like me to open a GitHub issue to track it?