feat(embedded registry): allow to enable embedded registry (#675)

This is a simple way to enable Spegel with k3s by following
https://docs.k3s.io/installation/registry-mirror?_highlight=spegel .

Part of https://github.com/kairos-io/kairos/issues/3100

Signed-off-by: mudler <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto
2025-01-09 15:43:02 +01:00
committed by GitHub
parent efd4796286
commit ee17f04079
2 changed files with 10 additions and 5 deletions

View File

@@ -77,4 +77,5 @@ type K3s struct {
ReplaceArgs bool `yaml:"replace_args,omitempty"`
Args []string `yaml:"args,omitempty"`
Enabled bool `yaml:"enabled,omitempty"`
EmbeddedRegistry bool `yaml:"embedded_registry,omitempty"`
}

View File

@@ -81,6 +81,10 @@ func genArgs(pconfig *providerConfig.Config, ip, ifaceIP string) (args []string)
args = append(args, fmt.Sprintf("--tls-san=%s", ip), fmt.Sprintf("--node-ip=%s", ifaceIP))
}
if pconfig.K3s.EmbeddedRegistry {
args = append(args, "--embedded-registry")
}
return
}