mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 21:47:07 +00:00
Merge pull request #52985 from mattjmcnaughton/mattjmcnaughton/improve-horizontal-documentation
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Improve `horizontal.go` documentation **What this PR does / why we need it**: Resolve the remaining `golint` errors in the `pkg/controller/podautoscaler` package by improving the documentation in `horizontal.go`. Now all public methods have comments. **Special notes for your reviewer**: Re discussions in [this pr](https://github.com/kubernetes/kubernetes/pull/52238). **Release note**: ```release-note NONE ```
This commit is contained in:
commit
e7c61da14f
@ -79,6 +79,9 @@ func UnsafeConvertToVersionVia(obj runtime.Object, externalVersion schema.GroupV
|
|||||||
return objExt, err
|
return objExt, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HorizontalController is responsible for the synchronizing HPA objects stored
|
||||||
|
// in the system with the actual deployments/replication controllers they
|
||||||
|
// control.
|
||||||
type HorizontalController struct {
|
type HorizontalController struct {
|
||||||
scaleNamespacer extensionsclient.ScalesGetter
|
scaleNamespacer extensionsclient.ScalesGetter
|
||||||
hpaNamespacer autoscalingclient.HorizontalPodAutoscalersGetter
|
hpaNamespacer autoscalingclient.HorizontalPodAutoscalersGetter
|
||||||
@ -98,6 +101,7 @@ type HorizontalController struct {
|
|||||||
queue workqueue.RateLimitingInterface
|
queue workqueue.RateLimitingInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NewHorizontalController creates a new HorizontalController.
|
||||||
func NewHorizontalController(
|
func NewHorizontalController(
|
||||||
evtNamespacer v1core.EventsGetter,
|
evtNamespacer v1core.EventsGetter,
|
||||||
scaleNamespacer extensionsclient.ScalesGetter,
|
scaleNamespacer extensionsclient.ScalesGetter,
|
||||||
@ -138,6 +142,7 @@ func NewHorizontalController(
|
|||||||
return hpaController
|
return hpaController
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Run begins watching and syncing.
|
||||||
func (a *HorizontalController) Run(stopCh <-chan struct{}) {
|
func (a *HorizontalController) Run(stopCh <-chan struct{}) {
|
||||||
defer utilruntime.HandleCrash()
|
defer utilruntime.HandleCrash()
|
||||||
defer a.queue.ShutDown()
|
defer a.queue.ShutDown()
|
||||||
|
Loading…
Reference in New Issue
Block a user