-
Notifications
You must be signed in to change notification settings - Fork 295
Easily manage etcd cluster with env vars #58
Conversation
Current coverage is 54.72% (diff: 100%)@@ master #58 diff @@
==========================================
Files 4 4
Lines 1038 1038
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
Hits 568 568
Misses 388 388
Partials 82 82
|
ETCDCTL_CA_FILE=/etc/etcd2/ssl/ca.pem | ||
ETCDCTL_CERT_FILE=/etc/etcd2/ssl/etcd-client.pem | ||
ETCDCTL_KEY_FILE=/etc/etcd2/ssl/etcd-client-key.pem | ||
ETCDCTL_ENDPOINT= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just curious but may I ask why you've explicitly emptied ETCD_ENDPOINT
here?
Just to note that we have to explicitly set it when running etcdctl
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realized that this line is the "marker" for https://github.com/coreos/kube-aws/pull/58/files#diff-c88cb625705bf9711a2f576a1975cb72R34.
Doing this makes it possible to:
- Mention that we have to provided an actual value when running
etcdctl
- Ensure two things:
- Appropriate
ETCDCTL_ENDPOINT
value is always configured on starting/restartingetcd2.service
, automatically. - Restarting
etcd2.service
doesn't break/etc/environment
as we can see in https://github.com/coreos/kube-aws/pull/58/files#diff-c88cb625705bf9711a2f576a1975cb72R34- For example,
echo ETCDCTL_ENDPOINT="https://$(hostname):2379/" >> /etc/environment
would break, or needlessly bloat the environment file at least, whenetcd2.service
got restarted.
- For example,
- Appropriate
|
||
- path: /etc/etcd2/ssl/etcd-client-key.pem.enc | ||
encoding: gzip+base64 | ||
content: {{.TLSConfig.EtcdClientKey}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self:
- This would make user-data much bigger than before... Oh, we now have the
--s3-uri
option to workaround that. No problem 😃 - This does add additional credentials we didn't have in etcd nodes before. Any security concerns for saving more credentials in etcd nodes? No.
@gianrubio I'm impressed with your work 👍 |
Thanks for the contribution! Merging. |
…-v0.10.1-release to hcom-flavour * commit '910b3d7e27a9cebef937a8b83b02efa6632bb7a4': (21 commits) Clean up removal of service-account-signing key Removal of service-signing-key loading needs bind to all interfaces Merge Kiich dashboard resource limits setting from upstream Merge in enabling aggregator + certs 0.10.x Add kubernetes manifests from customfiles (kubernetes-retired#1400) Remove dependency on alpine:lastest docker image - use already present hyperkube image instead. 0.10.x Extend CustomFiles to be able to render go templates (kubernetes-retired#1398) 0.10.x migration preparation release (kubernetes-retired#1379) Remove etcd ENI/EIP outputs from the control plane stack and etcd-environment metadata section on the nodepools if Kubernetes.Networking.SelfHosting is Enabled. This is to break the dependency that exists on the nodestacks on the etcd resources in the controlplane stack. Fix worker kubelet.service not to fail on the first run Fix controller kubelet.service not to fail on the first run Fix etcd breakage due to strange systemd behavior autoscaler: update cloud-config-controller (kubernetes-retired#1268) remove potential circular dependency Actually depend on var-lib-etcd2.mount service to be active Disable coreOS auto-updates removed unused s3 flags from commands update kubernetes-dashboard to 1.8.3 Latest versions of Calico node/typha Removes work-around for Typha issue https://github.com/projectcalico/typha/issues/118 Fix typo of Getting Started. ...
Exporting etcdctl environment variables, allow cluster managers to run etcdctl commands without providing arguments.
Currently when you logging in the etcd cluster you can't run etcdctl commands except you provide all the args.
After this PR will be easy for run etcdctl commands
Also this is important on #49 and signaling cloudformation when the etcd cluster is healthy.