userdata

package
v0.0.0-...-4263410 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package init provides functions for integration with virtual machine initialization frameworks like cloud-init.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateUserData

func GenerateUserData(ctx context.Context, userData *UserData) ([]byte, error)

GenerateUserData creates a cloud-init user-data from a build-in template.

Types

type UserData

type UserData struct {
	// Type defines hyperscaler platform for which the user data should be generated for
	Type models.ProviderType

	// PowerOff controls power state first boot setting. When set, user data
	// will contain instruction to power off the VM after initial launch after
	// initialization.
	PowerOff bool

	// PowerOffDelayMin specifies number of minutes after shutdown command is
	// executed. A warning over tty is sent to all logged users. Minimum value
	// is 1, when set negative or to zero, one minute will be used.
	PowerOffDelayMin int

	// A message that is passed to the poweroff command and shown to logged users.
	// When unset, "User data scheduled power off" is used.
	PowerOffMessage string

	// InsightsTags renders a first-boot script which populates /etc/insights-client/tags.yaml
	InsightsTags bool
}

func (UserData) IsAWS

func (ud UserData) IsAWS() bool

func (UserData) IsAzure

func (ud UserData) IsAzure() bool

func (UserData) IsGCP

func (ud UserData) IsGCP() bool

Jump to

Keyboard shortcuts

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