command

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CommandKinds = []string{
	"Apply",
	"Destroy",
	"ForceUnlock",
	"Get",
	"Import",
	"Init",
	"Output",
	"Plan",
	"Refresh",
	"Shell",
	"Show",
	"State",
	"Taint",
	"Untaint",
	"Validate",
}

Functions

func CollectionKind

func CollectionKind(kind string) string

func CommandCLIToKind

func CommandCLIToKind(cli string) string

Convert stok CLI arg to k8s kind (e.g. plan -> Plan)

func CommandCLIToType

func CommandCLIToType(cli string) string

Convert stok CLI arg to k8s resource type (e.g. plan -> plans)

func CommandKindToCLI

func CommandKindToCLI(kind string) string

Convert k8s kind to stok CLI arg (e.g. Plan -> plan)

func CommandKindToType

func CommandKindToType(kind string) string

Convert k8s kind to k8s API resource type (e.g. Plan -> plans)

func GenerateName

func GenerateName(kind string) string

A (naive) implementation of the algorithm that k8s uses to generate a unique name on the server side when `generateName` is specified. Allows us to generate a unique name client-side for our k8s resources.

func RunnerArgsForKind

func RunnerArgsForKind(kind string, args []string) []string

For a given k8s kind and user supplied args, return the named program and args to be executed on the pod (e.g. plan -- -input=false -> terraform plan -input=false

Types

type Interface

type Interface interface {
	runtime.Object
	schema.ObjectKind
	metav1.Object

	GetConditions() *status.Conditions
	SetConditions(status.Conditions)
	GetArgs() []string
	SetArgs([]string)
	GetTimeoutClient() string
	SetTimeoutClient(string)
	GetTimeoutQueue() string
	SetTimeoutQueue(string)
	GetDebug() bool
	SetDebug(bool)
	GetConfigMap() string
	SetConfigMap(string)
	GetConfigMapKey() string
	SetConfigMapKey(string)
	GetWorkspace() string
	SetWorkspace(string)
}

func NewCommandFromGVK

func NewCommandFromGVK(scheme *runtime.Scheme, gvk schema.GroupVersionKind) (Interface, error)

Jump to

Keyboard shortcuts

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