utils

package
v0.13.9 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 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(url string) *schema.GroupVersionKind

GetGVKFromURL since the URL is in the format /apis/{group}/{version}/{kind} or /api/{version}/{kind}, we can extract the GVK from the URL. However the kind will be the plural form.

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.DiscoveryClient, 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