This PR fixes the issue with overriding volumeMounts for containers which are used op-cli to inject secrets.
Instead of applying only op volumeMount to the mutated container, it appends it to the existing volumeMounts.
Test steps:
Deploy injector, connect and you application pod (make sure application pod has mounted volumes for example redis. You can grab the app pod spec from the issue description
Verify that the secrets are injected into you application pod successfully (if you used the pod spec from the issue description just run kubectl logs app-example-podname --namespace <namespace> the logs should print <Concealed by 1Password>).
Run kubectl describe pod <pod-name> --namespace <namespace> and check Mounts section. It should contain op mount along with redis. Something like
Mounts:
/etc/redis from redis (rw)
/op/bin/ from op-bin (ro)
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-nmcmv (ro)
Note that before that fix, there were no redis entry in the Mounts.
Resolves #22
This PR fixes the issue with overriding volumeMounts for containers which are used
op-cli
to inject secrets.Instead of applying only
op
volumeMount to the mutated container, it appends it to the existing volumeMounts.Test steps:
kubectl logs app-example-podname --namespace <namespace>
the logs should print<Concealed by 1Password>
).kubectl describe pod <pod-name> --namespace <namespace>
and check Mounts section. It should containop
mount along withredis
. Something likeNote that before that fix, there were no
redis
entry in the Mounts.