Skip to content
This repository was archived by the owner on Sep 18, 2020. It is now read-only.

Commit 2e0afb0

Browse files
authored
Merge pull request #447 from crawford/etcd
docs: deprecate etcd2 config section
2 parents b9afe07 + 2e4d34f commit 2e0afb0

File tree

3 files changed

+9
-15
lines changed

3 files changed

+9
-15
lines changed

Documentation/cloud-config.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ It will show `coreos-cloudinit` run output which was triggered by system boot.
2121

2222
## Configuration File
2323

24-
The file used by this system initialization program is called a "cloud-config" file. It is inspired by the [cloud-init][cloud-init] project's [cloud-config][cloud-config] file, which is "the defacto multi-distribution package that handles early initialization of a cloud instance" ([cloud-init docs][cloud-init-docs]). Because the cloud-init project includes tools which aren't used by CoreOS, only the relevant subset of its configuration items will be implemented in our cloud-config file. In addition to those, we added a few CoreOS-specific items, such as etcd configuration, OEM definition, and systemd units.
24+
The file used by this system initialization program is called a "cloud-config" file. It is inspired by the [cloud-init][cloud-init] project's [cloud-config][cloud-config] file, which is "the defacto multi-distribution package that handles early initialization of a cloud instance" ([cloud-init docs][cloud-init-docs]). Because the cloud-init project includes tools which aren't used by CoreOS, only the relevant subset of its configuration items will be implemented in our cloud-config file. In addition to those, we added a few CoreOS-specific items, such as etcd configuration (deprecated), OEM definition, and systemd units.
2525

2626
We've designed our implementation to allow the same cloud-config file to work across all of our supported platforms.
2727

@@ -56,7 +56,7 @@ CoreOS tries to conform to each platform's native method to provide user data. E
5656

5757
### coreos
5858

59-
#### etcd (deprecated. see etcd2)
59+
#### etcd (deprecated)
6060

6161
The `coreos.etcd.*` parameters will be translated to a partial systemd unit acting as an etcd configuration file.
6262
If the platform environment supports the templating feature of coreos-cloudinit it is possible to automate etcd configuration with the `$private_ipv4` and `$public_ipv4` fields. For example, the following cloud-config document...
@@ -90,7 +90,7 @@ _Note: The `$private_ipv4` and `$public_ipv4` substitution variables referenced
9090

9191
[etcd-config]: https://github.com/coreos/etcd/blob/release-0.4/Documentation/configuration.md
9292

93-
#### etcd2
93+
#### etcd2 (deprecated)
9494

9595
The `coreos.etcd2.*` parameters will be translated to a partial systemd unit acting as an etcd configuration file.
9696
If the platform environment supports the templating feature of coreos-cloudinit it is possible to automate etcd configuration with the `$private_ipv4` and `$public_ipv4` fields. When generating a [discovery token](https://discovery.etcd.io/new?size=3), set the `size` parameter, since etcd uses this to determine if all members have joined the cluster. After the cluster is bootstrapped, it can grow or shrink from this configured size.

config/config.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ type CloudConfig struct {
3737
}
3838

3939
type CoreOS struct {
40-
Etcd Etcd `yaml:"etcd"`
41-
Etcd2 Etcd2 `yaml:"etcd2"`
40+
Etcd Etcd `yaml:"etcd" deprecated:"etcd is no longer shipped in Container Linux"`
41+
Etcd2 Etcd2 `yaml:"etcd2" deprecated:"etcd2 will soon be removed from Container Linux"`
4242
Flannel Flannel `yaml:"flannel"`
43-
Fleet Fleet `yaml:"fleet"`
43+
Fleet Fleet `yaml:"fleet" deprecated:"fleet is no longer shipped in Container Linux"`
4444
Locksmith Locksmith `yaml:"locksmith"`
4545
OEM OEM `yaml:"oem"`
4646
Update Update `yaml:"update"`

config/validate/rules_test.go

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -112,20 +112,17 @@ func TestCheckStructure(t *testing.T) {
112112
entries: []Entry{{entryWarning, "unrecognized key \"test\"", 1}},
113113
},
114114
{
115-
config: "coreos:\n etcd:\n bad:",
115+
config: "coreos:\n flannel:\n bad:",
116116
entries: []Entry{{entryWarning, "unrecognized key \"bad\"", 3}},
117117
},
118118
{
119-
config: "coreos:\n etcd:\n discovery: good",
119+
config: "coreos:\n flannel:\n interface: good",
120120
},
121121

122122
// Test for deprecated keys
123-
{
124-
config: "coreos:\n etcd:\n addr: hi",
125-
},
126123
{
127124
config: "coreos:\n etcd:\n proxy: hi",
128-
entries: []Entry{{entryWarning, "deprecated key \"proxy\" (etcd2 options no longer work for etcd)", 3}},
125+
entries: []Entry{{entryWarning, "deprecated key \"etcd\" (etcd is no longer shipped in Container Linux)", 2}, {entryWarning, "deprecated key \"proxy\" (etcd2 options no longer work for etcd)", 3}},
129126
},
130127

131128
// Test for error on list of nodes
@@ -189,9 +186,6 @@ func TestCheckStructure(t *testing.T) {
189186
config: "coreos: hello",
190187
entries: []Entry{{entryWarning, "incorrect type for \"coreos\" (want struct)", 1}},
191188
},
192-
{
193-
config: "coreos:\n etcd:\n discovery: fire in the disco",
194-
},
195189
{
196190
config: "coreos:\n - hello",
197191
entries: []Entry{{entryWarning, "incorrect type for \"coreos\" (want struct)", 1}},

0 commit comments

Comments
 (0)