store the ovelats as yaml list

This commit is contained in:
Christian Goll
2022-03-24 19:45:51 +01:00
parent a2fd8ab112
commit c0f7ecf357
10 changed files with 174 additions and 80 deletions

View File

@@ -42,8 +42,8 @@ var (
SetClusterName string
SetIpxe string
SetInitOverlay string
SetRuntimeOverlay string
SetSystemOverlay string
SetRuntimeOverlay []string
SetSystemOverlay []string
SetIpmiNetmask string
SetIpmiPort string
SetIpmiGateway string
@@ -91,7 +91,7 @@ func init() {
baseCmd.PersistentFlags().StringVarP(&SetInit, "init", "i", "", "Define the init process to boot the container")
baseCmd.PersistentFlags().StringVar(&SetRoot, "root", "", "Define the rootfs")
baseCmd.PersistentFlags().StringVar(&SetAssetKey, "assetkey", "", "Set the node's Asset tag (key)")
baseCmd.PersistentFlags().StringVarP(&SetRuntimeOverlay, "runtime", "R", "", "Set the node's runtime overlay")
baseCmd.PersistentFlags().StringSliceVarP(&SetRuntimeOverlay, "runtime", "R", []string{}, "Set the node's runtime overlay")
if err := baseCmd.RegisterFlagCompletionFunc("runtime", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
list, _ := overlay.FindOverlays()
return list, cobra.ShellCompDirectiveNoFileComp
@@ -99,7 +99,7 @@ func init() {
log.Println(err)
}
baseCmd.PersistentFlags().StringVarP(&SetSystemOverlay, "system", "S", "", "Set the node's system overlay")
baseCmd.PersistentFlags().StringSliceVarP(&SetSystemOverlay, "system", "S", []string{}, "Set the node's system overlay")
if err := baseCmd.RegisterFlagCompletionFunc("system", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
list, _ := overlay.FindOverlays()
return list, cobra.ShellCompDirectiveNoFileComp