utils

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGVKFromURL added in v0.7.0

func GetGVKFromURL(path string) *schema.GroupVersionKind

GetGVKFromURL extracts the GroupVersionKind from a cluster-scoped collection or named-resource URL. Kind contains the plural API resource name until ReplacePluralWithKind resolves it through discovery.

func GetNodeSelector

func GetNodeSelector(nl *corev1.NodeList, selectors []map[string]string) (*labels.Requirement, error)

func GetNodeSelectors

func GetNodeSelectors(_ *http.Request, proxyTenants []*tenant.ProxyTenant) (selectors []map[string]string)

func HandleGetSelector

func HandleGetSelector(ctx context.Context, obj client.Object, client client.Reader, requirements []labels.Requirement, name string, gv schema.GroupKind) (labels.Selector, error)

func HandleListSelector

func HandleListSelector(requirements []labels.Requirement) (selector labels.Selector, err error)

func ReplacePluralWithKind added in v0.7.0

func ReplacePluralWithKind(discoveryClient discovery.DiscoveryInterface, gvk *schema.GroupVersionKind) error

ReplacePluralWithKind returns the GroupVersionKind for a given plural name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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