Documentation
¶
Index ¶
- Variables
- func CollectionKind(kind string) string
- func CommandCLIToKind(cli string) string
- func CommandCLIToType(cli string) string
- func CommandKindToCLI(kind string) string
- func CommandKindToType(kind string) string
- func GenerateName(kind string) string
- func RunnerArgsForKind(kind string, args []string) []string
- type Interface
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 CommandCLIToKind ¶
Convert stok CLI arg to k8s kind (e.g. plan -> Plan)
func CommandCLIToType ¶
Convert stok CLI arg to k8s resource type (e.g. plan -> plans)
func CommandKindToCLI ¶
Convert k8s kind to stok CLI arg (e.g. Plan -> plan)
func CommandKindToType ¶
Convert k8s kind to k8s API resource type (e.g. Plan -> plans)
func GenerateName ¶
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 ¶
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)
}
func NewCommandFromGVK ¶
Click to show internal directories.
Click to hide internal directories.