i'm trying to mimic the Rabbitmq's password hash generation algorithm in my helm chart: How to generate password_hash for RabbitMQ Management HTTP API
I need to work with bytes, instead of strings, so obviously the following template did not work:
{{ printf "%s%s" "salt" ("saltpass" | sha256sum) | b64enc }}
Is there any way to add my custom go code?
Also, if not, is there any option to work with bytes there? (convert string to UTF-8 bytes, then use the sha256sum and the b64enc on bytes? or they have only string implementation?)
Thanks
This unfortunately isn't possible, since Helm can't expose the actual Go types, it's really just giving you yaml/text. Here are some references that might help explain this better:
Hope this helps.
Out of curiosity, why do you need to work with bytes in this case?