mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-03 11:45:20 +00:00
Enable linter revive and resolve found errors: part 1
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
This commit is contained in:
@@ -36,13 +36,13 @@ const (
|
||||
)
|
||||
|
||||
var (
|
||||
DaemonsetNotFound = errors.New("daemonset not found")
|
||||
ErrDaemonSetNotFound = errors.New("daemonset not found")
|
||||
)
|
||||
|
||||
// IsRunning checks if the node agent daemonset is running properly. If not, return the error found
|
||||
func IsRunning(ctx context.Context, kubeClient kubernetes.Interface, namespace string) error {
|
||||
if _, err := kubeClient.AppsV1().DaemonSets(namespace).Get(ctx, daemonSet, metav1.GetOptions{}); apierrors.IsNotFound(err) {
|
||||
return DaemonsetNotFound
|
||||
return ErrDaemonSetNotFound
|
||||
} else if err != nil {
|
||||
return err
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user