kindutil

package
v0.1.0-alpha.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package kindutil provides shared utilities for creating and configuring Kind (Kubernetes in Docker) clusters in test environments.

Index

Constants

View Source
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.

View Source
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

func PatchKubeconfigForDind(kubeconfig string) string

PatchKubeconfigForDind replaces localhost/0.0.0.0 with the dind hostname in the kubeconfig server URL.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL