utils

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultResyncTime = 10 * time.Hour

Variables

This section is empty.

Functions

func AddToScheme added in v0.4.0

func AddToScheme(scheme *runtime.Scheme) error

func AlterFieldOfNestedStringMaps added in v0.0.5

func AlterFieldOfNestedStringMaps(obj interface{}, key string, value string) error

func CreateNamespacedObjectOnClusterFromYamlDefinition added in v0.6.0

func CreateNamespacedObjectOnClusterFromYamlDefinition(ctx context.Context, c client.Client, objYaml, namespace string) *unstructured.Unstructured

func CreateObjectOnClusterFromYamlDefinition added in v0.6.0

func CreateObjectOnClusterFromYamlDefinition(ctx context.Context, c client.Client, objYaml string) *unstructured.Unstructured

func GetObjectGVK

func GetObjectGVK(obj metav1.Object, scheme *runtime.Scheme) (schema.GroupVersionKind, error)

func GetQualifiedResource added in v0.6.0

func GetQualifiedResource(mapper meta.RESTMapper, obj *unstructured.Unstructured) (string, error)

func GetQualifiedResourceWithName added in v0.6.0

func GetQualifiedResourceWithName(mapper meta.RESTMapper, obj *unstructured.Unstructured) (string, error)

func HereYaml added in v0.0.5

func HereYaml(y string) string

func HereYamlF added in v0.0.5

func HereYamlF(y string, args ...interface{}) string

func SinglePathEvaluate

func SinglePathEvaluate(jsonpathExpression string, obj interface{}) ([]interface{}, error)

Types

type ConditionList added in v0.4.2

type ConditionList []metav1.Condition

func ExtractConditions added in v0.4.2

func ExtractConditions(stampedObject *unstructured.Unstructured) ConditionList

func (ConditionList) ConditionWithType added in v0.4.2

func (c ConditionList) ConditionWithType(conditionType string) *metav1.Condition

type KubeconfigRestricted added in v0.0.8

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

func NewKubeconfigRestricted added in v0.0.8

func NewKubeconfigRestricted(input string) (*KubeconfigRestricted, error)

NewKubeconfigRestricted takes kubeconfig yaml as input and returns kubeconfig yaml with certain fields restricted (removed). Developers may find it informative to view their own config at ~/.kube/config

func (*KubeconfigRestricted) AsYAML added in v0.0.8

func (r *KubeconfigRestricted) AsYAML() string

type ServiceAccounts added in v0.0.8

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

func (*ServiceAccounts) Find added in v0.0.8

func (s *ServiceAccounts) Find(nsName string, saName string) (*KubeconfigRestricted, error)

func (*ServiceAccounts) MakeKubeConfig added in v0.0.8

func (s *ServiceAccounts) MakeKubeConfig(secret *corev1.Secret) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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