Move the configuration from the webhook to the deployment/pod. This brings the following benefits:
Webhook will now work with multiple configurations (i.e. configuring the CLI to work with either Connect or Service Account credentials). Each deployment/pod will have to set the desired configuration the webhook will use to inject the secrets.
Configuration needed to inject secrets is simplified. Now for the token (either Connect or service account token) we only need one environment variable instead of 3 (one for the raw value of the token, two for the k8s secret).
Add a testing suite for the injector. This suite simulates the k8s environment, therefore it is easy to identify when a realistic case will fail for the injector.
Bring consistency in the name of the resources that are deployed.
Simplify the process of deploying the injector. All the users have to do from the cloned repo is run make deploy. To remove the webhook, they can simply run make undeploy.
Improve the documentation in README based on the new behavior.
This PR brings the following key changes:
make deploy
. To remove the webhook, they can simply runmake undeploy
.