cloudinit

package
v1.8.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSecretResources

func GetSecretResources(
	ctx context.Context,
	k8sClient ctrlclient.Client,
	secretNamespace string,
	in cloudinit.CloudConfig) ([]ctrlclient.Object, error)

GetSecretResources returns a list of the Secret resources referenced by the provided CloudConfig.

func MarshalYAML

func MarshalYAML(
	in cloudinit.CloudConfig,
	secret CloudConfigSecretData) (string, error)

MarshalYAML marshals the provided CloudConfig and secret data to a valid, YAML CloudConfig document.

Types

type CloudConfigSecretData

type CloudConfigSecretData struct {
	// Users is a map where the key is the user's Name.
	Users map[string]CloudConfigUserSecretData

	// WriteFiles is a map where the key is the file's Path and the value is
	// the file's contents.
	WriteFiles map[string]string
}

CloudConfigSecretData is used to provide the sensitive data that may have been derived from Secret resources to the encoder.

func GetCloudConfigSecretData

func GetCloudConfigSecretData(
	ctx context.Context,
	k8sClient ctrlclient.Client,
	secretNamespace string,
	in cloudinit.CloudConfig) (CloudConfigSecretData, error)

GetCloudConfigSecretData returns the secret data related to inline CloudInit.

type CloudConfigUserSecretData

type CloudConfigUserSecretData struct {
	HashPasswd string
	Passwd     string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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