Skip to content

Conversation

@andfasano
Copy link
Contributor

@andfasano andfasano commented Dec 10, 2025

- What I did
This patch uses the TLS cert generated by the installer (see openshift/installer#10147) for the InternalReleaseImage registry.
Also, the root CA, used to sign the IRI cert, is added to the trust store of all the nodes.

This patch also adds the OWNERS file for the InternalReleaseImage controller folder, managed by the agent team

- How to verify it
Add the InternalReleaseImage resource in the bootstrap manifests dir (/etc/mcc/bootstrap) and enable the NoRegistryClusterInstall feature gate.

- Description for the changelog
Add support for InternalReleaseImage resource

This patch injects the specific tls certificate generated by the installer into the IRI registry. It also adds the root CA certificate to all the master nodes, to allow pulling the images from other nodes registry
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Dec 10, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Dec 10, 2025

@andfasano: This pull request references AGENT-1391 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 story to target the "4.21.0" version, but no target version was set.

Details

In response to this:

- What I did
This patch uses the TLS cert generated by the installer (see openshift/installer#10147) for the InternalReleaseImage registry.
Also, the root CA, used to sign the IRI cert, is added to the trust store of all the nodes

- How to verify it
Add the InternalReleaseImage resource in the bootstrap manifests dir (/etc/mcc/bootstrap) and enable the NoRegistryClusterInstall feature gate.

- Description for the changelog
Add support for InternalReleaseImage resource

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.

@andfasano andfasano force-pushed the iri-tls-cert branch 2 times, most recently from 6e1c618 to eab86cb Compare December 10, 2025 18:57
reviewed bootstrap/controller logic to allow generation and management of multiple machine configs
members of the agent team
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Dec 11, 2025

@andfasano: This pull request references AGENT-1391 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 story to target the "4.21.0" version, but no target version was set.

Details

In response to this:

- What I did
This patch uses the TLS cert generated by the installer (see openshift/installer#10147) for the InternalReleaseImage registry.
Also, the root CA, used to sign the IRI cert, is added to the trust store of all the nodes.

This patch also adds the OWNERS file for the InternalReleaseImage controller folder, managed by the agent team

- How to verify it
Add the InternalReleaseImage resource in the bootstrap manifests dir (/etc/mcc/bootstrap) and enable the NoRegistryClusterInstall feature gate.

- Description for the changelog
Add support for InternalReleaseImage resource

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, so, the CA wasn't distributed to workers? Strange... but makes sense, as I see the regular, non-bootstrap, MCS doesn't append the certicates as part of the ignition config. If so, maybe that's because we are already distributing them as part of the other MCs for worker pools?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Neither to masters AFAICS.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah yes, we removed this being distributed to nodes since it is essentially non functional once the node joins the cluster; and we did not want future rotations to cause an MC rollout. The rootCA is distributed via user-data-secret and not actually written/managed via MachineConfigs. I think adding it back makes sense here; although perhaps you could throw root-ca in templates/common? Perhaps we should move it to cert_writer as a follow-up, I can see this causing unexpected reboots during upgrades to releases with this PR?(or add a node disruption policy for these files too?) Thoughts, @yuqi-zhang?

ref: #4600 and https://issues.redhat.com/browse/MCO-1323

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: the 4.21 release for this feature (NoRegistryClusterInstall) will be a TP, so no upgrades will be involved

Copy link
Contributor

Choose a reason for hiding this comment

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

Out of curiosity, how often does this get rotated? I do agree that this should probably live in the cert rotation path, but since this is only used for IRI enabled clusters (which should be a very small percentage) maybe we're ok with that being a nodedisruptionpolicy

client: mcfgClient,

client: mcfgClient,
kubeClient: kubeClient,
Copy link
Contributor

Choose a reason for hiding this comment

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

We try to avoid using the client and use listers.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Any specific reason (ie caching) - I suppose you're referring mainly to resource fetching? Consider that the activity for this controller is pretty limited, looking for very few resources. IIRC also the testing was easier with the regular fake clients, though.

Copy link
Contributor

Choose a reason for hiding this comment

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

There are some API limits in the openshift tests that catch controllers making too many client resource requests. I don't think you'd hit those, but maybe we can make a followup improvement for this

@@ -0,0 +1,5 @@
mode: 0644
path: "/etc/pki/ca-trust/source/anchors/root-ca.crt"
Copy link
Contributor

Choose a reason for hiding this comment

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

would you consider prefixing this with iri as well to keep it consistent, and for anyone looking at the file to see what it's coming from? Or is the name a hard requirement

Copy link
Contributor

Choose a reason for hiding this comment

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

Out of curiosity, how often does this get rotated? I do agree that this should probably live in the cert rotation path, but since this is only used for IRI enabled clusters (which should be a very small percentage) maybe we're ok with that being a nodedisruptionpolicy

@@ -0,0 +1,5 @@
mode: 0644
path: "/etc/pki/ca-trust/source/anchors/root-ca.crt"
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment as above applies, preferrably the naming on-disk is indicative of what it's used for, since root-ca is a bit of an overloaded term

client: mcfgClient,

client: mcfgClient,
kubeClient: kubeClient,
Copy link
Contributor

Choose a reason for hiding this comment

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

There are some API limits in the openshift tests that catch controllers making too many client resource requests. I don't think you'd hit those, but maybe we can make a followup improvement for this

@djoshy
Copy link
Contributor

djoshy commented Dec 11, 2025

/payload-job periodic-ci-openshift-machine-config-operator-release-4.21-periodics-e2e-aws-mco-disruptive-techpreview-1of2 periodic-ci-openshift-machine-config-operator-release-4.21-periodics-e2e-aws-mco-disruptive-techpreview-2of2 periodic-ci-openshift-release-master-ci-4.21-e2e-aws-ovn-techpreview-serial-1of3 periodic-ci-openshift-release-master-ci-4.21-e2e-aws-ovn-techpreview-serial-2of3 periodic-ci-openshift-release-master-ci-4.21-e2e-aws-ovn-techpreview-serial-3of3

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 11, 2025

@djoshy: trigger 5 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-machine-config-operator-release-4.21-periodics-e2e-aws-mco-disruptive-techpreview-1of2
  • periodic-ci-openshift-machine-config-operator-release-4.21-periodics-e2e-aws-mco-disruptive-techpreview-2of2
  • periodic-ci-openshift-release-master-ci-4.21-e2e-aws-ovn-techpreview-serial-1of3
  • periodic-ci-openshift-release-master-ci-4.21-e2e-aws-ovn-techpreview-serial-2of3
  • periodic-ci-openshift-release-master-ci-4.21-e2e-aws-ovn-techpreview-serial-3of3

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/730b8ff0-d6ce-11f0-9c07-a59bf5b671ce-0

Copy link
Contributor

@yuqi-zhang yuqi-zhang left a comment

Choose a reason for hiding this comment

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

/lgtm
/acknowledge-critical-fixes-only
/hold

For tech preview and install support, I'm fine with merging this. I would like to see followup plans around:

  1. cert rotation and MCD-side rotation upgrade handling
  2. renaming the certificates and filepaths to be more indicative of what they're used for
  3. consider using less direct API calls for object fetching, etc.

Holding until we are certain that payloads will continue to work, as we would not like to break this right before branching, even if it is TP

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 11, 2025
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 11, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 11, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andfasano, yuqi-zhang

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 Dec 11, 2025
@yuqi-zhang
Copy link
Contributor

/acknowledge-critical-fixes-only

@yuqi-zhang
Copy link
Contributor

/payload-job periodic-ci-openshift-release-master-ci-4.21-e2e-aws-ovn-techpreview-serial-2of3 periodic-ci-openshift-release-master-ci-4.21-e2e-aws-ovn-techpreview-serial-3of3

The first run seems promising, I will let the failed ones try again, but the original failures seem unrelated to this.

@andfasano in your AM, if you're comfortable with the state of the PR, feel free to unhold and mark verified if you are doing the verification. All the other labels should be applied so hopefully it'll merge

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 12, 2025

@yuqi-zhang: trigger 2 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-master-ci-4.21-e2e-aws-ovn-techpreview-serial-2of3
  • periodic-ci-openshift-release-master-ci-4.21-e2e-aws-ovn-techpreview-serial-3of3

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/6a9c82b0-d6fc-11f0-8fc2-ccb5502fd2c6-0

@andfasano
Copy link
Contributor Author

andfasano commented Dec 12, 2025

/lgtm /acknowledge-critical-fixes-only /hold

For tech preview and install support, I'm fine with merging this. I would like to see followup plans around:

1. cert rotation and MCD-side rotation upgrade handling

2. renaming the certificates and filepaths to be more indicative of what they're used for

3. consider using less direct API calls for object fetching, etc.

Holding until we are certain that payloads will continue to work, as we would not like to break this right before branching, even if it is TP

Thank you @yuqi-zhang, see https://issues.redhat.com/browse/AGENT-1392 for the cert rotation. I will followup asap on the other two points (https://issues.redhat.com/browse/AGENT-1395)

@andfasano
Copy link
Contributor Author

/verified later @andfasano
/label acknowledge-critical-fixes-only
/hold cancel

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Dec 12, 2025
@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 12, 2025
@openshift-ci-robot
Copy link
Contributor

@andfasano: This PR has been marked to be verified later by @andfasano.

Details

In response to this:

/verified later @andfasano
/label acknowledge-critical-fixes-only
/hold cancel

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 acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. label Dec 12, 2025
@andfasano
Copy link
Contributor Author

/test e2e-aws-ovn
/test e2e-gcp-op-1of2

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 12, 2025

@andfasano: 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/bootstrap-unit c2b3174 link false /test bootstrap-unit

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.

@andfasano
Copy link
Contributor Author

/test e2e-gcp-op-single-node

@openshift-merge-bot openshift-merge-bot bot merged commit 0bc0e71 into openshift:main Dec 13, 2025
13 of 14 checks passed
@andfasano
Copy link
Contributor Author

/cherry-pick release-4.21

@openshift-cherrypick-robot

@andfasano: new pull request created: #5495

Details

In response to this:

/cherry-pick release-4.21

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.

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. verified Signifies that the PR passed pre-merge verification criteria verified-later

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants