namespacednamematcher

package
v1.13.0-rc.7 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EqualPrefixNameNamespaceMatcher

type EqualPrefixNameNamespaceMatcher struct {
	// contains filtered or unexported fields
}

func CreateFromString

func CreateFromString(s string) (*EqualPrefixNameNamespaceMatcher, error)

CreateFromString creates two maps from the CSV provided by the user of ns:sa values, one with namespace prefixes and one with namespace exact values. Inside each map we can have exact name or prefixed names. Note there might be overlap in prefixes, but we are not filtering it for now.

func (*EqualPrefixNameNamespaceMatcher) MatchesNamespacedName

func (m *EqualPrefixNameNamespaceMatcher) MatchesNamespacedName(namespace, name string) bool

MatchesNamespacedName matches an object against all the potential options in this matcher, we first check sorted prefixes to try to match the shortest one that could potentially cover others

Jump to

Keyboard shortcuts

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