k8sutil

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

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 GetKindfromYAML added in v0.9.0

func GetKindfromYAML(yamlData []byte) (string, error)

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'

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