73cb3b491e
* cmd/k8s-operator/e2e: run self-contained e2e tests with devcontrol Adds orchestration for more of the e2e testing setup requirements to make it easier to run them in CI, but also run them locally in a way that's consistent with CI. Requires running devcontrol, but otherwise supports creating all the scaffolding required to exercise the operator and proxies. Updates tailscale/corp#32085 Change-Id: Ia7bff38af3801fd141ad17452aa5a68b7e724ca6 Signed-off-by: Tom Proctor <tomhjp@users.noreply.github.com> * cmd/k8s-operator/e2e: being more specific on tmp dir cleanup Signed-off-by: chaosinthecrd <tom@tmlabs.co.uk> --------- Signed-off-by: Tom Proctor <tomhjp@users.noreply.github.com> Signed-off-by: chaosinthecrd <tom@tmlabs.co.uk> Co-authored-by: chaosinthecrd <tom@tmlabs.co.uk>
29 lines
1.3 KiB
Go
29 lines
1.3 KiB
Go
// Copyright (c) Tailscale Inc & AUTHORS
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
// Package e2e runs end-to-end tests for the Tailscale Kubernetes operator.
|
|
//
|
|
// To run without arguments, it requires:
|
|
//
|
|
// * Kubernetes cluster with local kubeconfig for it (direct connection, no API server proxy)
|
|
// * Tailscale operator installed with --set apiServerProxyConfig.mode="true"
|
|
// * ACLs from acl.hujson
|
|
// * OAuth client secret in TS_API_CLIENT_SECRET env, with at least auth_keys write scope and tag:k8s tag
|
|
// * Default ProxyClass and operator env vars as appropriate to set the desired default proxy images.
|
|
//
|
|
// It also supports running against devcontrol, using the --devcontrol flag,
|
|
// which it expects to reach at http://localhost:31544. Use --cluster to create
|
|
// a dedicated kind cluster for the tests, and --build to build and test the
|
|
// operator and proxy images for the current checkout.
|
|
//
|
|
// To run with minimal dependencies, use:
|
|
//
|
|
// go test -count=1 -v ./cmd/k8s-operator/e2e/ --build --cluster --devcontrol --skip-cleanup
|
|
//
|
|
// Running like this, it requires:
|
|
//
|
|
// * go
|
|
// * container runtime with the docker daemon API available
|
|
// * devcontrol: ./tool/go run ./cmd/devcontrol --generate-test-devices=k8s-operator-e2e --scenario-output-dir=/tmp/k8s-operator-e2e --test-dns=http://localhost:8055
|
|
package e2e
|