Various Kubernetes Go libraries, tools and services
- Go 1.25 or later
- Docker (for running Kind clusters)
- kubectl (for interacting with Kubernetes clusters)
This project uses Ginkgo v2 and Gomega for testing. Install them with:
go install github.com/onsi/ginkgo/v2/ginkgo@latest
go install github.com/onsi/gomega@latest
go mod download
go build ./...
The project uses Ginkgo v2 for testing.
The multi_cluster_lock tests require a GitHub API token to test Gist functionality. Set up your environment:
- Create a
.env
file in the project root:
cp .env.example .env
- Add your GitHub personal access token to the
.env
file:
GITHUB_API_TOKEN=your_github_token_here
- Generate a GitHub personal access token at: https://github.com/settings/tokens
- Requires
gist
scope for the multi_cluster_lock tests
- Requires
Run all tests with:
go test ./...
Or run tests with Ginkgo for more detailed output:
ginkgo -r
To run tests for a specific package:
go test ./pkg/informer
# or
ginkgo ./pkg/informer
The project includes a complete workflow example that demonstrates the Kind package functionality:
go run examples/complete_workflow.go
This example shows how to:
- Validate the environment
- Create and manage Kind clusters
- Work with Kubernetes contexts