Skip to content

[release-4.16] OCPBUGS-55697: Add validation to avoid conflicts between KubeAPIServer and NamedCertificates SANs - #6114

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:release-4.16from
jparrill:OCPBUGS-54483-4-16
Jun 5, 2025
Merged

[release-4.16] OCPBUGS-55697: Add validation to avoid conflicts between KubeAPIServer and NamedCertificates SANs#6114
openshift-merge-bot[bot] merged 1 commit into
openshift:release-4.16from
jparrill:OCPBUGS-54483-4-16

Conversation

@jparrill

@jparrill jparrill commented May 5, 2025

Copy link
Copy Markdown
Contributor

@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 May 5, 2025
@openshift-ci-robot

openshift-ci-robot commented May 5, 2025

Copy link
Copy Markdown

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

  • expected dependent Jira Issue OCPBUGS-55500 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is ON_QA instead

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.16.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
openshift-ci Bot requested review from enxebre and isco-rodriguez May 5, 2025 10:10
@openshift-ci openshift-ci Bot added 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 labels May 5, 2025
@openshift-ci

openshift-ci Bot commented May 5, 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/testing Indicates the PR includes changes for e2e testing approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed do-not-merge/needs-area labels May 5, 2025
@openshift-ci-robot

openshift-ci-robot commented May 5, 2025

Copy link
Copy Markdown

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

  • expected dependent Jira Issue OCPBUGS-55500 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is ON_QA instead

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.16.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 commented May 5, 2025

Copy link
Copy Markdown
Contributor Author

Looking at the log error:

GO111MODULE=on GOFLAGS=-mod=vendor go test -race -count=25 -timeout=30m ./... -coverprofile cover.out
go: go.mod requires go >= 1.22.1 (running go 1.21.13; GOTOOLCHAIN=local)
make: *** [Makefile:171: test] Error 1
{"component":"entrypoint","error":"wrapped process failed: exit status 2","file":"sigs.k8s.io/prow/pkg/entrypoint/run.go:84","func":"sigs.k8s.io/prow/pkg/entrypoint.Options.internalRun","level":"error","msg":"Error executing test process","severity":"error","time":"2025-05-05T10:18:25Z"} 

We need to move the Golang version (of 4.16, 4.15 and 4.14) to >= 1.22.1 in order to continue with this backport to all way long to release-4.14.

@sjenning WDYT?

Comment thread go.mod
@jparrill
jparrill force-pushed the OCPBUGS-54483-4-16 branch from 4c3d13f to 7cd7560 Compare May 6, 2025 07:45
@jparrill

jparrill commented May 6, 2025

Copy link
Copy Markdown
Contributor Author

Looking at the log error:

GO111MODULE=on GOFLAGS=-mod=vendor go test -race -count=25 -timeout=30m ./... -coverprofile cover.out
go: go.mod requires go >= 1.22.1 (running go 1.21.13; GOTOOLCHAIN=local)
make: *** [Makefile:171: test] Error 1
{"component":"entrypoint","error":"wrapped process failed: exit status 2","file":"sigs.k8s.io/prow/pkg/entrypoint/run.go:84","func":"sigs.k8s.io/prow/pkg/entrypoint.Options.internalRun","level":"error","msg":"Error executing test process","severity":"error","time":"2025-05-05T10:18:25Z"} 

We need to move the Golang version (of 4.16, 4.15 and 4.14) to >= 1.22.1 in order to continue with this backport to all way long to release-4.14.

@sjenning WDYT?

nvm, looks like there was an issue in my local with cache. All ok now

@openshift-ci-robot

Copy link
Copy Markdown

@jparrill: An error was encountered updating to the POST state for bug OCPBUGS-55697 on the Jira server at https://issues.redhat.com/. No known errors were detected, please see the full error message for details.

Full error message. No response returned: Post "https://issues.redhat.com/rest/api/2/issue/16873217/transitions": POST https://issues.redhat.com/rest/api/2/issue/16873217/transitions giving up after 5 attempt(s)

Please contact an administrator to resolve this issue, then request a bug refresh with /jira refresh.

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.

@enxebre

enxebre commented May 6, 2025

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 6, 2025
@jparrill

jparrill commented May 6, 2025

Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@jparrill

jparrill commented May 6, 2025

Copy link
Copy Markdown
Contributor Author

/retest

@jparrill

jparrill commented May 6, 2025

Copy link
Copy Markdown
Contributor Author

/test e2e-aws

@jparrill

jparrill commented May 7, 2025

Copy link
Copy Markdown
Contributor Author

/retest

@celebdor

celebdor commented May 7, 2025

Copy link
Copy Markdown
Collaborator

/retitle [release-4.16] OCPBUGS-55697: Add validation to avoid conflicts between KubeAPIServer and NamedCertificates SANs

@openshift-ci openshift-ci Bot changed the title [release-4.16] OCPBUGS-55697, RHOCPPRIO-433: Add validation to avoid conflicts between KubeAPIServer and NamedCertificates SANs [release-4.16] OCPBUGS-55697: Add validation to avoid conflicts between KubeAPIServer and NamedCertificates SANs May 7, 2025
@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label May 7, 2025
@openshift-ci-robot

