Remove deprecated etcd API fields and functions
@@ -16,7 +16,6 @@ type Cluster struct {
Name string `json:"name"`
Hosts []*HostConfig `json:"hosts"`
APIServer APIServerConfig `json:"apiserver"`
- ETCD ETCDConfig `json:"etcd"`
Provider ProviderConfig `json:"provider"`
Versions VersionConfig `json:"versions"`
Network NetworkConfig `json:"network"`
@@ -39,16 +38,6 @@ func (m *Cluster) DefaultAndValidate() error {
return errors.New("no master hosts specified")
}
- if m.ETCD.Version == "" {
- m.ETCD.Version = "3.2.24"
- }
-
- if m.ETCD.Version != "3.2.24" {
- return fmt.Errorf("Only supported etcd version is 3.2.24")
- }
-
- m.EtcdClusterToken()
-
m.Hosts[0].IsLeader = true
for idx, host := range m.Hosts {
@@ -89,12 +78,6 @@ func (m *Cluster) DefaultAndValidate() error {
return nil
}
-// EtcdClusterToken returns the cluster name
-// It must be deterministic across multiple runs
-func (m *Cluster) EtcdClusterToken() string {
- return m.Name
-}
-
// Leader returns the first configured host. Only call this after
// validating the cluster config to ensure a leader exists.
func (m *Cluster) Leader() (*HostConfig, error) {
@@ -169,25 +152,11 @@ func (m *HostConfig) AddDefaultsAndValidate() error {
return nil
}
-// EtcdURL with schema
-func (m *HostConfig) EtcdURL() string {
- return fmt.Sprintf("https://%s:2379", m.PrivateAddress)
-}
-
-// EtcdPeerURL with schema
-func (m *HostConfig) EtcdPeerURL() string {
- return fmt.Sprintf("https://%s:2380", m.PrivateAddress)
-}
-
// APIServerConfig describes the load balancer address.
type APIServerConfig struct {
Address string `json:"address"`
}
-type ETCDConfig struct {
- Version string `json:"address"`
-}
-
// ProviderName represents the name of an provider
type ProviderName string
@@ -314,11 +283,6 @@ func (m *VersionConfig) Validate() error {
return nil
}
-// Etcd version
-func (m *VersionConfig) Etcd() string {
- return "3.1.13"
-}
-
// NetworkConfig describes the node network.
type NetworkConfig struct {
PodSubnetVal string `json:"pod_subnet"`
