Skip to content

Commit

Permalink
feat(embedded registry): allow to enable embedded registry (#675)
Browse files Browse the repository at this point in the history
This is a simple way to enable Spegel with k3s by following
https://docs.k3s.io/installation/registry-mirror?_highlight=spegel .

Part of kairos-io/kairos#3100

Signed-off-by: mudler <[email protected]>
  • Loading branch information
mudler authored Jan 9, 2025
1 parent efd4796 commit ee17f04
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 6 additions & 5 deletions internal/provider/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ type HA struct {
}

type K3s struct {
Env map[string]string `yaml:"env,omitempty"`
ReplaceEnv bool `yaml:"replace_env,omitempty"`
ReplaceArgs bool `yaml:"replace_args,omitempty"`
Args []string `yaml:"args,omitempty"`
Enabled bool `yaml:"enabled,omitempty"`
Env map[string]string `yaml:"env,omitempty"`
ReplaceEnv bool `yaml:"replace_env,omitempty"`
ReplaceArgs bool `yaml:"replace_args,omitempty"`
Args []string `yaml:"args,omitempty"`
Enabled bool `yaml:"enabled,omitempty"`
EmbeddedRegistry bool `yaml:"embedded_registry,omitempty"`
}
4 changes: 4 additions & 0 deletions internal/role/p2p/master.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit ee17f04

Please sign in to comment.