Documentation
¶
Overview ¶
Package kindutil provides shared utilities for creating and configuring Kind (Kubernetes in Docker) clusters in test environments.
Index ¶
Constants ¶
const BaseKindConfig = `` /* 156-byte string literal not displayed */
BaseKindConfig is the default kind cluster configuration with increased pod limits. The default maxPods (110) is too restrictive for integration tests running in parallel.
const DindKindConfig = `` /* 393-byte string literal not displayed */
DindKindConfig is the kind cluster configuration for Docker-in-Docker environments. It binds the API server to 0.0.0.0, adds "docker" as a certificate SAN, and increases the pod limit for parallel test execution.
Variables ¶
This section is empty.
Functions ¶
func GetDindHostname ¶
func GetDindHostname() string
GetDindHostname extracts the hostname from DOCKER_HOST. For "tcp://docker:2376" it returns "docker".
func GetNodePortHost ¶
func GetNodePortHost() string
GetNodePortHost returns the hostname for accessing NodePort services. In Docker-in-Docker, this is the dind hostname; otherwise localhost.
func IsDockerInDocker ¶
func IsDockerInDocker() bool
IsDockerInDocker returns true if running in a Docker-in-Docker environment. This is detected by checking if DOCKER_HOST is set to a tcp:// URL, which is typical for GitLab CI dind services.
func PatchKubeconfigForDind ¶
PatchKubeconfigForDind replaces localhost/0.0.0.0 with the dind hostname in the kubeconfig server URL.
Types ¶
This section is empty.