kairos-io / kairos

:penguin: The immutable Linux meta-distribution for edge Kubernetes.
https://kairos.io
Apache License 2.0
1.09k stars 96 forks source link

:sparkles: add a version to cloud-config files #1023

Open mauromorales opened 1 year ago

mauromorales commented 1 year ago

Is your feature request related to a problem? Please describe.

If a cloud-config is shared between systems, and those systems are running different versions of the agent, they could possibly not match the schema structure. Since we don't fail for any “extra” keys, this could end up in a situation where the configuration seems to work on both different systems, but it doesn't do the same thing.

Describe the solution you'd like

I'd like to see cloud-configs introduce a version and that such version is a requirement for the cloud-config to be valid e.g.

#cloud-config
version: 1.6.0
users:
  - name: kairos

Describe alternatives you've considered

I think the version as part of the config file is just about standard, but open to any other suggestions

Additional context

n/a

jimmykarily commented 1 year ago

This needs some brainstorming. What is the version? The minimum version of kairos-agent you should use with this config? Instruction to kairos-agent to work in "compatibility mode" with that version?

mauromorales commented 1 year ago

Yup agreed, I think the underlying functionality will need some work. I just wanted to put it on an issue to not forget to work on this at some point