You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A pattern I've found useful in the past is to store multiple data as JSON within a single secret. For instance, if an integration requires a username and password, store both:
Reduces storage and access costs (which are per-secret, not per-byte)
Allows atomic changes to complex data
Ensures that related data is stored together
Storing the username locally and only storing the password as a secret reduces cost, but it means that you can't guarantee that the username and password get changed atomically, and half of the credentials are stored in one place and the other half in another place. These concerns become heightened when working with integrations that require more than two credentials, or when using multiple independent sets of credentials for seamless password rotations.
To support this flow in berglas, currently (AIUI) you have to postprocess the environment variables that berglas populates, which isn't tenable with third-party container workloads. I would propose to add a path option to the sm:// reference syntax that accepts a JMESPath expression, so that in a ConfigMap you could do, for instance:
I'm happy to contribute the code for this feature, but wanted to first check to see if this feature would be accepted (or, better yet, if there's already a way to do this that I'm overlooking).
The text was updated successfully, but these errors were encountered:
stpierre
added a commit
to stpierre/berglas
that referenced
this issue
Aug 22, 2023
This permits a user to store JSON objects as GSM data, and query
specific items in those objects with a JMESPath expression.
FixesGoogleCloudPlatform#235.
A pattern I've found useful in the past is to store multiple data as JSON within a single secret. For instance, if an integration requires a username and password, store both:
This:
Storing the username locally and only storing the password as a secret reduces cost, but it means that you can't guarantee that the username and password get changed atomically, and half of the credentials are stored in one place and the other half in another place. These concerns become heightened when working with integrations that require more than two credentials, or when using multiple independent sets of credentials for seamless password rotations.
To support this flow in berglas, currently (AIUI) you have to postprocess the environment variables that berglas populates, which isn't tenable with third-party container workloads. I would propose to add a
path
option to thesm://
reference syntax that accepts a JMESPath expression, so that in a ConfigMap you could do, for instance:I'm happy to contribute the code for this feature, but wanted to first check to see if this feature would be accepted (or, better yet, if there's already a way to do this that I'm overlooking).
The text was updated successfully, but these errors were encountered: