azure-key-vault-to-kubernetes icon indicating copy to clipboard operation
azure-key-vault-to-kubernetes copied to clipboard

Injection does not work when only init container uses secret

Open theseion opened this issue 3 years ago • 1 comments

The logic in the authorize function makes injection fail in the following scenario:

  • at least one init container
  • only the init container uses an injected secret
  • none of the main containers use injected secrets

The function fails on the following line: https://github.com/SparebankenVest/azure-key-vault-to-kubernetes/blob/b2aeef1fef13e146cb9e9f55c4eb89c29cbe807d/cmd/azure-keyvault-secrets-webhook/auth/authorization.go#L41

A fixe should be straight forward: simply check both containers and init containers for the expected command.

theseion avatar Sep 16 '21 10:09 theseion

Thank you for the feedback

Haavare avatar Oct 22 '21 10:10 Haavare