-
Notifications
You must be signed in to change notification settings - Fork 553
✨ handle optionality of spec.grpcPodConfig.extractContent.cacheDir #3556
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
base: master
Are you sure you want to change the base?
✨ handle optionality of spec.grpcPodConfig.extractContent.cacheDir #3556
Conversation
Needs a PR in API to make this field optional before this will be functional, so hold this until that has merged. Depends on operator-framework/api#421 |
8c68f2a
to
c2808f6
Compare
Resolves /issues/3257 |
c2808f6
to
2e113e9
Compare
Signed-off-by: Jordan Keister <[email protected]>
2e113e9
to
6c1a241
Compare
// ExtractContent.CacheDir is optional, so we only add it if it is set | ||
var extractArgs = []string{ | ||
"--catalog.from=" + grpcPodConfig.ExtractContent.CatalogDir, | ||
"--catalog.to=" + fmt.Sprintf("%s/catalog", catalogPath), |
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.
Do we already have a check for this?
If ExtractContent is not empty and ExtractContent.CatalogDir is empty, we should raise an error with the following message:
"CatalogDir must be set when ExtractContent is provided."
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.
We do have that because CatalogDir is listed as required
"--catalog.from=" + grpcPodConfig.ExtractContent.CatalogDir, | ||
"--catalog.to=" + fmt.Sprintf("%s/catalog", catalogPath), |
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.
This both we still have 👍
"--catalog.from=" + grpcPodConfig.ExtractContent.CatalogDir, | ||
"--catalog.to=" + fmt.Sprintf("%s/catalog", catalogPath), | ||
"--cache.from=" + grpcPodConfig.ExtractContent.CacheDir, | ||
"--cache.to=" + fmt.Sprintf("%s/cache", catalogPath), |
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.
Thsi both are under if grpcPodConfig.ExtractContent.CacheDir != "" {
👍
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.
Hi @grokspawn
All shows fine for me here 👍
We just need rebase it with master
Then, all OK
Just a NIT: The emoji here I think should be ✨ OR 🐛 since 🌱 would be for case scenarios where has 0 impact in end users like ci fixes for example or bumps.
PR needs rebase. 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. |
Description of the change:
Allows grpcPodConfig.extractContent.cacheDir to be optional, in case folks are
opm serve
cache; orMotivation for the change:
To reduce the size of catalogsource images, we'd like to be able to provide OCI images which contain neither binary nor prebuilt cache. With improvements in cache-build pod startup, we should be able to operate without a pre-existing cache.
Architectural changes:
Testing remarks:
Reviewer Checklist
/doc
[FLAKE]
are truly flaky and have an issue