flannel: added flannel support and helper to make dropins

fleet, flannel, and etcd all generate dropins from config.
To reduce code duplication, factor out a helper to do that.
This commit is contained in:
Eugene Yakubovich
2014-10-06 12:06:33 -07:00
parent d9d89a6fa0
commit a20addd05e
9 changed files with 113 additions and 25 deletions

View File

@@ -30,11 +30,12 @@ import (
type CloudConfig struct {
SSHAuthorizedKeys []string `yaml:"ssh_authorized_keys"`
Coreos struct {
Etcd Etcd `yaml:"etcd"`
Fleet Fleet `yaml:"fleet"`
OEM OEM `yaml:"oem"`
Update Update `yaml:"update"`
Units []Unit `yaml:"units"`
Etcd Etcd `yaml:"etcd"`
Flannel Flannel `yaml:"flannel"`
Fleet Fleet `yaml:"fleet"`
OEM OEM `yaml:"oem"`
Update Update `yaml:"update"`
Units []Unit `yaml:"units"`
} `yaml:"coreos"`
WriteFiles []File `yaml:"write_files"`
Hostname string `yaml:"hostname"`

9
config/flannel.go Normal file
View File

@@ -0,0 +1,9 @@
package config
type Flannel struct {
EtcdEndpoint string `yaml:"etcd-endpoint" env:"FLANNELD_ETCD_ENDPOINT"`
EtcdPrefix string `yaml:"etcd-prefix" env:"FLANNELD_ETCD_PREFIX"`
IPMasq string `yaml:"ip-masq" env:"FLANNELD_IP_MASQ"`
SubnetFile string `yaml:"subnet-file" env:"FLANNELD_SUBNET_FILE"`
Iface string `yaml:"interface" env:"FLANNELD_IFACE"`
}