Merge pull request #299 from eyakubovich/master
config: document and update flannel config values
This commit is contained in:
commit
7cfa0df7c4
@ -109,7 +109,7 @@ flanneld. For example, the following cloud-config...
|
|||||||
|
|
||||||
coreos:
|
coreos:
|
||||||
flannel:
|
flannel:
|
||||||
etcd-prefix: /coreos.com/network2
|
etcd_prefix: /coreos.com/network2
|
||||||
```
|
```
|
||||||
|
|
||||||
...will generate a systemd unit drop-in like so:
|
...will generate a systemd unit drop-in like so:
|
||||||
@ -119,7 +119,15 @@ coreos:
|
|||||||
Environment="FLANNELD_ETCD_PREFIX=/coreos.com/network2"
|
Environment="FLANNELD_ETCD_PREFIX=/coreos.com/network2"
|
||||||
```
|
```
|
||||||
|
|
||||||
For the complete list of flannel configuraion parameters, see the [flannel documentation][flannel-readme].
|
List of flannel configuration parameters:
|
||||||
|
- **etcd_endpoints**: Comma separated list of etcd endpoints
|
||||||
|
- **etcd_cafile**: Path to CA file used for TLS communication with etcd
|
||||||
|
- **etcd_certfile**: Path to certificate file used for TLS communication with etcd
|
||||||
|
- **etcd_keyfile**: Path to private key file used for TLS communication with etcd
|
||||||
|
- **etcd_prefix**: Etcd prefix path to be used for flannel keys
|
||||||
|
- **ip_masq**: Install IP masquerade rules for traffic outside of flannel subnet
|
||||||
|
- **subnet_file**: Path to flannel subnet file to write out
|
||||||
|
- **interface**: Interface (name or IP) that should be used for inter-host communication
|
||||||
|
|
||||||
[flannel-readme]: https://github.com/coreos/flannel/blob/master/README.md
|
[flannel-readme]: https://github.com/coreos/flannel/blob/master/README.md
|
||||||
|
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
package config
|
package config
|
||||||
|
|
||||||
type Flannel struct {
|
type Flannel struct {
|
||||||
EtcdEndpoint string `yaml:"etcd_endpoint" env:"FLANNELD_ETCD_ENDPOINT"`
|
EtcdEndpoints string `yaml:"etcd_endpoints" env:"FLANNELD_ETCD_ENDPOINTS"`
|
||||||
EtcdPrefix string `yaml:"etcd_prefix" env:"FLANNELD_ETCD_PREFIX"`
|
EtcdCAFile string `yaml:"etcd_cafile" env:"FLANNELD_ETCD_CAFILE"`
|
||||||
IPMasq string `yaml:"ip_masq" env:"FLANNELD_IP_MASQ"`
|
EtcdCertFile string `yaml:"etcd_certfile" env:"FLANNELD_ETCD_CERTFILE"`
|
||||||
SubnetFile string `yaml:"subnet_file" env:"FLANNELD_SUBNET_FILE"`
|
EtcdKeyFile string `yaml:"etcd_keyfile" env:"FLANNELD_ETCD_KEYFILE"`
|
||||||
Iface string `yaml:"interface" env:"FLANNELD_IFACE"`
|
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"`
|
||||||
}
|
}
|
||||||
|
@ -18,10 +18,10 @@ func TestFlannelEnvVars(t *testing.T) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
config.Flannel{
|
config.Flannel{
|
||||||
EtcdEndpoint: "http://12.34.56.78:4001",
|
EtcdEndpoints: "http://12.34.56.78:4001",
|
||||||
EtcdPrefix: "/coreos.com/network/tenant1",
|
EtcdPrefix: "/coreos.com/network/tenant1",
|
||||||
},
|
},
|
||||||
`FLANNELD_ETCD_ENDPOINT=http://12.34.56.78:4001
|
`FLANNELD_ETCD_ENDPOINTS=http://12.34.56.78:4001
|
||||||
FLANNELD_ETCD_PREFIX=/coreos.com/network/tenant1`,
|
FLANNELD_ETCD_PREFIX=/coreos.com/network/tenant1`,
|
||||||
},
|
},
|
||||||
} {
|
} {
|
||||||
@ -43,13 +43,13 @@ func TestFlannelFile(t *testing.T) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
config.Flannel{
|
config.Flannel{
|
||||||
EtcdEndpoint: "http://12.34.56.78:4001",
|
EtcdEndpoints: "http://12.34.56.78:4001",
|
||||||
EtcdPrefix: "/coreos.com/network/tenant1",
|
EtcdPrefix: "/coreos.com/network/tenant1",
|
||||||
},
|
},
|
||||||
&File{config.File{
|
&File{config.File{
|
||||||
Path: "run/flannel/options.env",
|
Path: "run/flannel/options.env",
|
||||||
RawFilePermissions: "0644",
|
RawFilePermissions: "0644",
|
||||||
Content: `FLANNELD_ETCD_ENDPOINT=http://12.34.56.78:4001
|
Content: `FLANNELD_ETCD_ENDPOINTS=http://12.34.56.78:4001
|
||||||
FLANNELD_ETCD_PREFIX=/coreos.com/network/tenant1`,
|
FLANNELD_ETCD_PREFIX=/coreos.com/network/tenant1`,
|
||||||
}},
|
}},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user