packer

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdatePackerBuildersJson

func UpdatePackerBuildersJson(dir string, infra string, modifier BuildersModifier) error

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

Types

type BuildersModifier

type BuildersModifier struct {
	Function func(metadata map[string]string, data []byte) []byte
	Metadata map[string]string
}

type GlobalBuildConfig

type GlobalBuildConfig struct {
	CniVersion           string            `json:"kubernetes_cni_semver,omitempty"`
	CniDebVersion        string            `json:"kubernetes_cni_deb_version,omitempty"`
	CrictlVersion        string            `json:"crictl_version,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"`
	Metadata             map[string]string `json:"-"`
	OpenStackBuildconfig
	KubeVirtBuildConfig
}

func NewCoreBuildconfig

func NewCoreBuildconfig(o *flags.BuildOptions) (*GlobalBuildConfig, string, error)

func (*GlobalBuildConfig) GenerateVariablesFile

func (p *GlobalBuildConfig) GenerateVariablesFile(buildGitDir string)

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

type KubeVirtBuildConfig

type KubeVirtBuildConfig struct {
	QemuBinary      string `json:"qemu_binary"`
	DiskSize        string `json:"disk_size"`
	OutputDirectory string `json:"output_directory"`
}

KubeVirtBuildConfig adds additional packer vars for Kubevirt

type OpenStackBuildconfig

type OpenStackBuildconfig 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"`
	SSHPrivateKeyFile     string `json:"ssh_private_key_file,omitempty"`
	SSHKeypairName        string `json:"ssh_keypair_name,omitempty"`
	UseFloatingIp         string `json:"use_floating_ip,omitempty"`
	FloatingIpNetwork     string `json:"floating_ip_network,omitempty"`
	SecurityGroup         string `json:"security_groups,omitempty"`
	ImageVisibility       string `json:"image_visibility,omitempty"`
	ImageDiskFormat       string `json:"image_disk_format"`
	UseBlockStorageVolume string `json:"use_blockstorage_volume,omitempty"`
	VolumeType            string `json:"volume_type"`
	VolumeSize            string `json:"volume_size"`
}

OpenStackBuildconfig adds additional packer vars for OpenStack builds

Jump to

Keyboard shortcuts

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