Correct copyright comment and string compare

Signed-off-by: Hoang, Phuong <phuong.n.hoang@dell.com>
pull/4740/head
Hoang, Phuong 2022-03-21 12:01:26 -04:00
parent b8b5427388
commit 0171a91366
5 changed files with 7 additions and 7 deletions

View File

@ -1,5 +1,5 @@
/*
Copyright 2017, 2022 the Velero contributors.
Copyright the Velero contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -57,7 +57,7 @@ func (a *PodAction) Execute(item runtime.Unstructured, backup *v1.Backup) (runti
}
var additionalItems []velero.ResourceIdentifier
if pod.Spec.PriorityClassName > "" {
if pod.Spec.PriorityClassName != "" {
a.log.Infof("Adding priorityclass %s to additionalItems", pod.Spec.PriorityClassName)
additionalItems = append(additionalItems, velero.ResourceIdentifier{
GroupResource: kuberesource.PriorityClasses,

View File

@ -1,5 +1,5 @@
/*
Copyright 2018, 2022 the Velero contributors.
Copyright the Velero contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View File

@ -1,5 +1,5 @@
/*
Copyright 2018, 2022 the Velero contributors.
Copyright the Velero contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View File

@ -1,5 +1,5 @@
/*
Copyright 2017, 2022 the Velero contributors.
Copyright the Velero contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -87,7 +87,7 @@ func (a *PodAction) Execute(input *velero.RestoreItemActionExecuteInput) (*veler
return nil, errors.WithStack(err)
}
restoreExecuteOutput := velero.NewRestoreItemActionExecuteOutput(&unstructured.Unstructured{Object: res})
if pod.Spec.PriorityClassName > "" {
if pod.Spec.PriorityClassName != "" {
a.logger.Infof("Adding priorityclass %s to AdditionalItems", pod.Spec.PriorityClassName)
restoreExecuteOutput.AdditionalItems = []velero.ResourceIdentifier{
{GroupResource: kuberesource.PriorityClasses, Name: pod.Spec.PriorityClassName}}

View File

@ -1,5 +1,5 @@
/*
Copyright 2017, 2019, 2022 the Velero contributors.
Copyright the Velero contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.