Documentation ¶
Index ¶
- Constants
- func GenerateUniqueName(prefix string) string
- type Artifact
- type Builder
- type CloudInitConfig
- type CommandRunner
- type Config
- type FlatConfig
- type ImageConfig
- type K8sConfig
- type ResourceConfig
- type RunConfig
- type StepCopyImage
- type StepKeyPair
- type StepPortForward
- type StepRunSourceServer
- type StepSayConfig
Constants ¶
View Source
const BuilderId = "tnosse.kubevirt"
Variables ¶
This section is empty.
Functions ¶
func GenerateUniqueName ¶
Types ¶
type Artifact ¶
type Artifact struct { // StateData should store data such as GeneratedData // to be shared with post-processors StateData map[string]interface{} }
packersdk.Artifact implementation
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func (*Builder) ConfigSpec ¶
func (b *Builder) ConfigSpec() hcldec.ObjectSpec
type CloudInitConfig ¶
type CloudInitConfig struct { Hostname string FQDN string Commands []string SSHAuthorizedKeys []string }
func (*CloudInitConfig) String ¶
func (cfg *CloudInitConfig) String() string
type CommandRunner ¶
type CommandRunner struct {
// contains filtered or unexported fields
}
func (*CommandRunner) Stop ¶
func (p *CommandRunner) Stop() error
func (*CommandRunner) Wait ¶
func (p *CommandRunner) Wait() error
type Config ¶
type Config struct { common.PackerConfig `mapstructure:",squash"` Comm communicator.Config K8sConfig K8sConfig `mapstructure:",squash"` ImageConfig ImageConfig `mapstructure:",squash"` RunConfig RunConfig `mapstructure:",squash"` ResourceConfig ResourceConfig `mapstructure:",squash"` // contains filtered or unexported fields }
type FlatConfig ¶
type FlatConfig struct { PackerBuildName *string `mapstructure:"packer_build_name" cty:"packer_build_name" hcl:"packer_build_name"` PackerBuilderType *string `mapstructure:"packer_builder_type" cty:"packer_builder_type" hcl:"packer_builder_type"` PackerCoreVersion *string `mapstructure:"packer_core_version" cty:"packer_core_version" hcl:"packer_core_version"` PackerDebug *bool `mapstructure:"packer_debug" cty:"packer_debug" hcl:"packer_debug"` PackerForce *bool `mapstructure:"packer_force" cty:"packer_force" hcl:"packer_force"` PackerOnError *string `mapstructure:"packer_on_error" cty:"packer_on_error" hcl:"packer_on_error"` PackerUserVars map[string]string `mapstructure:"packer_user_variables" cty:"packer_user_variables" hcl:"packer_user_variables"` PackerSensitiveVars []string `mapstructure:"packer_sensitive_variables" cty:"packer_sensitive_variables" hcl:"packer_sensitive_variables"` Comm *communicator.FlatConfig `cty:"comm" hcl:"comm"` Namespace *string `mapstructure:"namespace" cty:"namespace" hcl:"namespace"` ServiceType *v1.ServiceType `mapstructure:"service_type" cty:"service_type" hcl:"service_type"` ServicePort *int `mapstructure:"service_port" cty:"service_port" hcl:"service_port"` SkipExtractImage *bool `mapstructure:"skip_extract_image" cty:"skip_extract_image" hcl:"skip_extract_image"` OutputImageFile *string `mapstructure:"output_image_file" cty:"output_image_file" hcl:"output_image_file"` SSHHost *string `mapstructure:"ssh_host" cty:"ssh_host" hcl:"ssh_host"` SSHPort *int `mapstructure:"ssh_port" cty:"ssh_port" hcl:"ssh_port"` SSHUsername *string `mapstructure:"ssh_username" cty:"ssh_username" hcl:"ssh_username"` SSHPassword *string `mapstructure:"ssh_password" cty:"ssh_password" hcl:"ssh_password"` SSHKeyPairName *string `mapstructure:"ssh_keypair_name" undocumented:"true" cty:"ssh_keypair_name" hcl:"ssh_keypair_name"` SSHTemporaryKeyPairName *string `mapstructure:"temporary_key_pair_name" undocumented:"true" cty:"temporary_key_pair_name" hcl:"temporary_key_pair_name"` SSHTemporaryKeyPairType *string `mapstructure:"temporary_key_pair_type" cty:"temporary_key_pair_type" hcl:"temporary_key_pair_type"` SSHTemporaryKeyPairBits *int `mapstructure:"temporary_key_pair_bits" cty:"temporary_key_pair_bits" hcl:"temporary_key_pair_bits"` SSHCiphers []string `mapstructure:"ssh_ciphers" cty:"ssh_ciphers" hcl:"ssh_ciphers"` SSHClearAuthorizedKeys *bool `mapstructure:"ssh_clear_authorized_keys" cty:"ssh_clear_authorized_keys" hcl:"ssh_clear_authorized_keys"` SSHKEXAlgos []string `mapstructure:"ssh_key_exchange_algorithms" cty:"ssh_key_exchange_algorithms" hcl:"ssh_key_exchange_algorithms"` SSHPrivateKeyFile *string `mapstructure:"ssh_private_key_file" undocumented:"true" cty:"ssh_private_key_file" hcl:"ssh_private_key_file"` SSHCertificateFile *string `mapstructure:"ssh_certificate_file" cty:"ssh_certificate_file" hcl:"ssh_certificate_file"` SSHPty *bool `mapstructure:"ssh_pty" cty:"ssh_pty" hcl:"ssh_pty"` SSHTimeout *string `mapstructure:"ssh_timeout" cty:"ssh_timeout" hcl:"ssh_timeout"` SSHWaitTimeout *string `mapstructure:"ssh_wait_timeout" undocumented:"true" cty:"ssh_wait_timeout" hcl:"ssh_wait_timeout"` SSHAgentAuth *bool `mapstructure:"ssh_agent_auth" undocumented:"true" cty:"ssh_agent_auth" hcl:"ssh_agent_auth"` SSHDisableAgentForwarding *bool `mapstructure:"ssh_disable_agent_forwarding" cty:"ssh_disable_agent_forwarding" hcl:"ssh_disable_agent_forwarding"` SSHHandshakeAttempts *int `mapstructure:"ssh_handshake_attempts" cty:"ssh_handshake_attempts" hcl:"ssh_handshake_attempts"` SSHBastionHost *string `mapstructure:"ssh_bastion_host" cty:"ssh_bastion_host" hcl:"ssh_bastion_host"` SSHBastionPort *int `mapstructure:"ssh_bastion_port" cty:"ssh_bastion_port" hcl:"ssh_bastion_port"` SSHBastionAgentAuth *bool `mapstructure:"ssh_bastion_agent_auth" cty:"ssh_bastion_agent_auth" hcl:"ssh_bastion_agent_auth"` SSHBastionUsername *string `mapstructure:"ssh_bastion_username" cty:"ssh_bastion_username" hcl:"ssh_bastion_username"` SSHBastionPassword *string `mapstructure:"ssh_bastion_password" cty:"ssh_bastion_password" hcl:"ssh_bastion_password"` SSHBastionInteractive *bool `mapstructure:"ssh_bastion_interactive" cty:"ssh_bastion_interactive" hcl:"ssh_bastion_interactive"` SSHBastionPrivateKeyFile *string `mapstructure:"ssh_bastion_private_key_file" cty:"ssh_bastion_private_key_file" hcl:"ssh_bastion_private_key_file"` SSHBastionCertificateFile *string `mapstructure:"ssh_bastion_certificate_file" cty:"ssh_bastion_certificate_file" hcl:"ssh_bastion_certificate_file"` SSHFileTransferMethod *string `mapstructure:"ssh_file_transfer_method" cty:"ssh_file_transfer_method" hcl:"ssh_file_transfer_method"` SSHProxyHost *string `mapstructure:"ssh_proxy_host" cty:"ssh_proxy_host" hcl:"ssh_proxy_host"` SSHProxyPort *int `mapstructure:"ssh_proxy_port" cty:"ssh_proxy_port" hcl:"ssh_proxy_port"` SSHProxyUsername *string `mapstructure:"ssh_proxy_username" cty:"ssh_proxy_username" hcl:"ssh_proxy_username"` SSHProxyPassword *string `mapstructure:"ssh_proxy_password" cty:"ssh_proxy_password" hcl:"ssh_proxy_password"` SSHKeepAliveInterval *string `mapstructure:"ssh_keep_alive_interval" cty:"ssh_keep_alive_interval" hcl:"ssh_keep_alive_interval"` SSHReadWriteTimeout *string `mapstructure:"ssh_read_write_timeout" cty:"ssh_read_write_timeout" hcl:"ssh_read_write_timeout"` SSHRemoteTunnels []string `mapstructure:"ssh_remote_tunnels" cty:"ssh_remote_tunnels" hcl:"ssh_remote_tunnels"` SSHLocalTunnels []string `mapstructure:"ssh_local_tunnels" cty:"ssh_local_tunnels" hcl:"ssh_local_tunnels"` SSHPublicKey []byte `mapstructure:"ssh_public_key" undocumented:"true" cty:"ssh_public_key" hcl:"ssh_public_key"` SSHPrivateKey []byte `mapstructure:"ssh_private_key" undocumented:"true" cty:"ssh_private_key" hcl:"ssh_private_key"` SourceImage *string `mapstructure:"source_image" cty:"source_image" hcl:"source_image"` SourceServerWaitTime *int `mapstructure:"source_server_wait_time" cty:"source_server_wait_time" hcl:"source_server_wait_time"` Storage *string `mapstructure:"storage" cty:"storage" hcl:"storage"` Memory *string `mapstructure:"memory" cty:"memory" hcl:"memory"` Cpu *string `mapstructure:"cpu" cty:"cpu" hcl:"cpu"` }
FlatConfig is an auto-generated flat version of Config. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type ImageConfig ¶
type ImageConfig struct { SkipExtractImage bool `mapstructure:"skip_extract_image"` OutputImageFile string `mapstructure:"output_image_file"` }
func (*ImageConfig) Prepare ¶
func (c *ImageConfig) Prepare(ctx *interpolate.Context) []error
type K8sConfig ¶
type K8sConfig struct { Namespace string `mapstructure:"namespace"` ServiceType v1.ServiceType `mapstructure:"service_type"` ServicePort int `mapstructure:"service_port"` }
type ResourceConfig ¶ added in v0.0.4
type ResourceConfig struct { Storage string `mapstructure:"storage"` Memory string `mapstructure:"memory"` Cpu string `mapstructure:"cpu"` }
func (*ResourceConfig) Prepare ¶ added in v0.0.4
func (c *ResourceConfig) Prepare(i *interpolate.Context, c2 *communicator.Config) []error
type RunConfig ¶
type RunConfig struct { communicator.SSH `mapstructure:",squash"` SourceImage string `mapstructure:"source_image"` SourceServerWaitTime int `mapstructure:"source_server_wait_time"` }
func (*RunConfig) Prepare ¶
func (c *RunConfig) Prepare(ctx *interpolate.Context, k8sConfig *K8sConfig, comm *communicator.Config) []error
type StepCopyImage ¶
func (*StepCopyImage) Cleanup ¶
func (s *StepCopyImage) Cleanup(state multistep.StateBag)
func (*StepCopyImage) Run ¶
func (s *StepCopyImage) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepKeyPair ¶
type StepKeyPair struct { Debug bool Comm *communicator.Config DebugKeyPath string }
func (*StepKeyPair) Cleanup ¶
func (s *StepKeyPair) Cleanup(state multistep.StateBag)
func (*StepKeyPair) Run ¶
func (s *StepKeyPair) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepPortForward ¶
type StepPortForward struct { }
func (*StepPortForward) Cleanup ¶
func (s *StepPortForward) Cleanup(state multistep.StateBag)
func (*StepPortForward) Run ¶
func (s *StepPortForward) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepRunSourceServer ¶
func (*StepRunSourceServer) Cleanup ¶
func (s *StepRunSourceServer) Cleanup(state multistep.StateBag)
func (*StepRunSourceServer) Run ¶
func (s *StepRunSourceServer) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepSayConfig ¶
type StepSayConfig struct {
MockConfig string
}
This is a definition of a builder step and should implement multistep.Step
func (*StepSayConfig) Cleanup ¶
func (s *StepSayConfig) Cleanup(_ multistep.StateBag)
Cleanup can be used to clean up any artifact created by the step. A step's clean up always run at the end of a build, regardless of whether provisioning succeeds or fails.
func (*StepSayConfig) Run ¶
func (s *StepSayConfig) Run(_ context.Context, state multistep.StateBag) multistep.StepAction
Run should execute the purpose of this step
Click to show internal directories.
Click to hide internal directories.