Skip to content

Commit

Permalink
drpc: add ramenconfig field to enable volsync support for discovered …
Browse files Browse the repository at this point in the history
…apps

Add a configuration option that keeps volsync support for discovered
apps disabled until the feature is well tested.

Signed-off-by: Raghavendra Talur <[email protected]>
  • Loading branch information
raghavendra-talur committed Jun 12, 2024
1 parent be907f9 commit 7b77e0b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/v1alpha1/ramenconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ type RamenConfig struct {

MultiNamespace struct {
// Enables feature to protect resources in namespaces other than VRG's
FeatureEnabled bool `json:"FeatureEnabled,omitempty"`
FeatureEnabled bool `json:"FeatureEnabled,omitempty"`
VolsyncSupported bool `json:"volsyncSupported,omitempty"`
} `json:"multiNamespace,omitempty"`

// Unprotect deleted or deselected PVCs
Expand Down
4 changes: 4 additions & 0 deletions controllers/drplacementcontrol_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,10 @@ func (r *DRPlacementControlReconciler) createDRPCInstance(
log.Info("volsync is set to disabled")
}

if !d.volSyncDisabled && drpcInAdminNamespace(drpc, ramenConfig) {
d.volSyncDisabled = !ramenConfig.MultiNamespace.VolsyncSupported
}

// Save the instance status
d.instance.Status.DeepCopyInto(&d.savedInstanceStatus)

Expand Down

0 comments on commit 7b77e0b

Please sign in to comment.