boostrap pods -> static pods
This commit is contained in:
@ -24,14 +24,13 @@ var (
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
Hosts []*Host
|
||||
Clusters []*Cluster
|
||||
Configs []*Template
|
||||
StaticPods []*Template `yaml:"static_pods"`
|
||||
BootstrapPods map[string][]*Template `yaml:"bootstrap_pods"`
|
||||
Addons map[string][]*Template
|
||||
SSLConfig string `yaml:"ssl_config"`
|
||||
CertRequests []*CertRequest `yaml:"cert_requests"`
|
||||
Hosts []*Host
|
||||
Clusters []*Cluster
|
||||
Configs []*Template
|
||||
StaticPods map[string][]*Template `yaml:"static_pods"`
|
||||
Addons map[string][]*Template
|
||||
SSLConfig string `yaml:"ssl_config"`
|
||||
CertRequests []*CertRequest `yaml:"cert_requests"`
|
||||
}
|
||||
|
||||
func FromBytes(data []byte) (*Config, error) {
|
||||
@ -209,7 +208,7 @@ type Host struct {
|
||||
Config string
|
||||
Versions map[string]string
|
||||
|
||||
BootstrapPods string `yaml:"bootstrap_pods"`
|
||||
StaticPods string `yaml:"static_pods"`
|
||||
|
||||
Vars Vars
|
||||
}
|
||||
|
@ -34,8 +34,8 @@ func FromDir(
|
||||
}
|
||||
|
||||
config := &Config{
|
||||
Addons: make(map[string][]*Template),
|
||||
BootstrapPods: make(map[string][]*Template),
|
||||
Addons: make(map[string][]*Template),
|
||||
StaticPods: make(map[string][]*Template),
|
||||
}
|
||||
|
||||
// load clusters
|
||||
@ -123,12 +123,12 @@ func FromDir(
|
||||
|
||||
// cluster bootstrap pods
|
||||
for _, host := range config.Hosts {
|
||||
bpSet := host.BootstrapPods
|
||||
bpSet := host.StaticPods
|
||||
if bpSet == "" {
|
||||
continue
|
||||
}
|
||||
|
||||
if _, ok := config.BootstrapPods[bpSet]; ok {
|
||||
if _, ok := config.StaticPods[bpSet]; ok {
|
||||
continue
|
||||
}
|
||||
|
||||
@ -137,7 +137,7 @@ func FromDir(
|
||||
return nil, err
|
||||
}
|
||||
|
||||
config.BootstrapPods[bpSet] = templates
|
||||
config.StaticPods[bpSet] = templates
|
||||
}
|
||||
|
||||
// load SSL configuration
|
||||
|
Reference in New Issue
Block a user