mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-06-03 01:44:53 +00:00
✨ set local_file bundleconfig to true if target prefix is file:// (#823)
set local file bundleconfig to true if target prefix is file:// Signed-off-by: Santhosh <santhosh@spectrocloud.com>
This commit is contained in:
parent
b37a34beae
commit
0a62e316e0
@ -20,7 +20,10 @@ import (
|
|||||||
"gopkg.in/yaml.v3"
|
"gopkg.in/yaml.v3"
|
||||||
)
|
)
|
||||||
|
|
||||||
const DefaultWebUIListenAddress = ":8080"
|
const (
|
||||||
|
DefaultWebUIListenAddress = ":8080"
|
||||||
|
FilePrefix = "file://"
|
||||||
|
)
|
||||||
|
|
||||||
type Install struct {
|
type Install struct {
|
||||||
Auto bool `yaml:"auto,omitempty"`
|
Auto bool `yaml:"auto,omitempty"`
|
||||||
@ -53,11 +56,11 @@ type Config struct {
|
|||||||
type Bundles []Bundle
|
type Bundles []Bundle
|
||||||
|
|
||||||
type Bundle struct {
|
type Bundle struct {
|
||||||
Repository string `yaml:"repository,omitempty"`
|
Repository string `yaml:"repository,omitempty"`
|
||||||
Rootfs string `yaml:"rootfs_path,omitempty"`
|
Rootfs string `yaml:"rootfs_path,omitempty"`
|
||||||
DB string `yaml:"db_path,omitempty"`
|
DB string `yaml:"db_path,omitempty"`
|
||||||
|
LocalFile bool `yaml:"local_file,omitempty"`
|
||||||
Targets []string `yaml:"targets,omitempty"`
|
Targets []string `yaml:"targets,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
const DefaultHeader = "#cloud-config"
|
const DefaultHeader = "#cloud-config"
|
||||||
@ -84,6 +87,9 @@ func (b Bundles) Options() (res [][]bundles.BundleOption) {
|
|||||||
if bundle.DB != "" {
|
if bundle.DB != "" {
|
||||||
opts = append(opts, bundles.WithDBPath(bundle.DB))
|
opts = append(opts, bundles.WithDBPath(bundle.DB))
|
||||||
}
|
}
|
||||||
|
if bundle.LocalFile {
|
||||||
|
opts = append(opts, bundles.WithLocalFile(true))
|
||||||
|
}
|
||||||
res = append(res, opts)
|
res = append(res, opts)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user