Merge pull request #117516 from sourcelliu/intcast

Remove unnecessary type conversion
This commit is contained in:
Kubernetes Prow Robot 2023-10-26 06:25:02 +02:00 committed by GitHub
commit f997e50425
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -267,7 +267,7 @@ func (n *nodeLogQuery) Copy(w io.Writer) {
// set the deadline to the maximum across both runs
ctx, cancel := context.WithDeadline(context.Background(), time.Now().Add(30*time.Second))
defer cancel()
boot := int(0)
boot := 0
if n.Boot != nil {
boot = *n.Boot
}

View File

@ -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.
// 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)
if timeout < minTimeout {
timeout = minTimeout

View File

@ -500,7 +500,7 @@ func TestStatusNormalizationEnforcesMaxBytes(t *testing.T) {
Name: fmt.Sprintf("container%d", i),
LastTerminationState: v1.ContainerState{
Terminated: &v1.ContainerStateTerminated{
Message: strings.Repeat("abcdefgh", int(24+i%3)),
Message: strings.Repeat("abcdefgh", 24+i%3),
},
},
}

View File

@ -27,7 +27,7 @@ import (
)
var (
systemPriority = int32(scheduling.SystemCriticalPriority)
systemPriority = scheduling.SystemCriticalPriority
systemPriorityUpper = systemPriority + 1000
)