-
Notifications
You must be signed in to change notification settings - Fork 1.8k
generate/internal/manifests.go: add all supported kinds to manifests #4137
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
generate/internal/manifests.go: add all supported kinds to manifests #4137
Conversation
| objs = append(objs, &c.ServiceAccounts[i]) | ||
| } | ||
|
|
||
| // All Services passed in should be written. |
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 isn't quite true. OLM manages webhooks and their services, no explicitly defined webhook Service objects should be passed. You can filter out Services by finding those associated with {Mutating,Validating}WebhookConfigurations included in a bundled CSV (all webhook configs in the collector.Manifests).
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 just match on namespace and name? What if a service declares multiple ports and one of them is for the webhook?
Do you think we need to filter out webhook service ports and then filter out any services that have no ports?
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.
Can we constrain the problem by filtering any service that matches a webhook config by name/namespace, and document that webhooks need their own separate service? Modifying a resource's functional content doesn't feel right.
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 could. I think I have a working solution that does what I suggest above. Let me know what you think.
| @@ -0,0 +1,3 @@ | |||
| entries: | |||
| - description: When generating bundles and packagemanifests, add all resources supported by OLM. | |||
| kind: change | |||
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.
I almost want to say this is a net-new feature because we explicitly do this for RBAC and no other types, but I am ok with "change" since the explicitness isn't user-facing.
2a9438c to
be51cb5
Compare
estroz
left a comment
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.
/lgtm
camilamacedo86
left a comment
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.
I have not a deep knowledge on this feature, however, the changes here shows all ok for me.
Pickup fix operator-framework/operator-sdk#4137 by upgrading from v1.0.0 to v1.2.0 by following: https://v1-1-x.sdk.operatorframework.io/docs/upgrading-sdk-version/v1.1.0/ https://v1-2-x.sdk.operatorframework.io/docs/upgrading-sdk-version/v1.2.0/
…perator-framework#4137) * generate/internal/manifests.go: add all supported kinds to manifests * filter out webhook ports/services * add all services to manifests Signed-off-by: reinvantveer <[email protected]>
Description of the change:
Add all supported resources to generated bundles and packagemanifests.
Motivation for the change:
SDK should automatically add all supported resources to generated bundles and packagemanifests.
Checklist
If the pull request includes user-facing changes, extra documentation is required:
changelog/fragments(seechangelog/fragments/00-template.yaml)website/content/en/docs