iamroleselector

package
v0.53.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Matches

func Matches(selector *ackv1alpha1.IAMRoleSelector, ctx MatchContext) bool

Matches checks if a selector matches the given context Rules: AND between different field types, OR within arrays

Types

type Cache

type Cache struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Cache wraps the informer for IAMRoleSelector resources

func NewCache

func NewCache(log logr.Logger) *Cache

NewCache creates a new IAMRoleSelector cache

func (*Cache) GetMatchingSelectors

func (c *Cache) GetMatchingSelectors(
	namespace string,
	namespaceLabels map[string]string,
	gvk schema.GroupVersionKind,
) ([]*ackv1alpha1.IAMRoleSelector, error)

GetMatchingSelectors returns the list of IAMRoleSelectors that match the given context

func (*Cache) GetSelector

func (c *Cache) GetSelector(name string) (*ackv1alpha1.IAMRoleSelector, bool)

GetSelector returns a specific selector by name (useful for testing/debugging)

func (*Cache) HasSynced

func (c *Cache) HasSynced() bool

HasSynced returns true if the cache has synced

func (*Cache) ListSelectors

func (c *Cache) ListSelectors() []*ackv1alpha1.IAMRoleSelector

ListSelectors returns all valid selectors in the cache

func (*Cache) Matches

func (c *Cache) Matches(resource runtime.Object) ([]*ackv1alpha1.IAMRoleSelector, error)

Matches returns a list of IAMRoleSelectors that match the given resource. This function should only be called after the cache has been started and synced.

func (*Cache) Run

func (c *Cache) Run(client dynamic.Interface, namespaceClient kubernetes.Interface, stopCh <-chan struct{})

Run starts the cache and blocks until stopCh is closed

type MatchContext

type MatchContext struct {
	Namespace       string
	NamespaceLabels map[string]string
	GVK             schema.GroupVersionKind
}

MatchContext contains the attributes to match against an IAMRoleSelector

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL