Skip to content

Conversation

@2uasimojo
Copy link
Member

This was missed in the original ClusterPool inventory work.

With this change, you can use new API field
`ClusterDeployment.Spec.Provisioning.CustomizationRef` to point to a
ClusterDeploymentCustomization (hereinafter "CDC") object in the same
namespace as the ClusterDeployment (CD).

ClusterDeploymentCustomizations:
CDC accepts a new subfield, `Spec.InstallerManifestPatches`, which
consists of:
- `Glob`: a string representing a file glob, relative to the installer
  working directory, matching one or more manifest files.
- `Patches`: a list of `PatchEntity` representing RFC6902 JSON patches
  to apply to the matched manifest(s).

Also, I got really annoyed having to type out
`clusterdeploymentcustomizations` on the CLI, so I added abbreviation
`cdc` to the schema.

ClusterPools:
CDC was already being used by ClusterPool-owned CDs to allow patching
the install-config generated from the template referred to by
`ClusterPool.Spec.InstallConfigSecretTemplateRef`. With this change,
ClusterPool-owned CDs can start using manifest patches in two ways (not
mutually exclusive):
- Patches specific to the CD can be included in the
  `InstallerManifestPatches` field of the existing Inventory CDCs.
- Patches applicable to all CDs in the pool can be provided by a CDC
  referenced via a new ClusterPool.Spec.CustomizationRef field.

HIVE-1793
This was missed in the original ClusterPool inventory work.
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 10, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Mar 10, 2025

@2uasimojo: This pull request references HIVE-2797 which is a valid jira issue.

Details

In response to this:

This was missed in the original ClusterPool inventory work.

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 jstuever and suhanime March 10, 2025 22:44
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 10, 2025
@2uasimojo
Copy link
Member Author

/assign @abraverm

@2uasimojo
Copy link
Member Author

Currently stacked on #2499 -- review only the second commit please.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 11, 2025

@2uasimojo: 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.

@codecov
Copy link

codecov bot commented Mar 11, 2025

Codecov Report

Attention: Patch coverage is 63.73057% with 70 lines in your changes missing coverage. Please review.

Project coverage is 49.93%. Comparing base (41f153f) to head (75f9585).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
pkg/installmanager/installmanager.go 25.00% 29 Missing and 1 partial ⚠️
.../clusterdeployment/clusterdeployment_controller.go 30.00% 28 Missing ⚠️
...g/controller/clusterpool/clusterpool_controller.go 74.46% 11 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2597      +/-   ##
==========================================
+ Coverage   49.86%   49.93%   +0.06%     
==========================================
  Files         281      281              
  Lines       32968    33136     +168     
==========================================
+ Hits        16439    16545     +106     
- Misses      15196    15257      +61     
- Partials     1333     1334       +1     
Files with missing lines Coverage Δ
pkg/controller/clusterpool/collections.go 75.74% <100.00%> (+0.16%) ⬆️
pkg/controller/utils/clusterdeployment.go 77.48% <100.00%> (+6.05%) ⬆️
pkg/controller/utils/sa.go 67.90% <ø> (ø)
...entcustomization/clusterdeploymentcustomization.go 93.33% <100.00%> (+1.12%) ⬆️
pkg/test/clusterpool/clusterpool.go 95.23% <100.00%> (+0.18%) ⬆️
.../v1/clusterdeployment_validating_admission_hook.go 85.63% <100.00%> (+0.02%) ⬆️
...shift/hive/apis/hive/v1/clusterdeployment_types.go 0.00% <ø> (ø)
...is/hive/v1/clusterdeploymentcustomization_types.go 0.00% <ø> (ø)
...m/openshift/hive/apis/hive/v1/clusterpool_types.go 0.00% <ø> (ø)
...g/controller/clusterpool/clusterpool_controller.go 58.04% <74.46%> (+1.45%) ⬆️
... and 2 more
🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@abraverm
Copy link
Contributor

LGTM

@abraverm
Copy link
Contributor

/lgtm

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

openshift-ci bot commented Mar 11, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 2uasimojo, abraverm

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-merge-bot openshift-merge-bot bot merged commit 909ef5d into openshift:master Mar 11, 2025
10 checks passed
@2uasimojo 2uasimojo deleted the HIVE-2797/no-edit-custref branch March 13, 2025 15:31
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. 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.

3 participants