Skip to content

Commit

Permalink
Merge pull request #6698 from googs1025/master
Browse files Browse the repository at this point in the history
fix fmt errorf and typo
  • Loading branch information
k8s-ci-robot authored Apr 29, 2024
2 parents 4f1c8e6 + 376767c commit 7c86e28
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions vertical-pod-autoscaler/pkg/recommender/model/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ func (cluster *ClusterState) garbageCollectAggregateCollectionStates(now time.Ti
}

// RateLimitedGarbageCollectAggregateCollectionStates removes obsolete AggregateCollectionStates from the ClusterState.
// It performs clean up only if more than `gcInterval` passed since the last time it performed a clean up.
// It performs clean up only if more than `gcInterval` passed since the last time it performed a cleanup.
// AggregateCollectionState is obsolete in following situations:
// 1) It has no samples and there are no more contributive pods - a pod is contributive in any of following situations:
//
Expand Down Expand Up @@ -491,7 +491,7 @@ type aggregateStateKey struct {
labelSetMap *labelSetMap
}

// Labels returns the namespace for the aggregateStateKey.
// Namespace returns the namespace for the aggregateStateKey.
func (k aggregateStateKey) Namespace() string {
return k.namespace
}
Expand Down
2 changes: 1 addition & 1 deletion vertical-pod-autoscaler/pkg/recommender/model/vpa.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ func (vpa *Vpa) AsStatus() *vpa_types.VerticalPodAutoscalerStatus {
return status
}

// HasMatchedPods returns true if there are are currently active pods in the
// HasMatchedPods returns true if there are currently active pods in the
// cluster matching this VPA, based on conditions. UpdateConditions should be
// called first.
func (vpa *Vpa) HasMatchedPods() bool {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (r *recommender) GetClusterStateFeeder() input.ClusterStateFeeder {
return r.clusterStateFeeder
}

// Updates VPA CRD objects' statuses.
// UpdateVPAs update VPA CRD objects' status.
func (r *recommender) UpdateVPAs() {
cnt := metrics_recommender.NewObjectCounter()
defer cnt.Observe()
Expand Down
4 changes: 2 additions & 2 deletions vertical-pod-autoscaler/pkg/recommender/util/histogram.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,10 @@ func (h *histogram) SaveToChekpoint() (*vpa_types.HistogramCheckpoint, error) {

func (h *histogram) LoadFromCheckpoint(checkpoint *vpa_types.HistogramCheckpoint) error {
if checkpoint == nil {
return fmt.Errorf("Cannot load from empty checkpoint")
return fmt.Errorf("cannot load from empty checkpoint")
}
if checkpoint.TotalWeight < 0.0 {
return fmt.Errorf("Cannot load checkpoint with negative weight %v", checkpoint.TotalWeight)
return fmt.Errorf("cannot load checkpoint with negative weight %v", checkpoint.TotalWeight)
}
sum := int64(0)
for bucket, weight := range checkpoint.BucketWeights {
Expand Down

0 comments on commit 7c86e28

Please sign in to comment.