mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Remove //lint:ignore pragmas that aren't being used anymore
This commit is contained in:
parent
a707061828
commit
07a883d8e6
@ -623,8 +623,7 @@ func serveMetrics(bindAddress, proxyMode string, enableProfiling bool, errCh cha
|
||||
fmt.Fprintf(w, "%s", proxyMode)
|
||||
})
|
||||
|
||||
//lint:ignore SA1019 See the Metrics Stability Migration KEP
|
||||
//nolint:staticcheck
|
||||
//nolint:staticcheck // SA1019 See the Metrics Stability Migration KEP
|
||||
proxyMux.Handle("/metrics", legacyregistry.Handler())
|
||||
|
||||
if enableProfiling {
|
||||
|
@ -44,8 +44,7 @@ type Config struct {
|
||||
InformerFactory informers.SharedInformerFactory
|
||||
DynInformerFactory dynamicinformer.DynamicSharedInformerFactory
|
||||
|
||||
//lint:ignore SA1019 this deprecated field still needs to be used for now. It will be removed once the migration is done.
|
||||
//nolint:staticcheck
|
||||
//nolint:staticcheck // SA1019 this deprecated field still needs to be used for now. It will be removed once the migration is done.
|
||||
EventBroadcaster events.EventBroadcasterAdapter
|
||||
|
||||
// LeaderElection is optional.
|
||||
|
@ -181,8 +181,7 @@ func (ds *dockerService) CreateContainer(_ context.Context, r *runtimeapi.Create
|
||||
}
|
||||
hc.Resources.Devices = devices
|
||||
|
||||
//lint:ignore SA1019 backwards compatibility
|
||||
//nolint:staticcheck
|
||||
//nolint:staticcheck // SA1019 backwards compatibility
|
||||
securityOpts, err := ds.getSecurityOpts(config.GetLinux().GetSecurityContext().GetSeccompProfilePath(), securityOptSeparator)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to generate security options for container %q: %v", config.Metadata.Name, err)
|
||||
|
@ -353,8 +353,7 @@ func (s *Server) InstallDefaultHandlers() {
|
||||
s.addMetricsBucketMatcher("metrics/cadvisor")
|
||||
s.addMetricsBucketMatcher("metrics/probes")
|
||||
s.addMetricsBucketMatcher("metrics/resource")
|
||||
//lint:ignore SA1019 https://github.com/kubernetes/enhancements/issues/1206
|
||||
//nolint:staticcheck
|
||||
//nolint:staticcheck // SA1019 https://github.com/kubernetes/enhancements/issues/1206
|
||||
s.restfulCont.Handle(metricsPath, legacyregistry.Handler())
|
||||
|
||||
// cAdvisor metrics are exposed under the secured handler as well
|
||||
|
@ -253,11 +253,8 @@ func ShouldDeleteNamespaceDuringUpdate(ctx context.Context, key string, obj, exi
|
||||
}
|
||||
|
||||
func shouldHaveOrphanFinalizer(options *metav1.DeleteOptions, haveOrphanFinalizer bool) bool {
|
||||
//lint:ignore SA1019 backwards compatibility
|
||||
//nolint:staticcheck
|
||||
//nolint:staticcheck // SA1019 backwards compatibility
|
||||
if options.OrphanDependents != nil {
|
||||
//lint:ignore SA1019 backwards compatibility
|
||||
//nolint:staticcheck
|
||||
return *options.OrphanDependents
|
||||
}
|
||||
if options.PropagationPolicy != nil {
|
||||
@ -267,10 +264,8 @@ func shouldHaveOrphanFinalizer(options *metav1.DeleteOptions, haveOrphanFinalize
|
||||
}
|
||||
|
||||
func shouldHaveDeleteDependentsFinalizer(options *metav1.DeleteOptions, haveDeleteDependentsFinalizer bool) bool {
|
||||
//lint:ignore SA1019 backwards compatibility
|
||||
//nolint:staticcheck
|
||||
//nolint:staticcheck // SA1019 backwards compatibility
|
||||
if options.OrphanDependents != nil {
|
||||
//lint:ignore SA1019 backwards compatibility
|
||||
return *options.OrphanDependents == false
|
||||
}
|
||||
if options.PropagationPolicy != nil {
|
||||
|
@ -304,8 +304,7 @@ func SupportsQuotas(m mount.Interface, path string) (bool, error) {
|
||||
// AssignQuota chooses the quota ID based on the pod UID and path.
|
||||
// If the pod UID is identical to another one known, it may (but presently
|
||||
// doesn't) choose the same quota ID as other volumes in the pod.
|
||||
//lint:ignore SA4009 poduid is overwritten by design, see comment below
|
||||
func AssignQuota(m mount.Interface, path string, poduid types.UID, bytes *resource.Quantity) error { //nolint:staticcheck
|
||||
func AssignQuota(m mount.Interface, path string, poduid types.UID, bytes *resource.Quantity) error { //nolint:staticcheck // SA4009 poduid is overwritten by design, see comment below
|
||||
if bytes == nil {
|
||||
return fmt.Errorf("attempting to assign null quota to %s", path)
|
||||
}
|
||||
@ -320,7 +319,7 @@ func AssignQuota(m mount.Interface, path string, poduid types.UID, bytes *resour
|
||||
// volumes in a pod, we can simply remove this line of code.
|
||||
// If and when we decide permanently that we're going to adopt
|
||||
// one quota per volume, we can rip all of the pod code out.
|
||||
poduid = types.UID(uuid.NewUUID()) //nolint:staticcheck
|
||||
poduid = types.UID(uuid.NewUUID()) //nolint:staticcheck // SA4009 poduid is overwritten by design, see comment above
|
||||
if pod, ok := dirPodMap[path]; ok && pod != poduid {
|
||||
return fmt.Errorf("requesting quota on existing directory %s but different pod %s %s", path, pod, poduid)
|
||||
}
|
||||
|
@ -598,13 +598,12 @@ func setupRCsPods(t *testing.T, gc *garbagecollector.GarbageCollector, clientSet
|
||||
}
|
||||
orphan := false
|
||||
switch {
|
||||
//lint:file-ignore SA1019 Keep testing deprecated OrphanDependents option until it's being removed
|
||||
case options.OrphanDependents == nil && options.PropagationPolicy == nil && len(initialFinalizers) == 0: //nolint:staticcheck
|
||||
case options.OrphanDependents == nil && options.PropagationPolicy == nil && len(initialFinalizers) == 0: //nolint:staticcheck // SA1019 Keep testing deprecated OrphanDependents option until it's being removed
|
||||
// if there are no deletion options, the default policy for replication controllers is orphan
|
||||
orphan = true
|
||||
case options.OrphanDependents != nil: //nolint:staticcheck
|
||||
case options.OrphanDependents != nil: //nolint:staticcheck // SA1019 Keep testing deprecated OrphanDependents option until it's being removed
|
||||
// if the deletion options explicitly specify whether to orphan, that controls
|
||||
orphan = *options.OrphanDependents //nolint:staticcheck
|
||||
orphan = *options.OrphanDependents //nolint:staticcheck // SA1019 Keep testing deprecated OrphanDependents option until it's being removed
|
||||
case options.PropagationPolicy != nil:
|
||||
// if the deletion options explicitly specify whether to orphan, that controls
|
||||
orphan = *options.PropagationPolicy == metav1.DeletePropagationOrphan
|
||||
|
@ -439,8 +439,7 @@ func benchmarkScheduling(numExistingPods, minPods int,
|
||||
testPodStrategy testutils.TestPodCreateStrategy,
|
||||
b *testing.B) {
|
||||
if b.N < minPods {
|
||||
//lint:ignore SA3001 Set a minimum for b.N to get more meaningful results
|
||||
b.N = minPods //nolint:staticcheck
|
||||
b.N = minPods //nolint:staticcheck // SA3001 Set a minimum for b.N to get more meaningful results
|
||||
}
|
||||
finalFunc, podInformer, clientset, _ := mustSetupScheduler(nil)
|
||||
defer finalFunc()
|
||||
|
Loading…
Reference in New Issue
Block a user