-
Notifications
You must be signed in to change notification settings - Fork 350
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
feat(CRD): Traits configuration schema #3235
Conversation
62dbef7
to
a78f187
Compare
-> Done |
fe1a3dc
to
fc63ad7
Compare
-> Done |
3869c0f
to
204f770
Compare
204f770
to
0870b31
Compare
0870b31
to
443300c
Compare
443300c
to
e009a98
Compare
79074c2
to
f020796
Compare
f020796
to
64a1eb7
Compare
665d96b
to
a65ab58
Compare
3ec0ce9
to
7638a3a
Compare
Since OLM 0.19.0 the max total size of bundle is increased from ~1MB to ~4MB and now the bloated Camel K Operator bundle requires >1.3MB, so upgrading OLM to >= 0.19.0 is necessary. https://groups.google.com/g/operator-framework/c/79UO6oGwuTs
c021684
to
913e4e9
Compare
The |
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.
Impressive! I've enjoyed everything I've reviewed there!
Thanks! OK, let me go ahead and merge... |
This addresses #1614. This tries to restore the unmerged pull req #1624.
Release Note
UPDATE
Now this enhancement is completed and open for reviews, I outline what this enhancement changes on the Traits API for reviewers.
API packaging
There are mainly 3 possibilities for packaging the new Traits API schema types.
pkg/apis/camel/v1
pkg/apis/camel/v1/trait
pkg/apis/camel/trait/v1
Each has its pros and cons, but this pull req has chosen the 2nd option (
pkg/apis/camel/v1/trait
); This option avoids creating a new APItraits.camel.apache.org/v1
but still can pack the types into a dedicated package and enjoy maintenability.NOTE: I'll later check if this packaging option really works well with the https://github.com/djencks/gen-crd-api-reference-docs tool in
script/gen_crd/gen_crd_api.sh
.Schema changes on CRs
By introducing the strongly-typed Traits API, it also imposes changes on the following CRDs:
integrations
,integrationkits
, andintegrationplatforms
.However, backward compatibility is also respected in this implementation. See the Backward compatibility section below.
Builtin traits
Trait properties under
spec.traits.<trait-id>.configuration
are now defined directly underspec.traits.<trait-id>
.↓↓↓
Addons
In the new API, addon traits need to be moved to
spec.traits.addons
because there's no type-safe way to accept arbitrary addon IDs in the strongly-typed Traits type:Thus an addon trait
spec.traits.<addon-id>
is now moved tospec.traits.addons.<addon-id>
, and addon trait properties underspec.traits.<addon-id>.configuration
are now defined underspec.traits.addons.<addon-id>
.↓↓↓
Backward compatibility
Backward compatibility is very important, as otherwise we would end up needing to start developing
camel.apache.org/v2
version just for the new typed Traits API. To achieve backward compatibility between 1.9.x and 1.10.x, the following logic is implemented in this pull req:Configuration
field withRawMessage
type is provided for each trait type so that the existing integrations etc. resources from <=1.9.x can be read from the new Camel K.Traits
type needs to have placeholders for legacy addon configurations. These are also used for migration tospec.traits.addons.<addon-id>
at runtime.