ref

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckReferenceGrantForSecret

func CheckReferenceGrantForSecret(
	ctx context.Context, c client.Client, fromObj client.Object, secretRef gatewayv1.SecretObjectReference,
) (whyNotGranted string, isReferenceGranted bool, err error)

CheckReferenceGrantForSecret checks if the reference from the object (fromObj) to the secret specified in secretRef is granted. It is expected that secretRef.Namespace is set otherwise an error is returned. Examining returned values makes sense only if err is nil. When isReferenceGranted is false, whyNotGranted provides the reason (otherwise it is expected to be discarded).

func DoesFieldReferenceCoreV1Secret

func DoesFieldReferenceCoreV1Secret(secretRef gatewayv1.SecretObjectReference, fieldName string) error

DoesFieldReferenceCoreV1Secret checks if the SecretObjectReference refers to a Secret in the Corev1 group. If it does not, an error with explanation is returned.

func EnsureNamespaceInSecretRef

func EnsureNamespaceInSecretRef(secretRef *gatewayv1.SecretObjectReference, referencerNamespace gatewayv1.Namespace)

EnsureNamespaceInSecretRef ensures that the Namespace in the SecretObjectReference is set. If it is not set, it is set to referencerNamespace.

func IsReferenceGrantForObj

func IsReferenceGrantForObj(referenceGrant *gatewayv1beta1.ReferenceGrant, obj client.Object) bool

IsReferenceGrantForObj checks if ReferenceGrant's from clause matches the provided object's Group, Kind and namespace.

func ReferenceGrantForSecretFrom

func ReferenceGrantForSecretFrom(group gatewayv1.Group, kind gatewayv1.Kind) predicate.TypedFuncs[client.Object]

Predicates to filter only the ReferenceGrants that allow a Gateway cross-namespace reference.

Types

This section is empty.

Jump to

Keyboard shortcuts

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