mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #87382 from yiyang5055/fix-staticcheck
fix static check failure in pkg/controller/disruption and pkg/control…
This commit is contained in:
commit
29a4b39536
@ -2,9 +2,7 @@ cluster/images/etcd-version-monitor
|
|||||||
cluster/images/etcd/migrate
|
cluster/images/etcd/migrate
|
||||||
pkg/controller/daemon
|
pkg/controller/daemon
|
||||||
pkg/controller/deployment
|
pkg/controller/deployment
|
||||||
pkg/controller/disruption
|
|
||||||
pkg/controller/garbagecollector
|
pkg/controller/garbagecollector
|
||||||
pkg/controller/namespace/deletion
|
|
||||||
pkg/controller/nodeipam
|
pkg/controller/nodeipam
|
||||||
pkg/controller/podautoscaler
|
pkg/controller/podautoscaler
|
||||||
pkg/controller/podgc
|
pkg/controller/podgc
|
||||||
|
@ -639,12 +639,9 @@ func TestReplicationController(t *testing.T) {
|
|||||||
// about the RC. This is a known bug. TODO(mml): file issue
|
// about the RC. This is a known bug. TODO(mml): file issue
|
||||||
ps.VerifyPdbStatus(t, pdbName, 0, 0, 0, 0, map[string]metav1.Time{})
|
ps.VerifyPdbStatus(t, pdbName, 0, 0, 0, 0, map[string]metav1.Time{})
|
||||||
|
|
||||||
pods := []*v1.Pod{}
|
|
||||||
|
|
||||||
for i := int32(0); i < 3; i++ {
|
for i := int32(0); i < 3; i++ {
|
||||||
pod, _ := newPod(t, fmt.Sprintf("foobar %d", i))
|
pod, _ := newPod(t, fmt.Sprintf("foobar %d", i))
|
||||||
updatePodOwnerToRc(t, pod, rc)
|
updatePodOwnerToRc(t, pod, rc)
|
||||||
pods = append(pods, pod)
|
|
||||||
pod.Labels = labels
|
pod.Labels = labels
|
||||||
add(t, dc.podStore, pod)
|
add(t, dc.podStore, pod)
|
||||||
dc.sync(pdbName)
|
dc.sync(pdbName)
|
||||||
@ -680,12 +677,9 @@ func TestStatefulSetController(t *testing.T) {
|
|||||||
// about the SS. This is a known bug. TODO(mml): file issue
|
// about the SS. This is a known bug. TODO(mml): file issue
|
||||||
ps.VerifyPdbStatus(t, pdbName, 0, 0, 0, 0, map[string]metav1.Time{})
|
ps.VerifyPdbStatus(t, pdbName, 0, 0, 0, 0, map[string]metav1.Time{})
|
||||||
|
|
||||||
pods := []*v1.Pod{}
|
|
||||||
|
|
||||||
for i := int32(0); i < 3; i++ {
|
for i := int32(0); i < 3; i++ {
|
||||||
pod, _ := newPod(t, fmt.Sprintf("foobar %d", i))
|
pod, _ := newPod(t, fmt.Sprintf("foobar %d", i))
|
||||||
updatePodOwnerToSs(t, pod, ss)
|
updatePodOwnerToSs(t, pod, ss)
|
||||||
pods = append(pods, pod)
|
|
||||||
pod.Labels = labels
|
pod.Labels = labels
|
||||||
add(t, dc.podStore, pod)
|
add(t, dc.podStore, pod)
|
||||||
dc.sync(pdbName)
|
dc.sync(pdbName)
|
||||||
|
@ -162,7 +162,7 @@ func (d *namespacedResourcesDeleter) initOpCache() {
|
|||||||
if len(resources) == 0 {
|
if len(resources) == 0 {
|
||||||
klog.Fatalf("Unable to get any supported resources from server: %v", err)
|
klog.Fatalf("Unable to get any supported resources from server: %v", err)
|
||||||
}
|
}
|
||||||
deletableGroupVersionResources := []schema.GroupVersionResource{}
|
|
||||||
for _, rl := range resources {
|
for _, rl := range resources {
|
||||||
gv, err := schema.ParseGroupVersion(rl.GroupVersion)
|
gv, err := schema.ParseGroupVersion(rl.GroupVersion)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -183,7 +183,6 @@ func (d *namespacedResourcesDeleter) initOpCache() {
|
|||||||
d.opCache.setNotSupported(operationKey{operation: op, gvr: gvr})
|
d.opCache.setNotSupported(operationKey{operation: op, gvr: gvr})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
deletableGroupVersionResources = append(deletableGroupVersionResources, gvr)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user