This is the multi-page printable view of this section. Click here to print.
Zookeeper to Zookeeper samples
1 - Zookeeper Database
Source and destination Databases should include the host and port of the target Zookeper instances. A Secret containing the user login credentials is required for each Database instance. Databases are mapped to Secrets that have the same name and namespace.
Zookeeper users should have appropiate read permissions if they belong to a source instance and write permissions if they are instead located in a destination location.
apiVersion: v1
kind: Secret
metadata:
name: zookeeper-source
stringData:
user: admin
password: password
---
apiVersion: assets.astronetes.io/v1alpha1
kind: Database
metadata:
name: zookeeper-source
spec:
zookeeper:
client:
servers:
- 172.18.0.4:30181
---
apiVersion: v1
kind: Secret
metadata:
name: zookeeper-destination
stringData:
user: admin
password: password
---
apiVersion: assets.astronetes.io/v1alpha1
kind: Database
metadata:
name: zookeeper-destination
spec:
zookeeper:
client:
servers:
- 172.18.0.5:30181
2 - Zookeeper Synchronization
Zookeeper synchronization requires the path to the root endpoint. If can be specified in spec.template.spec.config.rootPath.
---
apiVersion: automation.astronetes.io/v1alpha1
kind: Synchronization
metadata:
generateName: synchronize-zookeeper-
spec:
plugin: zookeeper-to-zookeeper-nodes
config:
sourceName: zookeeper-source
destinationName: zookeeper-destination
rootPath: /test
createRoutePath: true
3 - Zookeeper Synchronization Plan
Zookeeper synchronization requires the path to the root endpoint. If can be specified in spec.template.spec.config.rootPath.
---
apiVersion: automation.astronetes.io/v1alpha1
kind: SynchronizationPlan
metadata:
name: synchronize-zookeeper
spec:
schedule: "10 * * * *"
template:
spec:
plugin: zookeeper-to-zookeeper-nodes
config:
sourceName: zookeeper-source
destinationName: zookeeper-destination
rootPath: /test