Development tools like ko, golangci-lint, and setup-envtest are managed automatically via the Go toolchain (go tool).
cmd/stackit-pod-identity-webhook: Entry point for the webhook manager.pkg/webhook: Core mutation logic and admission handler.charts/stackit-pod-identity-webhook: Helm chart for deployment.test/integration: Integration tests usingenvtestand Ginkgo.hack: Scripts and tooling configuration.
To see all available targets and their descriptions, run make help.
The easiest way to deploy locally is using the provided Makefile targets, which automatically manage the cluster and install cert-manager and the webhook:
make kind-up
make skaffold-devAfter deploying the webhook, you can verify it's working by applying a simple test pod:
- Apply the test resources:
kubectl apply -f examples/mutation-test.yaml
- Verify the mutation on the Pod:
You should see injected environment variables (like
kubectl get pod mutation-test-pod -o yaml
STACKIT_TOKEN_PATH) and volume mounts.
For a more comprehensive test that includes authentication with the STACKIT SDK, see the Example Workload Documentation.