azure-key-vault-to-kubernetes
azure-key-vault-to-kubernetes copied to clipboard
Injection does not work when only init container uses secret
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.
Thank you for the feedback