mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-08-03 22:06:07 +00:00
empty CBT secret ns when secret is not set
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
This commit is contained in:
@@ -86,6 +86,12 @@ func (s *ServiceImpl) GetAllocatedBlocks(ctx context.Context, snapshot string, r
|
||||
return err
|
||||
}
|
||||
|
||||
saNamespace := ""
|
||||
if s.SAName != "" {
|
||||
// The SA is created in the same namespace as Velero server. vsNamespace is the namespace of Velero server.
|
||||
saNamespace = s.vsNamespace
|
||||
}
|
||||
|
||||
args := iterator.Args{
|
||||
SnapshotName: snapshot,
|
||||
Emitter: &emitterImpl{
|
||||
@@ -95,7 +101,7 @@ func (s *ServiceImpl) GetAllocatedBlocks(ctx context.Context, snapshot string, r
|
||||
|
||||
Clients: clients,
|
||||
Namespace: s.vsNamespace, // DataUpload is created in the same namespace as Velero server. vsNamespace is the namespace of the Velero server.
|
||||
SANamespace: s.vsNamespace, // The SA is created in the same namespace as Velero server. vsNamespace is the namespace of Velero server.
|
||||
SANamespace: saNamespace,
|
||||
SAName: s.SAName,
|
||||
TokenExpirySecs: iterator.DefaultTokenExpirySeconds,
|
||||
MaxResults: 0, // If 0 then the CSI driver decides the value.
|
||||
|
||||
Reference in New Issue
Block a user