Skip to content

OCPBUGS-54946, RHOCPPRIO-433: Add validation to avoid conflicts between KubeAPIServer and NamedCertificates SANs - #6091

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:release-4.18from
jparrill:OCPBUGS-54946
Apr 28, 2025
Merged

OCPBUGS-54946, RHOCPPRIO-433: Add validation to avoid conflicts between KubeAPIServer and NamedCertificates SANs#6091
openshift-merge-bot[bot] merged 1 commit into
openshift:release-4.18from
jparrill:OCPBUGS-54946

Conversation

@jparrill

@jparrill jparrill commented Apr 28, 2025

Copy link
Copy Markdown
Contributor

What this PR does / why we need it

Which issue(s) this PR fixes

…r and NamedCertificates SANs

This PR adds validation to ensure there are no conflicts between the SAN's of the user's APIServer NamedCertificates and the KubeAPIServer CPO certificates. This prevents potential issues with certificate SANs conflicts that could break the TLS trust chain between the nodes and the KAS

Signed-off-by: Juan Manuel Parrilla Madrid <jparrill@redhat.com>
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Apr 28, 2025
@openshift-ci-robot

Copy link
Copy Markdown

@jparrill: This pull request references Jira Issue OCPBUGS-53261, which is invalid:

  • expected the bug to target either version "4.18." or "openshift-4.18.", but it targets "4.19.0" instead
  • expected the bug to be in one of the following states: NEW, ASSIGNED, POST, but it is Verified instead
  • expected Jira Issue OCPBUGS-53261 to depend on a bug targeting a version in 4.19.0 and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

What this PR does / why we need it

Which issue(s) this PR fixes

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot added area/ci-tooling Indicates the PR includes changes for CI or tooling area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release labels Apr 28, 2025
@openshift-ci

openshift-ci Bot commented Apr 28, 2025

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jparrill

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 area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release approved Indicates a PR has been approved by an approver from all required OWNERS files. area/testing Indicates the PR includes changes for e2e testing and removed do-not-merge/needs-area labels Apr 28, 2025
@jparrill jparrill changed the title OCPBUGS-53261: Add validation to avoid conflicts between KubeAPIServer and NamedCertificates SANs OCPBUGS-53261, RHOCPPRIO-433: Add validation to avoid conflicts between KubeAPIServer and NamedCertificates SANs Apr 28, 2025
@openshift-ci-robot

openshift-ci-robot commented Apr 28, 2025

Copy link
Copy Markdown

@jparrill: This pull request references Jira Issue OCPBUGS-53261, which is invalid:

  • expected the bug to target either version "4.18." or "openshift-4.18.", but it targets "4.19.0" instead
  • expected the bug to be in one of the following states: NEW, ASSIGNED, POST, but it is Verified instead
  • expected Jira Issue OCPBUGS-53261 to depend on a bug targeting a version in 4.19.0 and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

This pull request references RHOCPPRIO-433 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.18.z" version, but no target version was set.

Details

In response to this:

What this PR does / why we need it

Which issue(s) this PR fixes

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot

openshift-ci-robot commented Apr 28, 2025

Copy link
Copy Markdown

@jparrill: This pull request references Jira Issue OCPBUGS-53261, which is invalid:

  • expected the bug to target either version "4.18." or "openshift-4.18.", but it targets "4.19.0" instead
  • expected the bug to be in one of the following states: NEW, ASSIGNED, POST, but it is Verified instead
  • expected Jira Issue OCPBUGS-53261 to depend on a bug targeting a version in 4.19.0 and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

This pull request references RHOCPPRIO-433 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.18.z" version, but no target version was set.

Details

In response to this:

What this PR does / why we need it

Which issue(s) this PR fixes

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 openshift-eng/jira-lifecycle-plugin repository.

@jparrill jparrill changed the title OCPBUGS-53261, RHOCPPRIO-433: Add validation to avoid conflicts between KubeAPIServer and NamedCertificates SANs OCPBUGS-54946, RHOCPPRIO-433: Add validation to avoid conflicts between KubeAPIServer and NamedCertificates SANs Apr 28, 2025
@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Apr 28, 2025
@openshift-ci-robot

openshift-ci-robot commented Apr 28, 2025

Copy link
Copy Markdown

@jparrill: This pull request references Jira Issue OCPBUGS-54946, which is valid. The bug has been moved to the POST state.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.18.z) matches configured target version for branch (4.18.z)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note text is set and does not match the template
  • dependent bug Jira Issue OCPBUGS-53261 is in the state Verified, which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-53261 targets the "4.19.0" version, which is one of the valid target versions: 4.19.0
  • bug has dependents

