Skip to content

Commit

Permalink
Set DatastoreType etcdv3 if EtcdEndpoints or EtcdAddr specified
Browse files Browse the repository at this point in the history
  • Loading branch information
Neil Jerram committed Sep 18, 2020
1 parent 5dfa987 commit e3b0ddb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/config_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -520,10 +520,12 @@ func (config *Config) DatastoreConfig() apiconfig.CalicoAPIConfig {
if config.setByConfigFileOrEnvironment("EtcdEndpoints") && len(config.EtcdEndpoints) > 0 {
log.Infof("Overriding EtcdEndpoints from felix config to %s", config.EtcdEndpoints)
cfg.Spec.EtcdEndpoints = strings.Join(config.EtcdEndpoints, ",")
cfg.Spec.DatastoreType = apiconfig.EtcdV3
} else if config.setByConfigFileOrEnvironment("EtcdAddr") {
etcdEndpoints := config.EtcdScheme + "://" + config.EtcdAddr
log.Infof("Overriding EtcdEndpoints from felix config to %s", etcdEndpoints)
cfg.Spec.EtcdEndpoints = etcdEndpoints
cfg.Spec.DatastoreType = apiconfig.EtcdV3
}
// TLS.
if config.setByConfigFileOrEnvironment("EtcdKeyFile") {
Expand Down

0 comments on commit e3b0ddb

Please sign in to comment.