mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 10:19:50 +00:00
Ignore deprecation warnings with //nolint:staticcheck
This commit is contained in:
parent
979c4254eb
commit
0f3836dcc5
@ -624,6 +624,7 @@ func serveMetrics(bindAddress, proxyMode string, enableProfiling bool, errCh cha
|
|||||||
})
|
})
|
||||||
|
|
||||||
//lint:ignore SA1019 See the Metrics Stability Migration KEP
|
//lint:ignore SA1019 See the Metrics Stability Migration KEP
|
||||||
|
//nolint:staticcheck
|
||||||
proxyMux.Handle("/metrics", legacyregistry.Handler())
|
proxyMux.Handle("/metrics", legacyregistry.Handler())
|
||||||
|
|
||||||
if enableProfiling {
|
if enableProfiling {
|
||||||
|
@ -45,6 +45,7 @@ type Config struct {
|
|||||||
DynInformerFactory dynamicinformer.DynamicSharedInformerFactory
|
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.
|
//lint:ignore SA1019 this deprecated field still needs to be used for now. It will be removed once the migration is done.
|
||||||
|
//nolint:staticcheck
|
||||||
EventBroadcaster events.EventBroadcasterAdapter
|
EventBroadcaster events.EventBroadcasterAdapter
|
||||||
|
|
||||||
// LeaderElection is optional.
|
// LeaderElection is optional.
|
||||||
|
@ -182,6 +182,7 @@ func (ds *dockerService) CreateContainer(_ context.Context, r *runtimeapi.Create
|
|||||||
hc.Resources.Devices = devices
|
hc.Resources.Devices = devices
|
||||||
|
|
||||||
//lint:ignore SA1019 backwards compatibility
|
//lint:ignore SA1019 backwards compatibility
|
||||||
|
//nolint:staticcheck
|
||||||
securityOpts, err := ds.getSecurityOpts(config.GetLinux().GetSecurityContext().GetSeccompProfilePath(), securityOptSeparator)
|
securityOpts, err := ds.getSecurityOpts(config.GetLinux().GetSecurityContext().GetSeccompProfilePath(), securityOptSeparator)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("failed to generate security options for container %q: %v", config.Metadata.Name, err)
|
return nil, fmt.Errorf("failed to generate security options for container %q: %v", config.Metadata.Name, err)
|
||||||
|
@ -354,6 +354,7 @@ func (s *Server) InstallDefaultHandlers() {
|
|||||||
s.addMetricsBucketMatcher("metrics/probes")
|
s.addMetricsBucketMatcher("metrics/probes")
|
||||||
s.addMetricsBucketMatcher("metrics/resource")
|
s.addMetricsBucketMatcher("metrics/resource")
|
||||||
//lint:ignore SA1019 https://github.com/kubernetes/enhancements/issues/1206
|
//lint:ignore SA1019 https://github.com/kubernetes/enhancements/issues/1206
|
||||||
|
//nolint:staticcheck
|
||||||
s.restfulCont.Handle(metricsPath, legacyregistry.Handler())
|
s.restfulCont.Handle(metricsPath, legacyregistry.Handler())
|
||||||
|
|
||||||
// cAdvisor metrics are exposed under the secured handler as well
|
// cAdvisor metrics are exposed under the secured handler as well
|
||||||
|
@ -254,8 +254,10 @@ func ShouldDeleteNamespaceDuringUpdate(ctx context.Context, key string, obj, exi
|
|||||||
|
|
||||||
func shouldHaveOrphanFinalizer(options *metav1.DeleteOptions, haveOrphanFinalizer bool) bool {
|
func shouldHaveOrphanFinalizer(options *metav1.DeleteOptions, haveOrphanFinalizer bool) bool {
|
||||||
//lint:ignore SA1019 backwards compatibility
|
//lint:ignore SA1019 backwards compatibility
|
||||||
|
//nolint:staticcheck
|
||||||
if options.OrphanDependents != nil {
|
if options.OrphanDependents != nil {
|
||||||
//lint:ignore SA1019 backwards compatibility
|
//lint:ignore SA1019 backwards compatibility
|
||||||
|
//nolint:staticcheck
|
||||||
return *options.OrphanDependents
|
return *options.OrphanDependents
|
||||||
}
|
}
|
||||||
if options.PropagationPolicy != nil {
|
if options.PropagationPolicy != nil {
|
||||||
@ -266,6 +268,7 @@ func shouldHaveOrphanFinalizer(options *metav1.DeleteOptions, haveOrphanFinalize
|
|||||||
|
|
||||||
func shouldHaveDeleteDependentsFinalizer(options *metav1.DeleteOptions, haveDeleteDependentsFinalizer bool) bool {
|
func shouldHaveDeleteDependentsFinalizer(options *metav1.DeleteOptions, haveDeleteDependentsFinalizer bool) bool {
|
||||||
//lint:ignore SA1019 backwards compatibility
|
//lint:ignore SA1019 backwards compatibility
|
||||||
|
//nolint:staticcheck
|
||||||
if options.OrphanDependents != nil {
|
if options.OrphanDependents != nil {
|
||||||
//lint:ignore SA1019 backwards compatibility
|
//lint:ignore SA1019 backwards compatibility
|
||||||
return *options.OrphanDependents == false
|
return *options.OrphanDependents == false
|
||||||
|
Loading…
Reference in New Issue
Block a user