canonical / cloud-init

Official upstream for the cloud-init: cloud instance initialization
https://cloud-init.io/
Other
2.92k stars 869 forks source link

[enhancement]: x-tensible user-data #5439

Open thielj opened 3 months ago

thielj commented 3 months ago

Enhancement

Document how custom / experimental / non-standard items can be added to user data without triggering schema errors, e.g. using an x- prefix:

x-mystuff:
  data: whatever
holmanb commented 3 months ago

Document how custom / experimental / non-standard items can be added to user data without triggering schema errors

No such feature exists currently. Which schema errors do you want to avoid?

thielj commented 3 months ago

Sorry, I should have been more precise.

Currently, there's just a warning in the log. I wouldn't want to see this turn into a hard error someday, or see non-standard sections disappear from the merged data.

holmanb commented 3 months ago

Sorry, I should have been more precise.

Currently, there's just a warning in the log. I wouldn't want to see this turn into a hard error someday, or see non-standard sections disappear from the merged data.

Could you give an example please?

thielj commented 3 months ago

@holmanb Nothing exciting really, just the ability to add a custom section that isn't going to disappear or cause conflicts in a future cloud-init release.


x-ourstuff: 
  my_machine_id: f18f1218-d8be-4c4d-92c0-bf1703d4e135a
  cifs:
    storageaccount.file.core.windows.net:
      /mnt/files: [ files, root, users, '0660', '0770' ]

packages: [ ourstuff-init, ourstuff-whatever ]

apt:
  sources:
    ourstuff:
      source: 'deb [trusted=yes] https://packages.example.com ourstuff/'
holmanb commented 3 months ago

Are you referring to third party / downstream config modules?