Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Users validation warning #988

Open
mauromorales opened this issue Mar 1, 2023 · 2 comments
Open

🐛 Users validation warning #988

mauromorales opened this issue Mar 1, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@mauromorales
Copy link
Member

The validator is currently warning about this config

#node-config

stages:
   initramfs:
     - name: "Set user and password"
       users:
        kairos:
          passwd: "kairos"
       hostname: kairos-{{ trunc 4 .Random }}

With the message

WARNING: jsonschema: '' does not validate with file:///home/kairos/schema.json#/required: missing properties: 'users'

This is because the current schema expects users to be defined at the root level.

@mauromorales mauromorales added the bug Something isn't working label Mar 1, 2023
@mauromorales
Copy link
Member Author

@mudler why is it possible to define the users in the different stages?

With the current way, I build the schema validation, it will be possible to check every place where the users can be defined, but, it might make the schema very hard to read. So, if we have to support such scenarios in multiple stages, I'm thinking I'll have to add a second tier of validations, so I can keep the schema a bit more simple. However, my main desire to keep everything on a JSON schema, is that any other tool can read it and ensure validation on their own, i.e., there's no hidden magic or need to dig into the code. WDYT?

@mauromorales
Copy link
Member Author

Ok, Itxaka explained this a bit more in detail, so it's clear I have to support it. I will think about those two options and come back with more info to share with the team and get some feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants