It’s Cybersecurity Awareness Month! Join our interactive training session, or learn about security and AI from 1Password experts.
Forum Discussion
Former Member
3 years agohow can I create multiple secrets from the same vault using deployment annotations
I am trying to create two different secrets located in the same vault. The deployment is only creating one secret instead of both. how can I create more than one secret using 1password annotations: p...
Former Member
3 years agoHey @smutoni,
At this moment I'm afraid it's not possible to create more than one secret using the operator's annotations.
We appreciate the feedback and we've filed this issue on GitHub future monitoring.
What is your use case that requires to provide more that one secret from 1Password as annotations to your deployment?
In the meantime, as a workaround, you can create OnePasswordItem CRDs for the items that you want to use in your infrastructure. This can be beneficial since you'd no longer need to look for the deployment that creates the secrets if multiple ones use the same secret. https://github.com/1Password/onepassword-operator#usage to see how such resource can be created.
For your two items, they'd look like this:
apiVersion: onepassword.com/v1
kind: OnePasswordItem
metadata:
name: "nine-nine-test-secret" #this name will also be used for naming the generated kubernetes secret
spec:
itemPath: "vaults/test-k8s-cluster/items/nine-nine-test-secret"
apiVersion: onepassword.com/v1
kind: OnePasswordItem
metadata:
name: "demo-micro-configuration" #this name will also be used for naming the generated kubernetes secret
spec:
itemPath: "vaults/test-k8s-cluster/items/demo-micro-configuration"
Does this help you in enabling you to have a deployment use secrets from multiple items from 1Password?