Skip to content

Commit

Permalink
fix(backup): fixed logging message for backup policy webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
powerfooI committed Sep 5, 2024
1 parent 5ea2795 commit a8fd1fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/v1alpha1/obtenantbackuppolicy_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,11 @@ func (r *OBTenantBackupPolicy) validateDestination(cluster *OBCluster, dest *api
switch dest.Type {
case constants.BackupDestTypeCOS:
if _, ok := secret.Data["appId"]; !ok {
return field.Invalid(fieldPath, dest.OSSAccessSecret, "accessId field not found in given OSSAccessSecret")
return field.Invalid(fieldPath, dest.OSSAccessSecret, "appId field not found in given OSSAccessSecret")
}
case constants.BackupDestTypeS3:
if _, ok := secret.Data["s3Region"]; !ok {
return field.Invalid(fieldPath, dest.OSSAccessSecret, "accessId field not found in given OSSAccessSecret")
return field.Invalid(fieldPath, dest.OSSAccessSecret, "s3Region field not found in given OSSAccessSecret")
}
}
return nil
Expand Down

0 comments on commit a8fd1fe

Please sign in to comment.