Open insider89 opened 2 years ago
I found the difference in behavior. In the annotation, I've used "ohrab-test Secret", while 1pass has "Ohrab-test Secret". So when 1 letter is lower case, it updates secret in k8s with the latest one, not the oldest. When 1st letter is upper case(same as secret in 1pass item), then it uses the oldest 1pass item.
operator.1password.io/item-path: "vaults/Ohrab/items/Ohrab-test Secrets" - use oldest secret
operator.1password.io/item-path: "vaults/Ohrab/items/ohrab-test Secrets" - use latest one
itemPath: vaults/Ohrab/items/Ohrab-test Secrets - use oldest secret
itemPath: vaults/Ohrab/items/ohrab-test Secrets - use oldest secret
Even with annotation, I can reproduce it time by time. Operator v1.4.0.
Made more tests. Even when annotation has the same name(capitalization) as secret, it can use latest secret, not oldest. With 1pass item didn't reproduce it. So annotation and 1pass items have different behavior when multiple secrets exist.
Your environment
Operator Version:
Connect Server Version: 1.5.1
Kubernetes Version: 1.22
What happened?
When I create secret with 1Password item, then duplicate secret in 1password(same title), secret keeps oldest values(which is per documentation)
When I create secret with Deployment annotation, then duplicate secret in 1password(same title), secret sync from new(youngest) item in 1pass.
What did you expect to happen?
When using Deployment annotation expect to sync with oldest secret, not youngest, when multiple items with same Title are present in 1pass.
Steps to reproduce
OnePasswordItem won't update secret as it will sync with the oldest one. Secret from Deployment annotation will be updated from new duplicated secret.
Notes & Logs