kubectl-view-secret
kubectl-view-secret copied to clipboard
use escape characters while printing secret values
Command kubectl view-secret secret-name -a prints the secret keys and their values per line, delimited by = which makes it shell compatible but not always
so secret keys with multiline values or special characters are printed as is, which makes it impossible to always run source <(kubectl view-secret cluster-configs -a)
escaping will bring us the advantage of directly declaring them in shell as well
@elsesiy I'd very much like to raise a PR for this if u approve!
PS: Thank you for such a handy easy to use kubectl plugin
@opencloudengineer Thanks for filing this issue. I gave it some thought but I don't think there's a simple fix here, there's many different shells (POSIX, bash, zsh, fish, etc.) and all of them could have slight variations in which characters require escaping and the escape sequence to be used. What approach were you thinking to implement?
Closing due to inactivity