Code contributions are always welcome.
- Open an issue in the repo with defect/enhancements
- We can also be reached @ https://gitter.im/expedia-haystack/Lobby
- Fork, make the changes, build and test it locally
- Issue a PR- watch the PR build in deploy
- Once merged to master, travis-ci will build and release the container with latest tag
- Ensure GOROOT, GOPATH and GOBIN environment variables are set correctly.
Run the included [go build kubernetes-sidecar-injector
](.run/go build kubernetes-sidecar-injector.run.xml) Go Build
job.
To deploy and test this in kind
- run the command
make kind-install
(To understand the command above - check the README file)
After deployment, one can check the service running by
kubectl get pods -n kubernetes-sidecar-injector
NAME READY STATUS RESTARTS AGE
kubernetes-sidecar-injector-78648d458b-7cv7l 1/1 Running 0 32m
Run the following command to deploy a sample echo-server
. Note, this deployment spec carries an annotation sidecar-injector.expedia.com/inject: "haystack-agent"
that triggers injection of haystack-agent
sidecar defined in sidecar-configmap.yaml file.
make install-sample
One can then run the following command to confirm the sidecar has been injected
kubectl get pod -n sample
NAME READY STATUS RESTARTS AGE
echo-server-deployment-849b87649d-9x95k 2/2 Running 0 4m
Note the 2 containers in the echo-server pod instead of one.
Run the following commands to delete and cleanup the deployed webhook
helm delete -n kubernetes-sidecar-injector kubernetes-sidecar-injector
helm delete -n sample sample-echo-server-sidecar-injector