Skip to content

NO-ISSUE: Remove etc-pki-entitlement cruft #4812

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
merged 1 commit into from
Jan 29, 2025

Conversation

djoshy
Copy link
Contributor

@djoshy djoshy commented Jan 28, 2025

- What I did

  • Removed some old code that dealt with copy etc-pki-entitlement secrets. This is now handled by the operator in MCO-1437: MCO-1476: MCO-1477: MCO-1284: Adapt MCO to OCL v1 API #4756 which merged recently.
  • Fixed a couple of places where old "PodImageBuilder" was being assigned to ImageBuilderType. This isn't used anywhere in the controller, so it didn't break anything, but we should clean this up.

- How to verify it
Existing e2es should pass. QE testing shouldn't be needed since this is just removing test/devex code.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 28, 2025
@openshift-ci-robot
Copy link
Contributor

@djoshy: This pull request explicitly references no jira issue.

In response to this:

- What I did
Removed some old code that dealt with copy etc-pki-entitlement secrets. This is now handled by the operator in #4756 which merged recently.

- How to verify it
Existing e2es should pass. QE testing shouldn't be needed since this is just removing test/devex code.

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 28, 2025
@djoshy djoshy force-pushed the remove-entitled-copy branch 2 times, most recently from 5b96720 to ac13ed6 Compare January 28, 2025 16:39
Copy link
Member

@cheesesashimi cheesesashimi left a comment

Choose a reason for hiding this comment

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

Looks mostly good! Just a few minor questions and comments 😄

@@ -26,7 +26,7 @@ func NewMachineOSConfigBuilder(name string) *MachineOSConfigBuilder {

Containerfile: []mcfgv1.MachineOSContainerfile{},
ImageBuilder: mcfgv1.MachineOSImageBuilder{
ImageBuilderType: mcfgv1.MachineOSImageBuilderType("PodImageBuilder"),
ImageBuilderType: mcfgv1.JobBuilder,
Copy link
Member

Choose a reason for hiding this comment

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

issue: This broke the TestMachineOSBuild unit tests since the ImageBuilderType field is taken into account when the hashed MachineOSBuild name is created.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahhh of course 😅 Will fix on next pass!


if k8serrors.IsNotFound(err) {
t.Logf("Secret %q not found in %q, skipping test", src.Name, src.Namespace)
t.Skip()
Copy link
Member

Choose a reason for hiding this comment

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

thought: I feel like we might still want to skip the test if we know it will fail due to a missing entitlement. I suppose now it would look for our clone in the MCO namespace as opposed to the original in the openshift-config-managed namespace. Instead, we can make the useEtcPkiEntitlement check be something like, entitlementRequired.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done! I also made a small helper to skip if the secret is not present in openshift-config-managed, since the copy only happens after a MachineOSConfig is created. By doing this check, we can potentially test the copy mechanism as part of the e2e too, as the build would eventually fail if the copy doesn't exist.

@@ -39,32 +39,6 @@ func copyGlobalPullSecret(cs *framework.ClientSet) error {
return utils.CloneSecretWithLabels(cs, src, dst, labels)
}

func copyEtcPkiEntitlementSecret(cs *framework.ClientSet) error {
Copy link
Member

Choose a reason for hiding this comment

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

praise: I'm glad to see this go!

@djoshy djoshy force-pushed the remove-entitled-copy branch from ac13ed6 to 4a615ec Compare January 28, 2025 18:20
@djoshy
Copy link
Contributor Author

djoshy commented Jan 28, 2025

Fixed the above issues, I also noticed an unused helper cloneSecret snuck through, so I cleaned that up too.

@cheesesashimi
Copy link
Member

/test e2e-hypershift

Copy link
Contributor

openshift-ci bot commented Jan 29, 2025

@djoshy: The following tests 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/e2e-vsphere-ovn-zones 4a615ec link false /test e2e-vsphere-ovn-zones
ci/prow/e2e-vsphere-ovn-upi 4a615ec link false /test e2e-vsphere-ovn-upi
ci/prow/okd-scos-e2e-aws-ovn 4a615ec link false /test okd-scos-e2e-aws-ovn
ci/prow/e2e-azure-ovn-upgrade-out-of-change 4a615ec link false /test e2e-azure-ovn-upgrade-out-of-change

Full PR test history. Your PR dashboard.

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.

@cheesesashimi
Copy link
Member

/lgtm
/approval

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 29, 2025
Copy link
Contributor

openshift-ci bot commented Jan 29, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheesesashimi, djoshy

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [cheesesashimi,djoshy]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@djoshy
Copy link
Contributor Author

djoshy commented Jan 29, 2025

/label acknowledge-critical-fixes-only

should not affect payloads, its an e2e/devex change

@openshift-ci openshift-ci bot added the acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. label Jan 29, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit ca35403 into openshift:master Jan 29, 2025
16 of 20 checks passed
@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: ose-machine-config-operator
This PR has been included in build ose-machine-config-operator-container-v4.19.0-202501300237.p0.gca35403.assembly.stream.el9.
All builds following this will include this PR.

@djoshy djoshy deleted the remove-entitled-copy branch January 31, 2025 19:19
cheesesashimi pushed a commit to cheesesashimi/machine-config-operator that referenced this pull request May 1, 2025
NO-ISSUE: Remove etc-pki-entitlement cruft
cheesesashimi pushed a commit to cheesesashimi/machine-config-operator that referenced this pull request May 21, 2025
NO-ISSUE: Remove etc-pki-entitlement cruft
cheesesashimi pushed a commit to cheesesashimi/machine-config-operator that referenced this pull request May 22, 2025
NO-ISSUE: Remove etc-pki-entitlement cruft
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. approved Indicates a PR has been approved by an approver from all required OWNERS files. 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.

4 participants