process-user-data: process cloud-config yamls #1644
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #1639
The process-user-data tool is processing cloud-config data now instead of a raw daemon config json file. The latter required setting a parameter on the DaemonSet configuration, depending on whether a PodVM image has been built w/ cloud-config disabled or not.
The support is limited to the
write_files
directive and a subset of properties, specificallypath
andcontent
, as those are set by the cloud provider code. Parsing will fail if additional properties are encountered.In theory provider code can set additional properties, but atm we don't. (we might consider removing the unused props in the cloudconfig code, to avoid confusion)
All
write_files
entries but the one withpath: $daemonConfigPath
will be ignored.In the CAA code the
DISABLE_CLOUD_CONFIG
flag has been removed and providers will always set cloud-config files as user-data. For packer based builds, theDISABLE_CLOUD_CONFIG
env is still used to pick process-user-data instead of the system's cloud-init service.Testing done
Tested peerpod deployment successfully on Azure with an mkosi-based image (uses process-user-data exclusively) and a CAA daemonset with the
-disable-cloud-config
flag removed.