vert-x3 / vertx-config

Vert.x Configuration Service
Apache License 2.0
54 stars 64 forks source link

Kubernetes secrets are Base64-encoded #27

Closed gsson closed 6 years ago

gsson commented 6 years ago

According to the Kubernetes API docs:

Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4

This patch decodes keys using Base64 before returning them. Tests have been updated and I've successfully ran it against our v1.7 kube cluster.

Looking at the result, I would like some input on:

cescoffier commented 6 years ago

At some point, we may provide a configmap implementation and a secret implementation. For right now the if-then-else is the adequate approach.