refactor: move ListOptions references to metav1
This commit is contained in:
@@ -23,6 +23,7 @@ import (
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/apimachinery/pkg/watch"
|
||||
@@ -73,7 +74,7 @@ func (r *DeploymentRollbacker) Rollback(obj runtime.Object, updatedAnnotations m
|
||||
result := ""
|
||||
|
||||
// Get current events
|
||||
events, err := r.c.Core().Events(d.Namespace).List(api.ListOptions{})
|
||||
events, err := r.c.Core().Events(d.Namespace).List(metav1.ListOptions{})
|
||||
if err != nil {
|
||||
return result, err
|
||||
}
|
||||
@@ -82,7 +83,7 @@ func (r *DeploymentRollbacker) Rollback(obj runtime.Object, updatedAnnotations m
|
||||
return result, err
|
||||
}
|
||||
// Watch for the changes of events
|
||||
watch, err := r.c.Core().Events(d.Namespace).Watch(api.ListOptions{Watch: true, ResourceVersion: events.ResourceVersion})
|
||||
watch, err := r.c.Core().Events(d.Namespace).Watch(metav1.ListOptions{Watch: true, ResourceVersion: events.ResourceVersion})
|
||||
if err != nil {
|
||||
return result, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user