Skip to content

Fix DDC reconciliation for FDB ConfigMap changes - #517

Open
Al-assad wants to merge 1 commit into
apache:masterfrom
Al-assad:fix-fdb-configmap-watch
Open

Fix DDC reconciliation for FDB ConfigMap changes#517
Al-assad wants to merge 1 commit into
apache:masterfrom
Al-assad:fix-fdb-configmap-watch

Conversation

@Al-assad

Copy link
Copy Markdown
Member

What problem does this PR solve?

Issue Number: N/A

Related PR: N/A

Problem Summary:

A DorisDisaggregatedCluster reads the FoundationDB cluster-file ConfigMap only while reconciling, but the DDC controller does not watch that referenced ConfigMap. When fdb-kubernetes-operator changes the cluster file for a healthy cluster, the MetaService StatefulSet can therefore keep the old FDB_ENDPOINT until another watched resource changes or the controller-runtime cache performs its periodic resync.

This change watches ConfigMap cluster-file create, update, and delete events, maps them to DDCs that reference the ConfigMap, and immediately reconciles those DDCs. Metadata-only ConfigMap updates and DDCs using a direct FDB address are ignored. FDB endpoint resolution now fails before constructing the desired StatefulSet, so a missing or invalid ConfigMap cannot remove the currently deployed FDB_ENDPOINT.

Release note

Changes to an fdb-kubernetes-operator cluster-file ConfigMap now promptly update and roll out the referencing MetaService StatefulSet.

Check List (For Author)

  • Test
    • Unit Test
    • Regression test
    • Manual test
    • No need to test or manual test

Test commands:

go test ./pkg/controller -run 'Test(ReorganizeStatusConsidersMetaServiceHealth|MapFDBConfigMapToDDCs|FDBConfigMapPredicate)$' -count=1
go test ./pkg/controller/sub_controller/disaggregated_cluster/metaservice -count=1
go test ./pkg/controller/... -run '^$' -count=1
go vet ./pkg/controller ./pkg/controller/sub_controller/disaggregated_cluster/metaservice
  • Behavior changed:

    • No.
    • Yes. Referenced FDB cluster-file changes now trigger DDC reconciliation and MetaService rollout.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant