-
Notifications
You must be signed in to change notification settings - Fork 239
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
RFE: Patch Installer Manifests #2497
base: master
Are you sure you want to change the base?
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 2uasimojo 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:
Approvers can indicate their approval by writing |
- `ManifestSelector` supports one subfield, `Glob`, which accepts a path matching string as | ||
supported by golang's [filepath.Glob](https://pkg.go.dev/path/filepath#Glob). | ||
- We will execute the glob relative to the working directory in which manifests were generated. | ||
- For security, we will error on any glob starting with `/` or containing `../`. | ||
- `ManifestSelector` is extensible. | ||
E.g. in the future we may wish to match manifests based on the GVK of the object therein. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@patrickdillon I would really like your input here! What should the initial mechanism be for identifying the manifest(s) to be patched?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed offline with Patrick. We're going to go with file glob for the first pass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@2uasimojo and I discussed over slack, but recording here for posterity. Eric identified filename (glob) or GVK as two options.
The installer has existing code which will deserialize all manifests (using filename globs) and convert them into k8s client.Object
s using gvk:
That said, the advantages of using GVK are not immmediately obvious.
The manifest filenames should be rather stable, and we're brainstorming whether there are methods to make that even more guaranteed.
/cc @abraverm Thought you might be interested to see how ClusterDeploymentCustomization is evolving :) |
With this enhancment and cluster template operator, a fully automated UPI might be possible. |
- `ManifestSelector` is extensible. | ||
E.g. in the future we may wish to match manifests based on the GVK of the object therein. | ||
|
||
### `ClusterDeployment.Spec.Provisioning.CustomizationRef` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Self-
We should fix up the clusterpool controller to automatically add this ref from the inventory to the CD. That way the clusterpool user could do inventory things in either/both ways (install-config and/or manifest patching). Note: requires it not to be a failure if a CDC reffed here contains no manifest patches? Or maybe we can be strict for non-pool clusters? Is it a problem if a non-pool CD uses installConfigPatches??
-Self
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
**TBD.** | ||
|
||
Where/how do we report the success/failure of | ||
- CDC as a whole? In a new `CD.Status.Conditions[?Type=CustomizationsSuccessful]` or similar? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now the conditions are in CDC and CP, the later has a report for the status of all CDC in its inventory. CD has reference to the CDC itself, I don't know if CD should keep a copy of the error in its own conditions.
Where/how do we report the success/failure of | ||
- CDC as a whole? In a new `CD.Status.Conditions[?Type=CustomizationsSuccessful]` or similar? | ||
- Individial `CDC.InstallerManifestPatches`? | ||
How are we doing it for `InstallConfigPatches` for ClusterPools? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CDC has ApplySucceededCondition
, and any issue reported in the condition message.
|
||
- Is it a failure if `ManifestSelector` matches zero manifests? | ||
- Is it a failure if a `Patches[].Path` matches no paths? | ||
- Failure to execute a patch should probably bubble up as an overall failure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case of InstallConfigPatches, the CP resolution fails and the failure is saved in the CDC which causes CP to pick a different CDC in the next attempt.
Add an enhancement doc proposing API changes to allow hive consumers to specify arbitrary edits to the manifests generated by `openshift-install create manifests` prior to feeding them to `openshift-install create cluster`. HIVE-1793
bb4e206
to
3f0e45e
Compare
Finished this out alongside the code (#2499). Ready for review. |
Add an enhancement doc proposing API changes to allow hive consumers to specify arbitrary edits to the manifests generated by
openshift-install create manifests
prior to feeding them toopenshift-install create cluster
.HIVE-1793