packer

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdatePackerBuildersJson

func UpdatePackerBuildersJson(dir string, metadata map[string]string) error

UpdatePackerBuildersJson pre-populates the metadata field in the packer.json file as objects cannot be passed as variables in packer.

Types

type Buildconfig

type Buildconfig struct {
	ImageName            string `json:"image_name,omitempty"`
	SourceImage          string `json:"source_image"`
	Networks             string `json:"networks"`
	Flavor               string `json:"flavor"`
	AttachConfigDrive    string `json:"attach_config_drive,omitempty"`
	UseFloatingIp        string `json:"use_floating_ip,omitempty"`
	FloatingIpNetwork    string `json:"floating_ip_network,omitempty"`
	CniVersion           string `json:"kubernetes_cni_semver,omitempty"`
	CniDebVersion        string `json:"kubernetes_cni_deb_version,omitempty"`
	CrictlVersion        string `json:"crictl_version,omitempty"`
	ImageVisibility      string `json:"image_visibility,omitempty"`
	KubernetesSemver     string `json:"kubernetes_semver,omitempty"`
	KubernetesRpmVersion string `json:"kubernetes_rpm_version,omitempty"`
	KubernetesSeries     string `json:"kubernetes_series,omitempty"`
	KubernetesDebVersion string `json:"kubernetes_deb_version,omitempty"`
	NodeCustomRolesPre   string `json:"node_custom_roles_pre,omitempty"`
	NodeCustomRolesPost  string `json:"node_custom_roles_post,omitempty"`
	AnsibleUserVars      string `json:"ansible_user_vars,omitempty"`
	ExtraDebs            string `json:"extra_debs,omitempty"`
	ImageDiskFormat      string `json:"image_disk_format"`
	VolumeType           string `json:"volume_type"`
	VolumeSize           string `json:"volume_size"`
}

Buildconfig exists to allow variables to be parsed into a packer json file which can then be used for a build.

func InitConfig

func InitConfig(o *flags.BuildOptions) *Buildconfig

InitConfig takes the application inputs and converts it into a Buildconfig.

func (*Buildconfig) GenerateVariablesFile

func (p *Buildconfig) GenerateVariablesFile(buildGitDir string)

GenerateVariablesFile converts the Buildconfig into a build configuration file that packer can use.

Jump to

Keyboard shortcuts

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