Skip to content

Refactor compliance check to respect overrides - #40

Merged
openshift-merge-bot[bot] merged 5 commits into
openshift:mainfrom
richardsonnick:compliance
Apr 16, 2026
Merged

openshift-merge-bot[bot] merged 5 commits into
openshift:mainfrom
richardsonnick:compliance

Conversation

@richardsonnick

@richardsonnick richardsonnick commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

The most recent Enhancement Proposal for TLS compliance specifies that all components should respect only the apiserver CRD unless:

  • It is an ingress component AND the ingress component CRD tlsProfile is not nil (overridden)
  • It is an kubelet component AND the kubelet component CRD tlsProfile is not nil (overridden)

I check the "component" type by process name for the ingress controller and by port for kubelet (10250 and 10255).

Unit tests have been added/updated to verify this behavior.

@openshift-ci
openshift-ci Bot requested review from rhmdnd and smith-xyz March 26, 2026 15:39
@openshift-ci

openshift-ci Bot commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: richardsonnick

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

The pull request process is described 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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 26, 2026
Adds a system for configuring component-specific TLS profile overrides.

This system applies the apiserver profile by default. This can be overridden
for components that have overrides available to them.

Adds a yaml file for setting component-specific TLS profile overrides.

Adds policy_test.go for testing the policy system.
Comment thread internal/scanner/compliance.go
Comment thread internal/scanner/compliance.go
Comment thread internal/k8s/tls.go
return nil, fmt.Errorf("failed to list KubeletConfigs: %v", err)
}

for _, kc := range kubeletConfigs.Items {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

might be a convention of openshift - just thinking that MachineConfigPools can apply to the workers or the control plane or worker pools. This might mismatch if we do a ip/port look and just get the first we find.

Comment thread internal/scanner/policy.go
Comment thread internal/scanner/policy.go
@smith-xyz

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Apr 16, 2026
@openshift-ci

openshift-ci Bot commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

@richardsonnick: 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.

@openshift-merge-bot
openshift-merge-bot Bot merged commit 16a1991 into openshift:main Apr 16, 2026
5 checks passed
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. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants