Inject Secrets from 1Password
Map items from 1Password into Kubernetes secrets in your application's namespace, using the onepassword dependency engine.
The onepassword dependency engine pulls secrets out of 1Password and into
your application. It maps items from 1Password into Kubernetes secrets: each
top-level key under secrets becomes one Kubernetes secret in your
application's namespace.
Two declaration styles are accepted and they do the same thing. Use the list
style when the key name in Kubernetes differs from the 1Password property name,
or when you want the mapping to be explicit. Use the dictionary style as a
shorthand for straightforward one-to-one mappings.
dependency:
onepassword:
secrets:
# List style — explicit secretKey to remoteRef mapping
db-credentials-secret:
- secretKey: spring.datasource.username
remoteRef:
key: db-credentials
property: username
- secretKey: spring.datasource.password
remoteRef:
key: db-credentials
property: password
# Dictionary style — shorthand key: item/property
db-credentials-short:
spring.datasource.username: db-credentials/username
spring.datasource.password: db-credentials/passwordRelated articles
- Application Dependencies — all dependency engines, and how to choose
- Attach a Database to Your Application
- Secrets Manager
- Secret Not Found or Not Reaching Your Application
- IAM Service Accounts
- Kafka Access, ACLs and Topics
Updated about 1 month ago
Did this page help you?