Skip to content
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

add support for binary secret #1

Merged
merged 1 commit into from
Nov 8, 2020

Conversation

vkruoso
Copy link
Contributor

@vkruoso vkruoso commented Oct 14, 2020

This allows the engine to be used to watch and retrieve data
from binary secrets. The current secret implementation assumes
that the value is a string and hence does not work with binary
data.

Besides the fact that this is a template engine and binary data
make very little sense, this engine can be used as a generic
k8s watcher.

Related to CyCoreSystems/asterisk-config#8.

Signed-off-by: Vinicius Ruoso [email protected]

This allows the engine to be used to watch and retrieve data
from binary secrets. The current secret implementation assumes
that the value is a string and hence does not work with binary
data.

Besides the fact that this is a template engine and binary data
make very little sense, this engine can be used as a generic
k8s watcher.

Related to CyCoreSystems/asterisk-config#8.

Signed-off-by: Vinicius Ruoso <[email protected]>
@Ulexus
Copy link
Member

Ulexus commented Nov 8, 2020

I don't believe this should be necessary. Items inside a Secret are base64-encoded anyway, regardless of whether the data is of a binary nature or not.

Am I missing something?

@vkruoso
Copy link
Contributor Author

vkruoso commented Nov 8, 2020

The issue is that the Secret method converts the secret base64 and returns a string. This works when the content is a well formed string, but for a zip file binary, for instance, it just can't transform it in a string and fails.

@Ulexus
Copy link
Member

Ulexus commented Nov 8, 2020

Aha! I see that now, thanks.

@Ulexus Ulexus merged commit 4724f13 into CyCoreSystems:master Nov 8, 2020
@vkruoso vkruoso deleted the binary-secret branch December 10, 2020 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants