-
Notifications
You must be signed in to change notification settings - Fork 40
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
Update compound-bundle-constraints enhancement #108
Update compound-bundle-constraints enhancement #108
Conversation
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.
Could we make it even more crisp? E.g. outline specifically what happens in the case where you want to install something that has a negation on something that is already installed. Basically, that this means your operator will still install as long as there is another package that can meet the dependencies. Maybe we should have similar examples explained for any
and all
Does renaming I think this is better addressed by clarifying the high-level semantics of this property versus focusing specifically on negation. |
2e8332c
to
bc1f061
Compare
I'm still confused on how bundle authors can take advantage of compound bundle constraints AND the the legacy non-compound bundle constraints simultaneously. This is addressed in the Alternatives section, but not clear if this is required of the spec or not. I think we can just add the new, narrower constraint. Example: Today, we oftentimes try to use both Today: ---
schema: olm.bundle
name: foo.v1.0.0
package: foo
properties:
- type: olm.package.required
value:
name: etcd
versionRange: '>=1.0.0'
- type: olm.gvk.required
value:
group: etcd.database.coreos.com
kind: EtcdBackup
version: v1beta2 Now, we want to leverage the more narrow rule, which we would now provide both formats. Because the new compound constraint is ALSO evaluated, the narrower rule is honored: schema: olm.bundle
name: foo.v1.0.0
package: foo
properties:
# For all versions of OLM (a package and GVK don't need to be in the same bundle):
- type: olm.package.required
value:
name: etcd
versionRange: '>=1.0.0'
- type: olm.gvk.required
value:
group: etcd.database.coreos.com
kind: EtcdBackup
version: v1beta2
# Only recognized by new OLM, which limits solutions to a single bundle that provides both the package and gvk.
- type: olm.constraint
value:
failureMessage: All are required for Baz because...
all:
constraints:
- failureMessage: Package bar is needed for...
package:
name: etcd
versionRange: '>=1.0.0'
- failureMessage: GVK EtcdBackup/v1beta2 is needed for...
gvk:
group: etcd.database.coreos.com
version: v1beta2
kind: EtcdBackup It might be helpful to call out a best practice for creating semi-interoperable dependencies like this. |
Can you clarify if a bundle provider can specify these constraints in the |
@cdjohnson As you mentioned, for the most use cases, the current existing |
Currently, it should be declared in |
Yes, I understand that. I'm asking if we want to leverage the new constraint AND preserve the old behavior for old OLM resolvers: Is my example is valid? I'd like to tell ALL of our products to follow this example to allow a more exact constraint when possible, and the lesser constraint when not possible. |
Can we add this to the specification, so it's obvious to all readers? It seems like examples showing |
Your example looks valid to me. However, on the second one, it seems you only need the |
My point, is that I want this same bundle to be able to be installed and the dependencies understood on OpenShift 4.6 through 4.9, which won't have OLM that understands |
@cdjohnson It's fine to specify both. There are global invariants on GVK providers, so only one operator can provide any given GVK. If your operator requires A, B, and (A ^ B), it's effectively equivalent to requiring only (A ^ B) for a version of catalog-operator that understands (A ^ B). |
135e16e
to
e3496f6
Compare
This is likely true in how the resolver produces a solution. However, in practice this is not true in the context of the universe (my understanding of "global" which we cannot control) of public catalogs, where anyone can build and publish an OLM-Enabled operator. For example, when submitting an Operator |
Yes, exactly right. I was specifically referring to namespace resolution here, because that is what prevents the selection of a solution like |
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.
Nice work Tyler, some notes aimed at improving document clarity.
Signed-off-by: Tyler Slaton <[email protected]>
Signed-off-by: Tyler Slaton <[email protected]>
e3496f6
to
94f2a52
Compare
Signed-off-by: Tyler Slaton [email protected]
Summary
This is an update to the compound-bundle-constraints EP that is intended to address a couple of things.
none
tonot
Note The change to update
none
to `not will be addressed in the code directly via other PR's.This is being done to address the issue outlined in BZ 2034319.