Documentation ¶
Index ¶
- Constants
- Variables
- type AccountCache
- type Caches
- type Config
- type NamespaceCache
- func (c *NamespaceCache) GetDefaultRegion(namespace string) (string, bool)
- func (c *NamespaceCache) GetDeletionPolicy(namespace string, service string) (string, bool)
- func (c *NamespaceCache) GetEndpointURL(namespace string) (string, bool)
- func (c *NamespaceCache) GetOwnerAccountID(namespace string) (string, bool)
- func (c *NamespaceCache) Run(clientSet kubernetes.Interface, stopCh <-chan struct{})
Constants ¶
const ( // ACKRoleAccountMap is the name of the configmap map object storing // all the AWS Account IDs associated with their AWS Role ARNs. ACKRoleAccountMap = "ack-role-account-map" )
Variables ¶
var ( // ErrCARMConfigMapNotFound is an error that is returned when the CARM // configmap is not found. ErrCARMConfigMapNotFound = errors.New("CARM configmap not found") // ErrAccountIDNotFound is an error that is returned when the account ID // is not found in the CARM configmap. ErrAccountIDNotFound = errors.New("account ID not found in CARM configmap") // ErrEmptyRoleARN is an error that is returned when the role ARN is empty // in the CARM configmap. ErrEmptyRoleARN = errors.New("role ARN is empty in CARM configmap") )
Functions ¶
This section is empty.
Types ¶
type AccountCache ¶
AccountCache is responsible for caching the CARM configmap data. It is listening to all the events related to the CARM map and make the changes accordingly.
func NewAccountCache ¶
func NewAccountCache(log logr.Logger) *AccountCache
NewAccountCache instanciate a new AccountCache.
func (*AccountCache) GetAccountRoleARN ¶
func (c *AccountCache) GetAccountRoleARN(accountID string) (string, error)
GetAccountRoleARN queries the AWS accountID associated Role ARN from the cached CARM configmap. It will return an error if the configmap is not found, the accountID is not found or the role ARN is empty.
This function is thread safe.
func (*AccountCache) Run ¶
func (c *AccountCache) Run(clientSet kubernetes.Interface, stopCh <-chan struct{})
Run instantiate a new SharedInformer for ConfigMaps and runs it to begin processing items.
type Caches ¶
type Caches struct { // Accounts cache Accounts *AccountCache // Namespaces cache Namespaces *NamespaceCache // contains filtered or unexported fields }
Caches is used to interact with the different caches
func (Caches) Run ¶
func (c Caches) Run(clientSet kubernetes.Interface)
Run runs all the owned caches
type Config ¶ added in v0.29.2
type Config struct { // WatchScope is a list of namespaces to watch for resources WatchScope []string // Ignored is a list of namespaces to ignore Ignored []string }
Config is used to configure the caches.
type NamespaceCache ¶
NamespaceCache is responsible of keeping track of namespaces annotations, and caching those related to the ACK controller.
func NewNamespaceCache ¶
func NewNamespaceCache(log logr.Logger, watchScope []string, ignored []string) *NamespaceCache
NewNamespaceCache instanciate a new NamespaceCache.
func (*NamespaceCache) GetDefaultRegion ¶
func (c *NamespaceCache) GetDefaultRegion(namespace string) (string, bool)
GetDefaultRegion returns the default region if it it exists
func (*NamespaceCache) GetDeletionPolicy ¶ added in v0.22.1
func (c *NamespaceCache) GetDeletionPolicy(namespace string, service string) (string, bool)
GetDeletionPolicy returns the deletion policy if it exists
func (*NamespaceCache) GetEndpointURL ¶ added in v0.8.0
func (c *NamespaceCache) GetEndpointURL(namespace string) (string, bool)
GetEndpointURL returns the endpoint URL if it exists
func (*NamespaceCache) GetOwnerAccountID ¶
func (c *NamespaceCache) GetOwnerAccountID(namespace string) (string, bool)
GetOwnerAccountID returns the owner account ID if it exists
func (*NamespaceCache) Run ¶
func (c *NamespaceCache) Run(clientSet kubernetes.Interface, stopCh <-chan struct{})
Run instantiate a new shared informer for namespaces and runs it to begin processing items.