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

Spliting Container Linux Configuration in multiple files #564

Closed
Beetix opened this issue Dec 2, 2021 · 5 comments
Closed

Spliting Container Linux Configuration in multiple files #564

Beetix opened this issue Dec 2, 2021 · 5 comments

Comments

@Beetix
Copy link

Beetix commented Dec 2, 2021

Hi,

Is it possible to split the Container Linux Configuration in multiple files? Is there an include mechanism?

Thanks

@jepio
Copy link
Member

jepio commented Dec 3, 2021

There is a runtime include mechanism, so you can have a single config that references multiple others that get appended. Check out ignition.config.append here https://www.flatcar-linux.org/docs/latest/provisioning/config-transpiler/configuration/. Is that what you're after?

@Beetix
Copy link
Author

Beetix commented Dec 3, 2021

There is a runtime include mechanism, so you can have a single config that references multiple others that get appended. Check out ignition.config.append here https://www.flatcar-linux.org/docs/latest/provisioning/config-transpiler/configuration/. Is that what you're after?

I've just tried it like so:

ignition:
  config:
    append:
      - source: "../services/service.yaml"

I am getting an invalid url scheme error. My understanding is that it doesn't support inclusion of files from the local filesystem, right?

I saw in ct's usage a files-dir option. Is this used for the configuration yaml files?

Thank you for your help

@jepio
Copy link
Member

jepio commented Dec 3, 2021

ct's files-dir is applicable to storage.files.contents.local. ignition.config.append needs to be:

the URL of the config. Supported schemes are http, https, s3, tftp, and data

The only way to make this work right now, would be to format the configuration in the source field manually:

printf "data:;base64,%s\n" "$(ct <service.yaml | base64 -w 0)"

This value needs to go into the source field.

@Beetix
Copy link
Author

Beetix commented Dec 3, 2021

I see. Not very convenient 😬

Thanks

@jepio
Copy link
Member

jepio commented Jan 28, 2022

This will be possible when we upgrade to ignition v3.
#387

@jepio jepio closed this as completed Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants