Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cmd/setup-etcd-environment/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ func runRunCmd(cmd *cobra.Command, args []string) error {

func (s *SetupEnv) getExportEnv() (map[string]string, error) {
// if etcd is managed by the operator populate ENV from configmap
if s.isEtcdScaling() {
// TODO: alaypatel07/hexfusion figure out a better way of implementing isScaling
// if s.isEtcdScaling() {
if inCluster() && !s.opts.bootstrapSRV {
return s.getOperatorEnv()
}
// initialize envs used to bootstrap etcd using SRV discovery or disaster recovery.
Expand Down Expand Up @@ -315,6 +317,7 @@ func (s *SetupEnv) getBootstrapEnv() (map[string]string, error) {
// `cluster-etcd-operator` and returns true if yes. If false we can conclude that the member is already
// part of the cluster or we have/are bootstrapping etcd using SRV discovery.
func (s *SetupEnv) isEtcdScaling() bool {
// TODO: reimplement me!
if _, err := os.Stat(fmt.Sprintf("%s/member", s.etcdDataDir)); os.IsNotExist(err) && !s.opts.bootstrapSRV && inCluster() {
return true
}
Expand All @@ -339,6 +342,7 @@ func (s *SetupEnv) setClient() error {
return fmt.Errorf("error creating client: %v", err)
}
s.Client = client
return nil
}
glog.Infof("no client set")
return nil
Expand Down