decodes/encodes entire Kubernetes secrets files
ksv uses dep to manage dependencies.
go get github.com/metadave/ksv
cd ${GOPATH}/src/github.com/metadave/ksv
dep ensure
go install
# ksv will be installed in ${GOPATH}/bin
ksv < some_secrets_file_with_base64_encoded_data_values.yaml
or
ksv decode < some_secrets_file_with_base64_encoded_data_values.yaml
the default subcommand for ksv is
decode
ksv -s < some_secrets_file_with_base64_encoded_data_values.yaml
ksv add -k foo -v bar < test.yaml
adds the key "foo" with a value of "bar" to the secret data
section.
Test that it worked by sending the output back to ksv:
ksv add -k foo -v bar < test.yaml | ksv
ksv encode < some_secrets_file_with_plaintext_data_values.yaml
ksv < test.yaml | ksv encode