Skip to content

Commit

Permalink
Add flag for enabling or disabling consistency groups
Browse files Browse the repository at this point in the history
We want to be disable or enable consistency groups support for testing with drenv.
The enabling/disabling flag can be added in envs files:

ramen:
hub: hub
clusters: [dr1, dr2]
topology: regional-dr
features:
volsync: true
consistency_groups: true

When flag is not present, consistency groups are disabled by default

Signed-off-by: Elena Gershkovich <elenage@il.ibm.com>
  • Loading branch information
ELENAGER authored and nirs committed Sep 26, 2024
1 parent bdc2604 commit b7b00be
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/drenv/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,17 @@ def enable_dr():

cluster = lookup_cluster()
placement_name = placement.split("/")[1]
consistency_groups = env["features"].get("consistency_groups", False)
cg_enabled = "true" if consistency_groups else "false"

drpc = f"""
apiVersion: ramendr.openshift.io/v1alpha1
kind: DRPlacementControl
metadata:
name: {config['name']}-drpc
namespace: {config['namespace']}
annotations:
drplacementcontrol.ramendr.openshift.io/is-cg-enabled: '{cg_enabled}'
labels:
app: {config['name']}
spec:
Expand Down

0 comments on commit b7b00be

Please sign in to comment.