Skip to content

Mount key values from json/yaml secret files #169

@splasharun

Description

@splasharun

Hi, is there any way now where I can directly mount key values from a json/yaml file as individual objects? I guess this will be helpful when mounting values to k8s secrets.

The options that I have right now are

  1. To hold individual values in my gsm secret and consume that.
  2. Mount a whole json file inside the pod and parse the key values using some postStart script.

I was wondering if there was any straightforward way to do this.
In other providers(aws) I've seen them use jmespath to get values from json files, can we do something similar.

- resourceName: "projects/$PROJECT_ID/secrets/secret"
  path: "secret.json"
  keys:
    - keyPath: "key_0.key_1"      //jmespath
      alias: "key1"               //name/path to be mounted

I guess we can extend this for tls certificates and other usecases too.
Also, I'd be happy to contribute to this.
Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions