Skip to content

Commit 14cf68a

Browse files
authored
Merge pull request kubernetes#3191 from marwanad/run-hack-verify-all
fix gofmt and lint issues
2 parents 9b1f6e2 + a32deba commit 14cf68a

File tree

6 files changed

+30
-14
lines changed

6 files changed

+30
-14
lines changed

cluster-autoscaler/cloudprovider/azure/azure_manager.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ const (
6666
backoffJitterDefault = 1.0
6767

6868
// rate limit
69-
rateLimitQPSDefault float32 = 1.0
70-
rateLimitBucketDefault = 5
71-
rateLimitReadQPSEnvVar = "RATE_LIMIT_READ_QPS"
72-
rateLimitReadBucketsEnvVar = "RATE_LIMIT_READ_BUCKETS"
73-
rateLimitWriteQPSEnvVar = "RATE_LIMIT_WRITE_QPS"
74-
rateLimitWriteBucketsEnvVar = "RATE_LIMIT_WRITE_BUCKETS"
69+
rateLimitQPSDefault float32 = 1.0
70+
rateLimitBucketDefault = 5
71+
rateLimitReadQPSEnvVar = "RATE_LIMIT_READ_QPS"
72+
rateLimitReadBucketsEnvVar = "RATE_LIMIT_READ_BUCKETS"
73+
rateLimitWriteQPSEnvVar = "RATE_LIMIT_WRITE_QPS"
74+
rateLimitWriteBucketsEnvVar = "RATE_LIMIT_WRITE_BUCKETS"
7575
)
7676

7777
var validLabelAutoDiscovererKeys = strings.Join([]string{
@@ -402,7 +402,7 @@ func CreateAzureManager(configReader io.Reader, discoveryOpts cloudprovider.Node
402402

403403
err = InitializeCloudProviderRateLimitConfig(&cfg.CloudProviderRateLimitConfig)
404404
if err != nil {
405-
return nil, err
405+
return nil, err
406406
}
407407

408408
// Defaulting vmType to vmss.

cluster-autoscaler/cloudprovider/azure/azure_manager_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ func TestInitializeCloudProviderRateLimitConfigWithReadAndWriteRateLimitAlreadyS
434434
var rateLimitWriteQPS float32 = 6.0
435435
rateLimitWriteBuckets := 20
436436

437-
configWithRateLimits := &CloudProviderRateLimitConfig{
437+
configWithRateLimits := &CloudProviderRateLimitConfig{
438438
RateLimitConfig: azclients.RateLimitConfig{
439439
CloudProviderRateLimitBucket: rateLimitReadBuckets,
440440
CloudProviderRateLimitBucketWrite: rateLimitWriteBuckets,

cluster-autoscaler/cloudprovider/gce/cache.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ func (gc *GceCache) AddMachineToCache(machineType string, zone string, machine *
383383
gc.machinesCache[MachineTypeKey{zone, machineType}] = machinesCacheValue{machineType: machine}
384384
}
385385

386-
// AddMachineToCache adds machine to cache under lock.
386+
// AddMachineToCacheWithError adds machine to cache under lock.
387387
func (gc *GceCache) AddMachineToCacheWithError(machineType string, zone string, err error) {
388388
gc.cacheMutex.Lock()
389389
defer gc.cacheMutex.Unlock()

cluster-autoscaler/cloudprovider/gce/cache_test.go

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright 2020 The Kubernetes Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
117
package gce
218

319
import (
@@ -53,7 +69,7 @@ func TestMachineCache(t *testing.T) {
5369
},
5470
},
5571
want: map[MachineTypeKey]uint64{
56-
MachineTypeKey{
72+
{
5773
MachineType: "e2-standard-2",
5874
Zone: "myzone",
5975
}: 2,

cluster-autoscaler/cloudprovider/gce/gce_manager_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,9 +337,9 @@ func newTestGceManager(t *testing.T, testServerURL string, regional bool) *gceMa
337337
instanceRefToMigRef: make(map[GceRef]GceRef),
338338
instancesFromUnknownMigs: make(map[GceRef]struct{}),
339339
machinesCache: map[MachineTypeKey]machinesCacheValue{
340-
{"us-central1-b", "n1-standard-1"}: machinesCacheValue{&gce.MachineType{GuestCpus: 1, MemoryMb: 1}, nil},
341-
{"us-central1-c", "n1-standard-1"}: machinesCacheValue{&gce.MachineType{GuestCpus: 1, MemoryMb: 1}, nil},
342-
{"us-central1-f", "n1-standard-1"}: machinesCacheValue{&gce.MachineType{GuestCpus: 1, MemoryMb: 1}, nil},
340+
{"us-central1-b", "n1-standard-1"}: {&gce.MachineType{GuestCpus: 1, MemoryMb: 1}, nil},
341+
{"us-central1-c", "n1-standard-1"}: {&gce.MachineType{GuestCpus: 1, MemoryMb: 1}, nil},
342+
{"us-central1-f", "n1-standard-1"}: {&gce.MachineType{GuestCpus: 1, MemoryMb: 1}, nil},
343343
},
344344
migTargetSizeCache: map[GceRef]int64{},
345345
instanceTemplatesCache: map[GceRef]*gce.InstanceTemplate{},

vertical-pod-autoscaler/pkg/utils/metrics/metrics.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const (
4141
// TopMetricsNamespace is a prefix for all VPA-related metrics namespaces
4242
TopMetricsNamespace = "vpa_"
4343

44-
// The metrics will distinguish VPA sizes up to 2^MaxVpaSizeLog (~1M)
44+
// MaxVpaSizeLog - The metrics will distinguish VPA sizes up to 2^MaxVpaSizeLog (~1M)
4545
// Anything above that size will be reported in the top bucket.
4646
MaxVpaSizeLog = 20
4747
)

0 commit comments

Comments
 (0)