-
Notifications
You must be signed in to change notification settings - Fork 691
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
Increase --raw readability #874
Comments
First of all, thanks a lot for opening an issue for this request. We have two different options to solve this problem:
As you said, with one bash script you can control and fix the problem. So, I think that the impact of this request will be really high and you can avoid it using a bash script as you shared. Again thanks a lot for sharing your script to solve the problem. It will be really helpful for the community. Unfortunately, we think that this request will generate more impact than benefits. Álvaro |
Hi @alvneiayu, thank you for your response! Regarding 2, I understand your hesitance to adding more flags though it has to be weighed against users having to maintain their own scripts to process
There is actually a way to prevent behavior change for users that use The script below only pads the output when a terminal is attached. #!/usr/bin/env bash
if [ -t 1 ]; then
echo -n "Output: "
fi
echo "content" This behavior is consistent with |
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback. |
We are open to receive PR, I will be really happy to review it. So, I invite you to send a PR with a possible solution to this. Thanks a lot Álvaro |
Thank you for considering it! I'd love to make a PR but I cannot promise to accomplish this in the short term due to limited time and lack of experience with Go. I'll add it to my todo list and hope that I will get to it sooner rather than later. |
Which component:
kubeseal v0.17.5
Is your feature request related to a problem? Please describe.
The output of
--raw
when reading from stdin can be confusing in the terminal since the resulting sealed secret is not separated from the input.Use case explained: to prevent credentials from being stored in
.bash_history
, I use kubeseal as follows:me@machine:~$ kubeseal --raw --from-file=/dev/stdin --name api-secret secret[CTRL+D][CTRLD+D]
this results in
bash
zsh
Now you'll have to be very careful not to accidentally copy the
secret
before the actual encrypted content and the prompt/percent sign that follows.Describe the solution you'd like
Either detect
tty
or add a--human/--formatted/--pretty
that adds padding to the commands output.Suggested output:
Describe alternatives you've considered
I have made a small bash script that accomplishes this:
It can be used like this
./seal.sh --name api-secrets
The text was updated successfully, but these errors were encountered: