Configure the ConfigSync mode
Configure the ConfigSync mode
ConfigSync can operate in different modes:
- Publisher mode: Monitors Fusion for changes and pushes them to a Git repository.
- Subscriber mode: Polls a Git repository for changes and applies them to Fusion.
- Pub/Sub mode: Combines the features of both Publisher and Subscriber modes.
sync
configuration in the fusion-config-sync
section of the Helm chart configuration, as shown below.-
Publisher mode:
-
Subscriber mode:
-
PubSub mode:
Watch Zookeeper
The publisher watches Zookeeper for changes in Fusion objects. It uses Fusion’s Links API to determine app association for Fusion objects. The publisher does not track links in GitHub as it uses the directory structure to maintain app association for an object.Poll Solr collections
Not all Fusion objects are stored in Zookeeper. Some objects are stored in Solr collections, such as blobs, rules, etc. The publisher polls Solr collections for changes in these objects and pushes them to the Git.Blobs
Blobs are stored in Solr (system_blobs
collection) and not Zookeeper, consequently there is no ZK watch event fired when a blob has been added, deleted, or updated.
Consequently, the publisher runs a background task that queries the blob store for changes every 20 seconds (configurable via cfg.pub.checkForBlobUpdatesEveryMs
).
If blob changes are detected, the publisher stores the blob in the local repo and normally pushes it to GitHub.
Rules
Rules are stored in Solr (*_query_rewrite
and *_query_rewrite_staging
collections) and not Zookeeper, consequently there is no ZK watch event fired when a rule has been added, deleted, or updated.
Consequently, the publisher runs a background task that queries the rule store for changes every 300 seconds (configurable via cfg.pub.checkForRuleUpdatesEveryMs
).
Rules are stored in the local repo as JSON lines files and normally pushed to GitHub.
Rules sync isn’t a cheap operation, as it requires a full scan of the
*_query_rewrite
and *_query_rewrite_staging
collections.Pushing changes
By default, the publisher pushes pending commits in the local repo every 30 secs (seecfg.sync.syncEvery
); a PUSH operation is typically slow and can take several seconds to complete.
PUSH is synchronized so that only one thread is sending updates to GitHub at a time.