utils

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 17 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDynamicResourceInterface

func GetDynamicResourceInterface(config *rest.Config, gvk schema.GroupVersionKind,
	namespace string) (dynamic.ResourceInterface, error)

GetDynamicResourceInterface returns a dynamic ResourceInterface for the policy's GroupVersionKind

func GetKubeconfigWithUserToken added in v0.3.0

func GetKubeconfigWithUserToken(ctx context.Context, idToken, caData []byte,
	userID, server string) ([]byte, error)

GetKubeconfigWithUserToken() accepts a k8s client interface, OIDC IDToken, username (e.g. user@example.org) and server with scheme, host, and port (e.g. https://127.0.0.1:1234) to return a kube-config with credentials set for the user.

func GetKubernetesVersion added in v0.16.0

func GetKubernetesVersion(ctx context.Context, cfg *rest.Config, logger logr.Logger) (string, error)

func GetUnstructured

func GetUnstructured(object []byte) (*unstructured.Unstructured, error)

GetUnstructured returns an unstructured given a []bytes containing it

Types

This section is empty.

Jump to

Keyboard shortcuts

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