Copy link
Copy Markdown

@jparrill: This pull request references Jira Issue OCPBUGS-55697, 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.16.z) matches configured target version for branch (4.16.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-55500 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-55500 targets the "4.17.z" version, which is one of the valid target versions: 4.17.0, 4.17.z
  • 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.

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 removed the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label May 7, 2025
@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD 5f7e4aa and 2 for PR HEAD 7cd7560 in total

10 similar comments
@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD 5f7e4aa and 2 for PR HEAD 7cd7560 in total

@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD 5f7e4aa and 2 for PR HEAD 7cd7560 in total

@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD 5f7e4aa and 2 for PR HEAD 7cd7560 in total

@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD 5f7e4aa and 2 for PR HEAD 7cd7560 in total

@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD 5f7e4aa and 2 for PR HEAD 7cd7560 in total

@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD 5f7e4aa and 2 for PR HEAD 7cd7560 in total

@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD 5f7e4aa and 2 for PR HEAD 7cd7560 in total

@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD 5f7e4aa and 2 for PR HEAD 7cd7560 in total

@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD 5f7e4aa and 2 for PR HEAD 7cd7560 in total

@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD 5f7e4aa and 2 for PR HEAD 7cd7560 in total

…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>
@jparrill
jparrill force-pushed the OCPBUGS-54483-4-16 branch from 7cd7560 to e2a2085 Compare June 4, 2025 12:44
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 4, 2025
@openshift-ci

openshift-ci Bot commented Jun 4, 2025

Copy link
Copy Markdown
Contributor

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

@sdminonne

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 5, 2025
@openshift-merge-bot
openshift-merge-bot Bot merged commit d889674 into openshift:release-4.16 Jun 5, 2025
@openshift-ci-robot

Copy link
Copy Markdown

@jparrill: An error was encountered updating to the MODIFIED state for bug OCPBUGS-55697 on the Jira server at https://issues.redhat.com/. No known errors were detected, please see the full error message for details.

Full error message. No response returned: Post "https://issues.redhat.com/rest/api/2/issue/OCPBUGS-55697/transitions": POST https://issues.redhat.com/rest/api/2/issue/OCPBUGS-55697/transitions giving up after 5 attempt(s)

Please contact an administrator to resolve this issue, then request a bug refresh with /jira refresh.

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.16.0-202506051004.p0.gd889674.assembly.stream.el9.
All builds following this will include this PR.

@jparrill

jparrill commented Jun 5, 2025

Copy link
Copy Markdown
Contributor Author

/jira backport release-4.15

@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.15

Details

In response to this:

/jira backport release-4.15

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: #6114 failed to apply on top of branch "release-4.15":

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
M	go.sum
M	hypershift-operator/controllers/hostedcluster/hostedcluster_controller.go
M	vendor/modules.txt
Falling back to patching base and 3-way merge...
Auto-merging vendor/modules.txt
Auto-merging hypershift-operator/controllers/hostedcluster/hostedcluster_controller.go
Auto-merging go.sum
CONFLICT (content): Merge conflict in go.sum
Auto-merging go.mod
CONFLICT (content): Merge conflict in 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.15

In response to this:

/jira backport release-4.15

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.

csrwng added a commit to csrwng/hypershift-1 that referenced this pull request Jul 8, 2025
PR openshift#6114 backported code that did not include the service network DNS entries for the kube apiserver. This was ok in releases 4.17 and newer because in those releases a separate certificate is created to serve those service network DNS entries. However in 4.16 and older, there is only one serving certificate for the kube apiserver. This resulted in clients like ACM failing to communicate with the kube apiserver because they use the service network endpoint to install the klusterlet in the hosted cluster. This fix adds the missing entries back into the dns names of the KAS serving certificate.
csrwng added a commit to csrwng/hypershift-1 that referenced this pull request Jul 8, 2025
PR openshift#6114 backported code that did not include the service network DNS entries for the kube apiserver. This was ok in releases 4.17 and newer because in those releases a separate certificate is created to serve those service network DNS entries. However in 4.16 and older, there is only one serving certificate for the kube apiserver. This resulted in clients like ACM failing to communicate with the kube apiserver because they use the service network endpoint to install the klusterlet in the hosted cluster. This fix adds the missing entries back into the dns names of the KAS serving certificate.
openshift-cherrypick-robot pushed a commit to openshift-cherrypick-robot/hypershift that referenced this pull request Sep 2, 2025
PR openshift#6114 backported code that did not include the service network DNS entries for the kube apiserver. This was ok in releases 4.17 and newer because in those releases a separate certificate is created to serve those service network DNS entries. However in 4.16 and older, there is only one serving certificate for the kube apiserver. This resulted in clients like ACM failing to communicate with the kube apiserver because they use the service network endpoint to install the klusterlet in the hosted cluster. This fix adds the missing entries back into the dns names of the KAS serving certificate.
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/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.

8 participants