Clarify log messages in controller pkg
This commit is contained in:
parent
92474ed1ac
commit
472dcb371b
11 changed files with 168 additions and 138 deletions
|
|
@ -18,9 +18,22 @@ package store
|
|||
|
||||
import (
|
||||
"k8s.io/client-go/tools/cache"
|
||||
"k8s.io/ingress-nginx/internal/ingress/annotations"
|
||||
)
|
||||
|
||||
// IngressAnnotationsLister makes a Store that lists annotations in Ingress rules.
|
||||
type IngressAnnotationsLister struct {
|
||||
cache.Store
|
||||
}
|
||||
|
||||
// ByKey returns the Ingress annotations matching key in the local Ingress annotations Store.
|
||||
func (il IngressAnnotationsLister) ByKey(key string) (*annotations.Ingress, error) {
|
||||
i, exists, err := il.GetByKey(key)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, NotExistsError(key)
|
||||
}
|
||||
return i.(*annotations.Ingress), nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue