nodeconfigutils

package
v0.202610201654156703.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

View Source
const (
	CSE = "/opt/azure/containers/aks-node-controller provision-wait"

	AKSNodeConfigFilePath = "/opt/azure/containers/aks-node-controller-config.json"

	// EnabledFeaturesFilePath is read by the wrapper; must match its FEATURES_PATH.
	EnabledFeaturesFilePath = "/opt/azure/containers/enabled_features.sh"
)

Variables

This section is empty.

Functions

func CustomData

func CustomData(cfg *aksnodeconfigv1.Configuration) (string, error)

CustomData builds a base64-encoded MIME multipart document to be used as VM custom data for cloud-init. It encodes the node configuration as JSON, embeds it in a cloud-boothook script that writes the config to disk and starts the aks-node-controller service, then pairs it with a cloud-config part. Cloud-init processes each MIME part according to its Content-Type during the VM's first boot.

func CustomDataFlatcar added in v0.20260324.0

func CustomDataFlatcar(cfg *aksnodeconfigv1.Configuration) (string, error)

CustomDataFlatcar builds base64-encoded custom data for Flatcar Container Linux nodes. Unlike Ubuntu/Azure Linux which use cloud-init and expect MIME multipart custom data, Flatcar uses Ignition (configured via Butane) to process machine configuration. Ignition consumes a JSON document that declaratively specifies files to write to disk, so we embed the node config directly as a base64 data URI in an Ignition storage entry instead of wrapping it in a MIME multipart boothook script.

func MarshalConfigurationV1

func MarshalConfigurationV1(cfg *aksnodeconfigv1.Configuration) ([]byte, error)

func PopulateAllFields

func PopulateAllFields(msg proto.Message)

PopulateAllFields recursively populates all fields in a protobuf message with non-zero test values. This is used for testing to ensure all fields can be marshaled/unmarshaled correctly.

func UnmarshalConfigurationV1

func UnmarshalConfigurationV1(data []byte) (*aksnodeconfigv1.Configuration, error)

func Validate

func Validate(cfg *aksnodeconfigv1.Configuration) error

Validate checks required fields, then validates and normalizes provisioning settings in place. Producers (RP, E2E) call it before serialization and ANC calls it before rendering, so both sides enforce the same contract. It is idempotent.

Types

This section is empty.

Jump to

Keyboard shortcuts

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