Requesting review from QA contact:
/cc @wewang58

The bug has been updated to refer to the pull request using the external bug tracker.

This pull request references RHOCPPRIO-433 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.18.z" version, but no target version was set.

Details

In response to this:

What this PR does / why we need it

Which issue(s) this PR fixes

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 openshift-eng/jira-lifecycle-plugin repository.

@jparrill

Copy link
Copy Markdown
Contributor Author

/jira-refresh

@openshift-ci
openshift-ci Bot requested a review from wewang58 April 28, 2025 08:01
@sjenning

Copy link
Copy Markdown
Contributor

Another unit test flake on external network request 😒

/test unit

@sjenning

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 28, 2025
@sjenning sjenning added backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. labels Apr 28, 2025
@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD c7d5828 and 2 for PR HEAD f789861 in total

@openshift-ci

openshift-ci Bot commented Apr 28, 2025

Copy link
Copy Markdown
Contributor

@jparrill: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/okd-scos-e2e-aws-ovn f789861 link false /test okd-scos-e2e-aws-ovn

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 8655acb into openshift:release-4.18 Apr 28, 2025
@openshift-ci-robot

Copy link
Copy Markdown

@jparrill: Jira Issue OCPBUGS-54946: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-54946 has been moved to the MODIFIED state.

Details

In response to this:

What this PR does / why we need it

Which issue(s) this PR fixes

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-bot

Copy link
Copy Markdown

[ART PR BUILD NOTIFIER]

Distgit: hypershift
This PR has been included in build ose-hypershift-container-v4.18.0-202504282205.p0.g8655acb.assembly.stream.el9.
All builds following this will include this PR.

@jparrill

Copy link
Copy Markdown
Contributor Author

/jira backport release-4.17

@openshift-ci-robot

Copy link
Copy Markdown

@jparrill: The following backport issues have been created:

Queuing cherrypicks to the requested branches to be created after this PR merges:
/cherrypick release-4.17

Details

In response to this:

/jira backport release-4.17

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-cherrypick-robot

Copy link
Copy Markdown

@openshift-ci-robot: #6091 failed to apply on top of branch "release-4.17":

Applying: OCPBUGS-53261: Add validation to avoid conflicts between KubeAPIServer and NamedCertificates SANs
Using index info to reconstruct a base tree...
M	control-plane-operator/controllers/hostedcontrolplane/pki/kas.go
M	go.mod
A	hack/workspace/go.work
M	hypershift-operator/controllers/hostedcluster/hostedcluster_controller.go
Falling back to patching base and 3-way merge...
Auto-merging hypershift-operator/controllers/hostedcluster/hostedcluster_controller.go
CONFLICT (content): Merge conflict in hypershift-operator/controllers/hostedcluster/hostedcluster_controller.go
CONFLICT (modify/delete): hack/workspace/go.work deleted in HEAD and modified in OCPBUGS-53261: Add validation to avoid conflicts between KubeAPIServer and NamedCertificates SANs. Version OCPBUGS-53261: Add validation to avoid conflicts between KubeAPIServer and NamedCertificates SANs of hack/workspace/go.work left in tree.
Auto-merging go.mod
Auto-merging control-plane-operator/controllers/hostedcontrolplane/pki/kas.go
CONFLICT (content): Merge conflict in control-plane-operator/controllers/hostedcontrolplane/pki/kas.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 OCPBUGS-53261: Add validation to avoid conflicts between KubeAPIServer and NamedCertificates SANs

Details

In response to this:

@jparrill: The following backport issues have been created:

Queuing cherrypicks to the requested branches to be created after this PR merges:
/cherrypick release-4.17

In response to this:

/jira backport release-4.17

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 openshift-eng/jira-lifecycle-plugin repository.

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.

eponafyrefly added a commit to eponafyrefly/hypershift that referenced this pull request Mar 10, 2026
  PR openshift#6091 introduced a CEL validation rule that checks if the APIServer
  loadBalancer hostname conflicts with namedCertificates. However, the
  validation directly accesses configuration.apiServer.servingCerts.namedCertificates
  without checking if the optional servingCerts field exists.

  This causes validation failures when patching HostedCluster resources
  that don't have the servingCerts field populated.

  Add has(self.configuration.apiServer.servingCerts) check before
  accessing namedCertificates to fix the regression.
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. area/ci-tooling Indicates the PR includes changes for CI or tooling area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release area/testing Indicates the PR includes changes for e2e testing backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants