Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance: Support username/password ETCD credential #324

Merged
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
5 changes: 5 additions & 0 deletions states/etcd_connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ type ConnectParams struct {
RootCA string `name:"rootCAPem" default:"" desc:"root CA pem file path"`
ETCDPem string `name:"etcdCert" default:"" desc:"etcd tls cert file path"`
ETCDKey string `name:"etcdKey" default:"" desc:"etcd tls key file path"`
ETCDUserName string `name:"etcdUserName" default:"" desc:"etcd credential username"`
ETCDPassword string `name:"etcdPassword" default:"" desc:"etcd creidentail password"`
Auto bool `name:"auto" default:"false" desc:"auto detect rootPath if possible"`
}

Expand Down Expand Up @@ -115,6 +117,9 @@ func (s *disconnectState) ConnectCommand(ctx context.Context, cp *ConnectParams)
grpc.WithBlock(),
},

Username: cp.ETCDUserName,
Password: cp.ETCDPassword,

TLS: tls,
// disable grpc logging
Logger: zap.NewNop(),
Expand Down
Loading