mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-13 13:55:41 +00:00
Merge pull request #117516 from sourcelliu/intcast
Remove unnecessary type conversion
This commit is contained in:
commit
f997e50425
@ -267,7 +267,7 @@ func (n *nodeLogQuery) Copy(w io.Writer) {
|
|||||||
// set the deadline to the maximum across both runs
|
// set the deadline to the maximum across both runs
|
||||||
ctx, cancel := context.WithDeadline(context.Background(), time.Now().Add(30*time.Second))
|
ctx, cancel := context.WithDeadline(context.Background(), time.Now().Add(30*time.Second))
|
||||||
defer cancel()
|
defer cancel()
|
||||||
boot := int(0)
|
boot := 0
|
||||||
if n.Boot != nil {
|
if n.Boot != nil {
|
||||||
boot = *n.Boot
|
boot = *n.Boot
|
||||||
}
|
}
|
||||||
|
@ -1658,7 +1658,7 @@ func killPodNow(podWorkers PodWorkers, recorder record.EventRecorder) eviction.K
|
|||||||
|
|
||||||
// we timeout and return an error if we don't get a callback within a reasonable time.
|
// we timeout and return an error if we don't get a callback within a reasonable time.
|
||||||
// the default timeout is relative to the grace period (we settle on 10s to wait for kubelet->runtime traffic to complete in sigkill)
|
// the default timeout is relative to the grace period (we settle on 10s to wait for kubelet->runtime traffic to complete in sigkill)
|
||||||
timeout := int64(gracePeriod + (gracePeriod / 2))
|
timeout := gracePeriod + (gracePeriod / 2)
|
||||||
minTimeout := int64(10)
|
minTimeout := int64(10)
|
||||||
if timeout < minTimeout {
|
if timeout < minTimeout {
|
||||||
timeout = minTimeout
|
timeout = minTimeout
|
||||||
|
@ -500,7 +500,7 @@ func TestStatusNormalizationEnforcesMaxBytes(t *testing.T) {
|
|||||||
Name: fmt.Sprintf("container%d", i),
|
Name: fmt.Sprintf("container%d", i),
|
||||||
LastTerminationState: v1.ContainerState{
|
LastTerminationState: v1.ContainerState{
|
||||||
Terminated: &v1.ContainerStateTerminated{
|
Terminated: &v1.ContainerStateTerminated{
|
||||||
Message: strings.Repeat("abcdefgh", int(24+i%3)),
|
Message: strings.Repeat("abcdefgh", 24+i%3),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
systemPriority = int32(scheduling.SystemCriticalPriority)
|
systemPriority = scheduling.SystemCriticalPriority
|
||||||
systemPriorityUpper = systemPriority + 1000
|
systemPriorityUpper = systemPriority + 1000
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user