Skip to content

Commit 0ae96ae

Browse files
authored
oadp-1.0 mtc operator type restic credential mount (#725)
* mtc operator type restic credential mount * mount secret volume if has backup location or mtc context.
1 parent c5f772f commit 0ae96ae

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

pkg/credentials/credentials.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,9 @@ func AppendCloudProviderVolumes(dpa *oadpv1alpha1.DataProtectionApplication, ds
191191
// pattern from https://golang.org/doc/effective_go#maps
192192
// this replaces the need to iterate through the `pluginSpecificFields` O(n) -> O(1)
193193
if cloudProviderMap, ok := PluginSpecificFields[plugin]; ok &&
194-
cloudProviderMap.IsCloudProvider &&
195-
!dpa.Spec.Configuration.Velero.NoDefaultBackupLocation {
194+
cloudProviderMap.IsCloudProvider && //if plugin is a cloud provider plugin, and one of the following condition is true
195+
(!dpa.Spec.Configuration.Velero.NoDefaultBackupLocation || // it has a backup location in OADP/velero context OR
196+
dpa.Spec.UnsupportedOverrides[oadpv1alpha1.OperatorTypeKey] == oadpv1alpha1.OperatorTypeMTC) { // OADP is installed via MTC
196197

197198
pluginNeedsCheck, foundProviderPlugin := providerNeedsDefaultCreds[string(plugin)]
198199
if !foundProviderPlugin && !hasCloudStorage {

0 commit comments

Comments
 (0)