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
Describe the bug
If secret template has been created before relevant Azure KeyVault entry it will not be populated even after KeyVault entry creation.
To Reproduce
Steps to reproduce the behavior:
Create secret template which references non-existent KeyVaul entry (see Manifest below).
Create KeyVault entry.
Relevant k8s secret will not be created.
Expected behavior
Secret created once KeyVault controller receives update about the KeyVault entry referenced in the template
Logs
Logs
I0317 17:39:22.738719 1 azureKeyVaultSecret.go:229] "updating with recent changes from azure key vault" azurekeyvaultsecret="app-namespace/some-token" secret="app-namespace/some-token"
E0317 17:39:23.116356 1 worker.go:92] Failed to process key app-namespace/some-token. Reason: failed to get existing secret some-token, error: secrets "some-token" not found
I0317 17:43:56.989218 1 azureKeyVaultSecret.go:229] "updating with recent changes from azure key vault" azurekeyvaultsecret="app-namespace/some-token" secret="app-namespace/some-token"
E0317 17:43:57.316122 1 worker.go:92] Failed to process key app-namespace/some-token. Reason: failed to get existing secret some-token, error: secrets "some-token" not found
E0317 17:43:57.316168 1 worker.go:106] failed to get existing secret some-token, error: secrets "some-token" not found
I0317 17:48:21.989052 1 azureKeyVaultSecret.go:229] "updating with recent changes from azure key vault" azurekeyvaultsecret="app-namespace/some-token" secret="app-namespace/some-token"
E0317 17:48:22.316220 1 worker.go:92] Failed to process key app-namespace/some-token. Reason: failed to get existing secret some-token, error: secrets "some-token" not found
Additional context
According to the logs controller assumes that secret has been already created and tries to find it to perform an update, but secret wasn't created. I believe controller should fall back to creating a secret if it was not found.
The text was updated successfully, but these errors were encountered:
yix
changed the title
[BUG]
[BUG] Secret never gets populated if KeyVault entry created after the secret template
Mar 17, 2021
yix
changed the title
[BUG] Secret never gets populated if KeyVault entry created after the secret template
[BUG] Secret gets never populated if KeyVault entry was created after the secret template
Mar 17, 2021
Line 241 is calling Update on the clientset, if the secret does not exists we need to do a Create. This logic already exists in the getOrCreateKubernetesSecret method in /controller/secret.go. If we restart the controller, the secret gets created as expected. So we need to figure out if we can include the same logic in the reconcile loop.
[X] Controller, version:
1.2.0
(spvest/azure-keyvault-controller:1.2.0)[ ] Env-Injector (webhook), version:
x.x.x
(docker image tag)[ ] Other
Describe the bug
If secret template has been created before relevant Azure KeyVault entry it will not be populated even after KeyVault entry creation.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Secret created once KeyVault controller receives update about the KeyVault entry referenced in the template
Logs
Logs
Manifest
Additional context
According to the logs controller assumes that secret has been already created and tries to find it to perform an update, but secret wasn't created. I believe controller should fall back to creating a secret if it was not found.
The text was updated successfully, but these errors were encountered: