Skip to content

Commit 1630010

Browse files
Fixing typo and removing extra logic wrt secret name
1 parent 804ca28 commit 1630010

File tree

3 files changed

+2
-19
lines changed

3 files changed

+2
-19
lines changed

controllers/velero.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ func (r *VeleroReconciler) getVeleroResourceReqs(velero *oadpv1alpha1.Velero) co
534534
// For later: Move this code into validator.go when more need for validation arises
535535
// TODO: if multiple default plugins exist, ensure we validate all of them.
536536
// Right now its sequential validation
537-
func (r *VeleroReconciler) ValidateVeleroPiugins(log logr.Logger) (bool, error) {
537+
func (r *VeleroReconciler) ValidateVeleroPlugins(log logr.Logger) (bool, error) {
538538
velero := oadpv1alpha1.Velero{}
539539
if err := r.Get(r.Context, r.NamespacedName, &velero); err != nil {
540540
return false, err

controllers/velero_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func (r *VeleroReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctr
8282
}
8383

8484
_, err := ReconcileBatch(r.Log,
85-
r.ValidateVeleroPiugins,
85+
r.ValidateVeleroPlugins,
8686
r.ReconcileVeleroSecurityContextConstraint,
8787
r.ReconcileResticRestoreHelperConfig,
8888
r.ValidateBackupStorageLocations,

pkg/credentials/credentials.go

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,6 @@ func AppendCloudProviderVolumes(velero *oadpv1alpha1.Velero, ds *appsv1.DaemonSe
155155
// default secret name
156156
secretName := cloudProviderMap.SecretName
157157

158-
// check if secret name is specified in BSL config and use it instead of the default one; Note: assuming one BSL per provider
159-
for _, bsl := range velero.Spec.BackupStorageLocations {
160-
if bsl.Provider == string(plugin) && bsl.Credential != nil && len(bsl.Credential.Name) > 0 {
161-
secretName = bsl.Credential.Name
162-
continue
163-
}
164-
}
165-
166158
ds.Spec.Template.Spec.Volumes = append(
167159
ds.Spec.Template.Spec.Volumes,
168160
corev1.Volume{
@@ -221,15 +213,6 @@ func AppendPluginSpecificSpecs(velero *oadpv1alpha1.Velero, veleroDeployment *ap
221213
}
222214
// set default secret name to use
223215
secretName := pluginSpecificMap.SecretName
224-
// Grab secret name from BSL for this cloud provider plugin
225-
for _, bsl := range velero.Spec.BackupStorageLocations {
226-
if bsl.Provider == string(plugin) {
227-
if bsl.Credential != nil && len(bsl.Credential.Name) > 0 {
228-
secretName = bsl.Credential.Name
229-
}
230-
continue
231-
}
232-
}
233216
// append plugin specific volume mounts
234217
if veleroContainer != nil {
235218
veleroContainer.VolumeMounts = append(

0 commit comments

Comments
 (0)