util

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSecret

func GetSecret(ctx context.Context, k8sClient client.Client, name, namespace string, logger logr.Logger) (*corev1.Secret, error)

getSecret retrieves a Kubernetes Secret.

func IsNameInList

func IsNameInList(obj client.Object, nameSet map[string]struct{}) bool

isNameInList checks if the secret's name is in the provided names set.

func MatchesAnyNamespaceSelector

func MatchesAnyNamespaceSelector(ctx context.Context, obj client.Object, namespaceSelectors []labels.Selector, client client.Client) (bool, error)

matchesAnyNamespaceSelector checks if the namespace labels match any of the provided namespace selectors.

func MatchesLabelSelectors

func MatchesLabelSelectors(ctx context.Context, obj client.Object, labelSelector labels.Selector, client client.Client) (bool, error)

matchesLabelSelectors checks if the secret's labels match the provided label selector.

Types

type TokenRetriever

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

func NewTokenRetriever

func NewTokenRetriever(k8sClient client.Client, logger logr.Logger, serviceAccountName, serviceAccountNamespace string) *TokenRetriever

func (*TokenRetriever) GetIdentityToken

func (tr *TokenRetriever) GetIdentityToken() ([]byte, error)

func (*TokenRetriever) GetServiceAccountToken

func (tr *TokenRetriever) GetServiceAccountToken() ([]byte, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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