[#2379] Add Schema CRD for managing Protobuf schemas - #2452
[#2379] Add Schema CRD for managing Protobuf schemas#2452tristantarrant wants to merge 4 commits into
Conversation
4d6520b to
7d0c2db
Compare
|
It's probably a follow-up issue, but it would be great if we could make it so that a Cache CR depends on a Schema existing on the server so that Cache creation is not attempted until the Schema exists. Something like: apiVersion: infinispan.org/v2alpha1
kind: Schema
metadata:
name: myschema
spec:
clusterName: infinispan
schema: ...
----
apiVersion: infinispan.org/v2alpha1
kind: Cache
metadata:
name: mycachedefinition
spec:
clusterName: infinispan
schema: myschema |
7d0c2db to
4567cab
Compare
Good idea. Let's do it here |
dd2b22d to
7182043
Compare
|
Done |
|
E2E tests are completely missing, including integration with the CI |
b0530b6 to
41f9aff
Compare
|
E2E tests are here now |
1280641 to
29ec109
Compare
29ec109 to
e55443c
Compare
|
Schema CRs now have a status flag explaining whether bidi sync is enabled (operand >=16.1) |
ryanemerson
left a comment
There was a problem hiding this comment.
LGTM assuming CI turns 🟢
(The previous run failed with an unrelated rate-limiter issue)
cba40d5 to
50355fa
Compare
|
Rebased and green |
Crumby
left a comment
There was a problem hiding this comment.
Looks great, few requested changes, mainly the usage of generatedName and updating the ServiceAccount docs. I'll leave the rest to your judgment
50355fa to
b036cff
Compare
b036cff to
5b6d370
Compare
d1edd04 to
faa64fa
Compare
|
@Crumby it's green |
Crumby
left a comment
There was a problem hiding this comment.
@tristantarrant Few more issues around error handling and missing reconciliation pausing feature in the controller.
faa64fa to
08d3d2b
Compare
Introduce a new Schema custom resource that allows users to register, update, and delete Protobuf schemas on Infinispan clusters via the REST API (/rest/v2/schemas). The implementation follows the same patterns as the existing Cache CRD including: - Schema types, webhooks (defaulting + validation), and controller - REST API client for schema CRUD operations - Bidirectional sync via SSE event listener (create/update/remove-schema) - Finalizer-based cleanup on CR deletion - Webhook tests, type utility tests, and event parsing tests - E2E tests covering lifecycle, server sync, cluster recreate, and cache-schema dependency with indexed protostream caches - CI workflow job and Makefile target for schema e2e tests - Asciidoc documentation and sample CR
08d3d2b to
dfb9812
Compare
Crumby
left a comment
There was a problem hiding this comment.
@tristantarrant So increasing the CL annotation wasn't the way to go and probably not even the source of the issue. Another issues popped up
- Add checkSchemaStatus() that always verifies schema status on the server before setting the Ready condition - Remove status updates from ConfigListener CreateOrUpdate, eliminating the race where Operator and CL fight over the Ready condition - Fix nil map panic in RemoveStaleResources when annotations are nil - Remove redundant post-registration status re-check from createOrUpdate (now handled by checkSchemaStatus in the reconcile loop)
Crumby
left a comment
There was a problem hiding this comment.
@tristantarrant Let's remove the previously added resource/status verbs to Config Listener (and documentation) added previously and we are good to go.
Co-authored-by: Pavel Drobek <drobekpavel@gmail.com>
…tener.go Co-authored-by: Pavel Drobek <drobekpavel@gmail.com>
Closes #2379