Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option for TLS enabled etcd server connections. (#5496)
* Added functionality for etcd tls support, and included tests. Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Almost got tests working for tls etcd Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Changed to pass by value per review suggestion. Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Removed extra safety checks per review suggestion. Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Changed error return per review suggestion. Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Update comments per review suggestion. Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Moved common test logic into main tlstest file for access by other tests. Updated server tests to use helper, and verified we are now working with https Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Update go/vt/topo/etcd2topo/server.go Co-Authored-By: Anthony Yeh <enisoc@planetscale.com> Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Updated etcd2 flag names to etcd per convention as pointed out by reviewer. Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Bring todo inside func so it doesn't get added into auto-generated docs Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Removed client.close() from defer as this should get called automatically by server object when server.close() is called Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Fixed up defers per review suggestions. Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Switched over to using server public api instead of pulling client out of it in tests. Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Made sure that we retry until we establish an initial client, and close that client at the end of the function that establishes an etcd server for testing. Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Adding logging to try to figure out why tests are failing Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Setup stderr and stdout for debugging in cicd Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Updating helper function to use DNS compatible common name Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Corrected log for accuracy Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Corrected fatals message formatting Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Adding dns compliant server common name Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Changing these back so we break with logging in CICD. :-( Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Pin unit test job to a specific version of etcd. Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
- Loading branch information