mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Merge pull request #85117 from hwdef/fix-staticcheck10
pkg/kubeapiserver: fix staticcheck warning
This commit is contained in:
		@@ -14,7 +14,6 @@ pkg/controller/podgc
 | 
			
		||||
pkg/controller/replicaset
 | 
			
		||||
pkg/controller/resourcequota
 | 
			
		||||
pkg/controller/statefulset
 | 
			
		||||
pkg/kubeapiserver/admission
 | 
			
		||||
pkg/kubelet/apis/podresources
 | 
			
		||||
pkg/kubelet/cm/devicemanager
 | 
			
		||||
pkg/kubelet/pluginmanager/operationexecutor
 | 
			
		||||
 
 | 
			
		||||
@@ -15,7 +15,6 @@ go_library(
 | 
			
		||||
        "//staging/src/k8s.io/apimachinery/pkg/util/wait:go_default_library",
 | 
			
		||||
        "//staging/src/k8s.io/apiserver/pkg/admission:go_default_library",
 | 
			
		||||
        "//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/initializer:go_default_library",
 | 
			
		||||
        "//staging/src/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library",
 | 
			
		||||
        "//staging/src/k8s.io/apiserver/pkg/server:go_default_library",
 | 
			
		||||
        "//staging/src/k8s.io/apiserver/pkg/util/webhook:go_default_library",
 | 
			
		||||
        "//staging/src/k8s.io/client-go/discovery/cached/memory:go_default_library",
 | 
			
		||||
 
 | 
			
		||||
@@ -19,8 +19,6 @@ package admission
 | 
			
		||||
import (
 | 
			
		||||
	"k8s.io/apimachinery/pkg/api/meta"
 | 
			
		||||
	"k8s.io/apiserver/pkg/admission"
 | 
			
		||||
	"k8s.io/apiserver/pkg/authorization/authorizer"
 | 
			
		||||
	"k8s.io/apiserver/pkg/util/webhook"
 | 
			
		||||
	quota "k8s.io/kubernetes/pkg/quota/v1"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
@@ -44,12 +42,9 @@ type WantsQuotaConfiguration interface {
 | 
			
		||||
 | 
			
		||||
// PluginInitializer is used for initialization of the Kubernetes specific admission plugins.
 | 
			
		||||
type PluginInitializer struct {
 | 
			
		||||
	authorizer                        authorizer.Authorizer
 | 
			
		||||
	cloudConfig        []byte
 | 
			
		||||
	restMapper         meta.RESTMapper
 | 
			
		||||
	quotaConfiguration quota.Configuration
 | 
			
		||||
	serviceResolver                   webhook.ServiceResolver
 | 
			
		||||
	authenticationInfoResolverWrapper webhook.AuthenticationInfoResolverWrapper
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var _ admission.PluginInitializer = &PluginInitializer{}
 | 
			
		||||
 
 | 
			
		||||
@@ -177,7 +177,7 @@ func (s *BuiltInAuthenticationOptions) Validate() []error {
 | 
			
		||||
	}
 | 
			
		||||
	if s.ServiceAccounts != nil && utilfeature.DefaultFeatureGate.Enabled(features.BoundServiceAccountTokenVolume) {
 | 
			
		||||
		if !utilfeature.DefaultFeatureGate.Enabled(features.TokenRequest) || !utilfeature.DefaultFeatureGate.Enabled(features.TokenRequestProjection) {
 | 
			
		||||
			allErrors = append(allErrors, errors.New("If the BoundServiceAccountTokenVolume feature is enabled,"+
 | 
			
		||||
			allErrors = append(allErrors, errors.New("if the BoundServiceAccountTokenVolume feature is enabled,"+
 | 
			
		||||
				" the TokenRequest and TokenRequestProjection features must also be enabled"))
 | 
			
		||||
		}
 | 
			
		||||
		if len(s.ServiceAccounts.Issuer) == 0 {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user