Closed aaronfern closed 7 months ago
Hi @aaronfern I tried to test it out but I guess there are some issues (or I didn't know how to properly use it)
$ ghelp
+---------------------------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------+
| TOOL/PACKAGE | VERSION | NOTES |
+=================================+===================================+=========================================================================================================================+
...
| install_etcdctl | | Bash script which installs the `etcdctl` tool in the container. If you are running this container as non-root, execute |
| | | the `install-etcdctl` script in the `/nonroot/hacks` directory. |
+---------------------------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------+
| install_etcd_cheatsheet | | Bash script which prints out etcd certificate paths and handy etcdctl comands |
+---------------------------------+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------+
...
$ install_etcd_cheatsheet
bash: install_etcd_cheatsheet: command not found
also print-etcd-cheatsheet.sh
is not executable
$ ls -la /hacks/print-etcd-cheatsheet.sh
-rw-r--r-- 1 root root 5572 Dec 22 12:12 /hacks/print-etcd-cheatsheet.sh
and it would be nice if the user does not have to set the PATH
env var and that it's part of the installation
Thanks for your review @petersutter
I've changes the file permission and the command description, so I hope it runs now
it would be nice if the user does not have to set the PATH env var and that it's part of the installation
I wanted this too initially, however I was unable to set the PATH env var from the script and hence I added a note for the user to manually do it. Any idea how I would be able to do that?
it would be nice if the user does not have to set the PATH env var and that it's part of the installation
I wanted this too initially, however I was unable to set the PATH env var from the script and hence I added a note for the user to manually do it. Any idea how I would be able to do that?
@plkokanov maybe?
it would be nice if the user does not have to set the PATH env var and that it's part of the installation
I wanted this too initially, however I was unable to set the PATH env var from the script and hence I added a note for the user to manually do it. Any idea how I would be able to do that?
@plkokanov maybe?
Hmm, it should be possible with a bash command similar to this: https://github.com/gardener/ops-toolbelt/blob/0a6d6f3f78cf96233eee39067c0f318eb06cfb78/dockerfile-configs/common-components.yaml#L141-L144
This generator
stuff seems to be asking for some refactoring btw 😅
I was mistaken in my previous comment
The correct way to add the new script to the PATH
env variable would be to extend the environment variables when building the container: https://github.com/gardener/ops-toolbelt/blob/f04ab43a645098a45eb6a8768d6e8130b9f45e52/dockerfile-configs/common-components.yaml#L146-L148
You can just add
- PATH=/nonroot/hacks:$PATH
@aaronfern btw do you plan to continue with this PR. I'm really sorry for replying so late, but was busy with other stuff and this slipped my mind (yet again)
Hey @plkokanov Yes, I will continue with this PR Sorry, got sidetracked and lost sight of this PR
Will resolve all comments asap
Thanks @petersutter and @plkokanov for your reviews and I'm very sorry for the delay in addressing your comments
I've addressed all your comments. PTAL whenever possible
What this PR does / why we need it: This PR adds a cheatsheet that will help operators when debugging issues with etcd or using the
etcdctl
tool. This script prints out file paths of certificates theetcdctl
tool uses and also prints out some commonetcdctl
commandsWhich issue(s) this PR fixes: Fixes #
Special notes for your reviewer:
Release note: