mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
*: Fix linter warnings
Adapt to newly improved linters in golangci-lint v1.51.1 Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
This commit is contained in:
parent
64cf942ce8
commit
5e1f440d0a
@ -85,7 +85,6 @@ type Provider struct {
|
|||||||
podManager kubepod.Manager
|
podManager kubepod.Manager
|
||||||
runtimeCache kubecontainer.RuntimeCache
|
runtimeCache kubecontainer.RuntimeCache
|
||||||
containerStatsProvider
|
containerStatsProvider
|
||||||
rlimitStatsProvider
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// containerStatsProvider is an interface that provides the stats of the
|
// containerStatsProvider is an interface that provides the stats of the
|
||||||
@ -98,10 +97,6 @@ type containerStatsProvider interface {
|
|||||||
ImageFsDevice(ctx context.Context) (string, error)
|
ImageFsDevice(ctx context.Context) (string, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type rlimitStatsProvider interface {
|
|
||||||
RlimitStats() (*statsapi.RlimitStats, error)
|
|
||||||
}
|
|
||||||
|
|
||||||
// RlimitStats returns base information about process count
|
// RlimitStats returns base information about process count
|
||||||
func (p *Provider) RlimitStats() (*statsapi.RlimitStats, error) {
|
func (p *Provider) RlimitStats() (*statsapi.RlimitStats, error) {
|
||||||
return pidlimit.Stats()
|
return pidlimit.Stats()
|
||||||
|
@ -215,7 +215,6 @@ var noopCounterVec = &prometheus.CounterVec{}
|
|||||||
var noopHistogramVec = &prometheus.HistogramVec{}
|
var noopHistogramVec = &prometheus.HistogramVec{}
|
||||||
var noopTimingHistogramVec = &promext.TimingHistogramVec{}
|
var noopTimingHistogramVec = &promext.TimingHistogramVec{}
|
||||||
var noopGaugeVec = &prometheus.GaugeVec{}
|
var noopGaugeVec = &prometheus.GaugeVec{}
|
||||||
var noopObserverVec = &noopObserverVector{}
|
|
||||||
|
|
||||||
// just use a convenience struct for all the no-ops
|
// just use a convenience struct for all the no-ops
|
||||||
var noop = &noopMetric{}
|
var noop = &noopMetric{}
|
||||||
@ -234,22 +233,3 @@ func (noopMetric) Desc() *prometheus.Desc { return nil }
|
|||||||
func (noopMetric) Write(*dto.Metric) error { return nil }
|
func (noopMetric) Write(*dto.Metric) error { return nil }
|
||||||
func (noopMetric) Describe(chan<- *prometheus.Desc) {}
|
func (noopMetric) Describe(chan<- *prometheus.Desc) {}
|
||||||
func (noopMetric) Collect(chan<- prometheus.Metric) {}
|
func (noopMetric) Collect(chan<- prometheus.Metric) {}
|
||||||
|
|
||||||
type noopObserverVector struct{}
|
|
||||||
|
|
||||||
func (noopObserverVector) GetMetricWith(prometheus.Labels) (prometheus.Observer, error) {
|
|
||||||
return noop, nil
|
|
||||||
}
|
|
||||||
func (noopObserverVector) GetMetricWithLabelValues(...string) (prometheus.Observer, error) {
|
|
||||||
return noop, nil
|
|
||||||
}
|
|
||||||
func (noopObserverVector) With(prometheus.Labels) prometheus.Observer { return noop }
|
|
||||||
func (noopObserverVector) WithLabelValues(...string) prometheus.Observer { return noop }
|
|
||||||
func (noopObserverVector) CurryWith(prometheus.Labels) (prometheus.ObserverVec, error) {
|
|
||||||
return noopObserverVec, nil
|
|
||||||
}
|
|
||||||
func (noopObserverVector) MustCurryWith(prometheus.Labels) prometheus.ObserverVec {
|
|
||||||
return noopObserverVec
|
|
||||||
}
|
|
||||||
func (noopObserverVector) Describe(chan<- *prometheus.Desc) {}
|
|
||||||
func (noopObserverVector) Collect(chan<- prometheus.Metric) {}
|
|
||||||
|
@ -111,7 +111,6 @@ var _ = utils.SIGDescribe("PersistentVolumes [Feature:vsphere][Feature:LabelSele
|
|||||||
|
|
||||||
func testSetupVSpherePVClabelselector(ctx context.Context, c clientset.Interface, nodeInfo *NodeInfo, ns string, ssdlabels map[string]string, vvollabels map[string]string) (volumePath string, pvSsd *v1.PersistentVolume, pvcSsd *v1.PersistentVolumeClaim, pvcVvol *v1.PersistentVolumeClaim, err error) {
|
func testSetupVSpherePVClabelselector(ctx context.Context, c clientset.Interface, nodeInfo *NodeInfo, ns string, ssdlabels map[string]string, vvollabels map[string]string) (volumePath string, pvSsd *v1.PersistentVolume, pvcSsd *v1.PersistentVolumeClaim, pvcVvol *v1.PersistentVolumeClaim, err error) {
|
||||||
ginkgo.By("creating vmdk")
|
ginkgo.By("creating vmdk")
|
||||||
volumePath = ""
|
|
||||||
volumePath, err = nodeInfo.VSphere.CreateVolume(&VolumeOptions{}, nodeInfo.DataCenterRef)
|
volumePath, err = nodeInfo.VSphere.CreateVolume(&VolumeOptions{}, nodeInfo.DataCenterRef)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -52,9 +52,16 @@ import (
|
|||||||
"k8s.io/kubernetes/test/integration/framework"
|
"k8s.io/kubernetes/test/integration/framework"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//lint:ignore U1000 we need to alias only for the sake of embedding
|
||||||
type kubeClientSet = kubernetes.Interface
|
type kubeClientSet = kubernetes.Interface
|
||||||
|
|
||||||
|
//lint:ignore U1000 we need to alias only for the sake of embedding
|
||||||
type aggegatorClientSet = aggregator.Interface
|
type aggegatorClientSet = aggregator.Interface
|
||||||
|
|
||||||
|
//lint:ignore U1000 we need to alias only for the sake of embedding
|
||||||
type apiextensionsClientSet = apiextensions.Interface
|
type apiextensionsClientSet = apiextensions.Interface
|
||||||
|
|
||||||
|
//lint:ignore U1000 we need to alias only for the sake of embedding
|
||||||
type dynamicClientset = dynamic.Interface
|
type dynamicClientset = dynamic.Interface
|
||||||
type testClientSet struct {
|
type testClientSet struct {
|
||||||
kubeClientSet
|
kubeClientSet
|
||||||
|
Loading…
Reference in New Issue
Block a user