k8sutil

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2019 License: Apache-2.0 Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCRDManifestPaths added in v0.6.0

func GetCRDManifestPaths(crdsDir string) (crdPaths []string, err error)

func GetCRDs added in v0.6.0

func GetCRDs(crdsDir string) ([]*apiextv1beta1.CustomResourceDefinition, error)

func GetDisplayName added in v0.9.0

func GetDisplayName(name string) string

GetDisplayName turns a project dir name in any of {snake, chain, camel} cases, hierarchical dot structure, or space-delimited into a space-delimited, title'd display name. Ex. "another-_AppOperator_againTwiceThrice More" -> "Another App Operator Again Twice Thrice More"

func GetKubeconfigAndNamespace

func GetKubeconfigAndNamespace(configPath string) (*rest.Config, string, error)

GetKubeconfigAndNamespace returns the *rest.Config and default namespace defined in the kubeconfig at the specified path. If no path is provided, returns the default *rest.Config and namespace

func GetObjectBytes added in v0.6.0

func GetObjectBytes(obj interface{}, m MarshalFunc) ([]byte, error)

GetObjectBytes marshalls an object with m and removes runtime-managed fields: 'status', 'creationTimestamp'

func GetTypeMetaFromBytes added in v0.10.0

func GetTypeMetaFromBytes(b []byte) (t metav1.TypeMeta, err error)

GetTypeMetaFromBytes gets the type and object metadata from b. b is assumed to be a single Kubernetes resource manifest.

Types

type MarshalFunc added in v0.9.0

type MarshalFunc func(interface{}) ([]byte, error)

Jump to

Keyboard shortcuts

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