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
feat(grpc): allow files to be read by jmespath expressions
This allows allow jmespath expressions to refer to the contents of
certain pre-declared files which are reloaded on a user-specified
schedule. For example, if you want to use k8s bound service
account tokens you could add the following to your Pod:
volumes:
- name: token-vol
projected:
sources:
- serviceAccountToken:
audience: my-buildbarn-instance
expirationSeconds: 3600
path: buildbarn
Assuming this is mounted at '/tokens', you could then specify in your
buildbarn config:
addMetadataJmespathExpression: {
expression: |||
{
"authorization": [std.format('bearer %s', files.token)]
}
|||,
files: [
{
key: "token",
path: "/tokens/buildbarn",
refreshInterval: "1800s",
}
]
},
This is quite useful for k8s service account tokens, as the maximum
validity is often capped. Likewise this can also be used for Google
service account id tokens, which also have a relatively short maximum
validity.
0 commit comments