Skip to content

Commit

Permalink
default moverSecurityContext to true for datamover (#1017)
Browse files Browse the repository at this point in the history
Co-authored-by: Emily McMullan <emcmulla@redhat.com>
  • Loading branch information
openshift-cherrypick-robot and eemcmullan committed May 18, 2023
1 parent d00755c commit 065eb20
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion api/v1alpha1/oadp_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ type VolumeOptions struct {
//+optional
CacheAccessMode string `json:"cacheAccessMode,omitempty"`
// moverSecurityContext allows enabling the PodSecurityContext used in
// the application pod(s)
// the application pod(s); default value is true
//+optional
MoverSecurityContext *bool `json:"moverSecurityContext,omitempty"`
}
Expand Down
8 changes: 8 additions & 0 deletions controllers/datamover.go
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,10 @@ func (r *DPAReconciler) buildDataMoverConfigMap(dpa *oadpv1alpha1.DataProtection
}
if sourceOptions.MoverSecurityContext != nil {
cmMap["SourceMoverSecurityContext"] = strconv.FormatBool(*sourceOptions.MoverSecurityContext)

// default to true
} else {
cmMap["SourceMoverSecurityContext"] = "true"
}
}

Expand Down Expand Up @@ -799,6 +803,10 @@ func (r *DPAReconciler) buildDataMoverConfigMap(dpa *oadpv1alpha1.DataProtection

if destinationOptions.MoverSecurityContext != nil {
cmMap["DestinationMoverSecurityContext"] = strconv.FormatBool(*destinationOptions.MoverSecurityContext)

// default to true
} else {
cmMap["DestinationMoverSecurityContext"] = "true"
}
}

Expand Down

0 comments on commit 065eb20

Please sign in to comment.