Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { Name string Steps []VClusterStep // using UnmarshalYAML so that we don't need a custom type per action }
func (Action) GetSteps ¶
func (a Action) GetSteps() []builder.ExecutableStep
func (Action) MakeSteps ¶
func (a Action) MakeSteps() interface{}
MakeSteps builds a slice of VClusterStep for data to be unmarshaled into.
func (Action) MarshalYAML ¶
MarshalYAML converts the action back to a YAML representation install:
vcluster: ...
func (*Action) UnmarshalYAML ¶
UnmarshalYAML takes any yaml in this form ACTION: - vcluster: ... and puts the steps into the Action.Steps field
type Actions ¶
type Actions []Action
Actions is a set of actions, and the steps, passed from Porter.
func (*Actions) UnmarshalYAML ¶
UnmarshalYAML takes chunks of a porter.yaml file associated with this mixin and populates it on the current action set. install:
vcluster: ... vcluster: ...
upgrade:
vcluster: ...
type BuildInput ¶
type BuildInput struct {
Config MixinConfig
}
BuildInput represents stdin passed to the mixin for the build command.
type ConnectCommand ¶
type ConnectCommand struct { Name string `yaml:"name"` Namespace string `yaml:"namespace"` KubeConfig string `yaml:"kubeConfig"` KubeContext string `yaml:"kubeContext"` Address string `yaml:"address"` LocalPort int `yaml:"localPort"` Pod string `yaml:"pod"` Server string `yaml:"server"` Arguments []string `yaml:"arguments,omitempty"` Flags builder.Flags `yaml:"flags,omitempty"` Outputs []Output `yaml:"outputs,omitempty"` }
func (ConnectCommand) GetArguments ¶
func (c ConnectCommand) GetArguments() []string
func (ConnectCommand) GetCommand ¶
func (c ConnectCommand) GetCommand() string
func (ConnectCommand) GetFlags ¶
func (c ConnectCommand) GetFlags() builder.Flags
func (ConnectCommand) GetSuffixArguments ¶
func (c ConnectCommand) GetSuffixArguments() []string
func (ConnectCommand) SuppressesOutput ¶
func (c ConnectCommand) SuppressesOutput() bool
type CreateCommand ¶
type CreateCommand struct { Name string `yaml:"name"` Namespace string `yaml:"namespace"` KubeContext string `yaml:"kubeContext"` CreateClusterRole bool `yaml:"createClusterRole"` CreateNamespace bool `yaml:"createNamespace"` DisableIngressSync bool `yaml:"disableIngressSync"` Upgrade bool `yaml:"upgrade"` K3SImage string `yaml:"k3sImage"` Connect bool `yaml:"connect"` Expose bool `yaml:"expose"` ExtraConfig string `yaml:"extraConfig"` Arguments []string `yaml:"arguments,omitempty"` Flags builder.Flags `yaml:"flags,omitempty"` Outputs []Output `yaml:"outputs,omitempty"` }
func (CreateCommand) GetArguments ¶
func (c CreateCommand) GetArguments() []string
func (CreateCommand) GetCommand ¶
func (c CreateCommand) GetCommand() string
func (CreateCommand) GetFlags ¶
func (c CreateCommand) GetFlags() builder.Flags
func (CreateCommand) GetSuffixArguments ¶
func (c CreateCommand) GetSuffixArguments() []string
func (CreateCommand) SuppressesOutput ¶
func (c CreateCommand) SuppressesOutput() bool
type DeleteCommand ¶
type DeleteCommand struct { Name string `yaml:"name"` Namespace string `yaml:"namespace"` KubeContext string `yaml:"kubeContext"` DeleteNamespace bool `yaml:"deleteNamespace"` KeepPVC bool `yaml:"keepPVC"` Arguments []string `yaml:"arguments,omitempty"` Flags builder.Flags `yaml:"flags,omitempty"` Outputs []Output `yaml:"outputs,omitempty"` }
func (DeleteCommand) GetArguments ¶
func (c DeleteCommand) GetArguments() []string
func (DeleteCommand) GetCommand ¶
func (c DeleteCommand) GetCommand() string
func (DeleteCommand) GetFlags ¶
func (c DeleteCommand) GetFlags() builder.Flags
func (DeleteCommand) GetSuffixArguments ¶
func (c DeleteCommand) GetSuffixArguments() []string
func (DeleteCommand) SuppressesOutput ¶
func (c DeleteCommand) SuppressesOutput() bool
type Mixin ¶
type Mixin struct { *context.Context ClientVersion string `yaml:"clientVersion,omitempty"` HelmClientVersion string `yaml:"helmClientVersion,omitempty"` KubectlClientVersion string `yaml:"kubectlClientVersion,omitempty"` ClientPlatform string `yaml:"clientPlatform,omitempty"` ClientArchitecture string `yaml:"clientArchitecture,omitempty"` }
func (*Mixin) Build ¶
Build will generate the necessary Dockerfile lines for an invocation image using this mixin
func (*Mixin) PrintSchema ¶
type MixinConfig ¶
type MixinConfig struct { ClientVersion string `yaml:"clientVersion,omitempty"` HelmClientVersion string `yaml:"helmClientVersion,omitempty"` ClientPlatform string `yaml:"clientPlatform,omitempty"` ClientArchitecture string `yaml:"clientArchitecture,omitempty"` KubectlClientVersion string `yaml:"kubectlClientVersion,omitempty"` }
type Output ¶
type Output struct { Name string `yaml:"name"` // See https://porter.sh/mixins/exec/#outputs // TODO: If your mixin doesn't support these output types, you can remove these and the interface assertions above, and from #/definitions/outputs in schema.json JsonPath string `yaml:"jsonPath,omitempty"` FilePath string `yaml:"path,omitempty"` Regex string `yaml:"regex,omitempty"` }
func (Output) GetFilePath ¶
func (Output) GetJsonPath ¶
type Step ¶
type Step struct { Name string `yaml:"name"` Description string `yaml:"description"` KubeContext string `yaml:"kubeContext"` Arguments []string `yaml:"arguments,omitempty"` SuffixArguments []string `yaml:"suffix-arguments,omitempty"` Flags builder.Flags `yaml:"flags,omitempty"` Outputs []Output `yaml:"outputs,omitempty"` SuppressOutput bool `yaml:"suppress-output,omitempty"` }
func (Step) GetArguments ¶
func (Step) GetCommand ¶
func (Step) GetOutputs ¶
func (Step) GetSuffixArguments ¶
func (Step) SuppressesOutput ¶
type TestMixin ¶
type TestMixin struct { *Mixin TestContext *context.TestContext }
func NewTestMixin ¶
NewTestMixin initializes a mixin test client, with the output buffered, and an in-memory file system.
type VClusterCommand ¶
type VClusterCommand interface { builder.ExecutableStep builder.HasOrderedArguments builder.SuppressesOutput }
type VClusterStep ¶
type VClusterStep struct { Description string VClusterCommand }
func (*VClusterStep) UnmarshalYAML ¶
func (s *VClusterStep) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML takes any yaml in this form docker:
description: something COMMAND: # pull/build/run/... -> make the PullCommand/BuildCommand/RunCommand for us