k8s

package
v1.0.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelWebhookName       = "webhook-name"
	LabelPullRequestNumber = "pull-request-number"
)

Variables

Set provides config and scheme. nolint: gochecknoglobals

Functions

func GVKToTypeMeta

func GVKToTypeMeta(gvk schema.GroupVersionKind) metav1.TypeMeta

func LoadConfig

func LoadConfig(config Config) (*rest.Config, error)

func LoadDocuments added in v1.0.0

func LoadDocuments(path string) ([]map[string]interface{}, error)

func LoadObjects added in v1.0.0

func LoadObjects(scheme *runtime.Scheme, path string) (output []runtime.Object, err error)

func MapObjects added in v1.0.0

func MapObjects(input []runtime.Object, fn func(runtime.Object) error) ([]runtime.Object, error)

func NewScheme

func NewScheme() (*runtime.Scheme, error)

func ToObject added in v1.0.0

func ToObject(scheme *runtime.Scheme, data interface{}) (runtime.Object, error)

func ToUnstructured added in v1.0.0

func ToUnstructured(data interface{}) (*unstructured.Unstructured, error)

Types

type Config

type Config struct {
	Namespace string `mapstructure:"namespace"`
	Config    string `mapstructure:"config"`
}

Jump to

Keyboard shortcuts

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