mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Fix lint issues
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>
This commit is contained in:
parent
9f15368c5c
commit
8272fc54cb
@ -118,31 +118,31 @@ func NewServiceAccount() *serviceAccount {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *serviceAccount) SetExternalKubeClientSet(cl kubernetes.Interface) {
|
func (s *serviceAccount) SetExternalKubeClientSet(cl kubernetes.Interface) {
|
||||||
a.client = cl
|
s.client = cl
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *serviceAccount) SetExternalKubeInformerFactory(f informers.SharedInformerFactory) {
|
func (s *serviceAccount) SetExternalKubeInformerFactory(f informers.SharedInformerFactory) {
|
||||||
serviceAccountInformer := f.Core().V1().ServiceAccounts()
|
serviceAccountInformer := f.Core().V1().ServiceAccounts()
|
||||||
a.serviceAccountLister = serviceAccountInformer.Lister()
|
s.serviceAccountLister = serviceAccountInformer.Lister()
|
||||||
|
|
||||||
secretInformer := f.Core().V1().Secrets()
|
secretInformer := f.Core().V1().Secrets()
|
||||||
a.secretLister = secretInformer.Lister()
|
s.secretLister = secretInformer.Lister()
|
||||||
|
|
||||||
a.SetReadyFunc(func() bool {
|
s.SetReadyFunc(func() bool {
|
||||||
return serviceAccountInformer.Informer().HasSynced() && secretInformer.Informer().HasSynced()
|
return serviceAccountInformer.Informer().HasSynced() && secretInformer.Informer().HasSynced()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// ValidateInitialization ensures an authorizer is set.
|
// ValidateInitialization ensures an authorizer is set.
|
||||||
func (a *serviceAccount) ValidateInitialization() error {
|
func (s *serviceAccount) ValidateInitialization() error {
|
||||||
if a.client == nil {
|
if s.client == nil {
|
||||||
return fmt.Errorf("missing client")
|
return fmt.Errorf("missing client")
|
||||||
}
|
}
|
||||||
if a.secretLister == nil {
|
if s.secretLister == nil {
|
||||||
return fmt.Errorf("missing secretLister")
|
return fmt.Errorf("missing secretLister")
|
||||||
}
|
}
|
||||||
if a.serviceAccountLister == nil {
|
if s.serviceAccountLister == nil {
|
||||||
return fmt.Errorf("missing serviceAccountLister")
|
return fmt.Errorf("missing serviceAccountLister")
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user