elastic-apm-java-injector was born to automate process described here.
ensure to label your desired namespace with elastic-apm-java-injector: enabled
- install kind
- create kind cluster (hack/kind_up.sh)
- generate and deploy certs (hack/gen_certs.sh)
- build (hack/build.sh)
- deploy (hack/deploy.sh)
Rinse and repeat with build and deploy steps.
add some flags (ie loglevel)move mutating functions from main.go to dedicated pkginject more variablesconfigurable image to inject- setup checks (golangci-lint, gosec) // GH actions
- goreleaser // GH actions
- public docker image to use // GH actions
For variable injection, since this webhook relies on namespaceSelector.matchLabels
to operate, having various instances of webhook with different settings is desireable. Thus I took env vars config approach.