diff --git a/packages/os/host-containers-toml b/packages/os/host-containers-toml new file mode 100644 index 00000000000..2ece6847b1b --- /dev/null +++ b/packages/os/host-containers-toml @@ -0,0 +1,20 @@ +[required-extensions] +host-containers = "v1" ++++ +{{#if settings.host-containers}} +{{#each settings.host-containers}} +[host-containers."{{@key}}"] +{{#if this.source}} +source = "{{{this.source}}}" +{{/if}} +{{#if this.enabled}} +enabled = {{this.enabled}} +{{/if}} +{{#if this.superpowered}} +superpowered = {{this.superpowered}} +{{/if}} +{{#if this.user-data}} +user-data = "{{{this.user-data}}}" +{{/if}} +{{/each}} +{{/if}} diff --git a/packages/os/os.spec b/packages/os/os.spec index 5f562c68128..25f488d73d5 100644 --- a/packages/os/os.spec +++ b/packages/os/os.spec @@ -32,6 +32,7 @@ Source12: 00-resolved.conf Source13: cis-checks-k8s-metadata-json %endif Source14: certdog-toml +Source19: host-containers-toml # 1xx sources: systemd units Source100: apiserver.service @@ -473,7 +474,7 @@ install -d %{buildroot}%{_cross_datadir}/updog install -p -m 0644 %{_cross_repo_root_json} %{buildroot}%{_cross_datadir}/updog install -d %{buildroot}%{_cross_templatedir} -install -p -m 0644 %{S:5} %{S:6} %{S:7} %{S:8} %{S:14} %{buildroot}%{_cross_templatedir} +install -p -m 0644 %{S:5} %{S:6} %{S:7} %{S:8} %{S:14} %{S:19} %{buildroot}%{_cross_templatedir} install -d %{buildroot}%{_cross_unitdir} install -p -m 0644 \ @@ -591,6 +592,7 @@ install -p -m 0644 %{S:400} %{S:401} %{S:402} %{buildroot}%{_cross_licensedir} %{_cross_tmpfilesdir}/host-containers.conf %dir %{_cross_templatedir} %{_cross_templatedir}/host-ctr-toml +%{_cross_templatedir}/host-containers-toml %files -n %{_cross_os}storewolf %{_cross_bindir}/storewolf diff --git a/sources/models/shared-defaults/defaults.toml b/sources/models/shared-defaults/defaults.toml index 9f72f058b32..156ed274d0f 100644 --- a/sources/models/shared-defaults/defaults.toml +++ b/sources/models/shared-defaults/defaults.toml @@ -61,13 +61,17 @@ seed.setting-generator = "bork seed" # HostContainers [services.host-containers] -configuration-files = ["host-ctr-toml"] +configuration-files = ["host-ctr-toml", "host-containers-toml"] restart-commands = ["/usr/bin/host-containers"] [configuration-files.host-ctr-toml] path = "/etc/host-containers/host-ctr.toml" template-path = "/usr/share/templates/host-ctr-toml" +[configuration-files.host-containers-toml] +path = "/etc/host-containers/host-containers.toml" +template-path = "/usr/share/templates/host-containers-toml" + [metadata.settings.host-containers] affected-services = ["host-containers"]