types

package
v1.27.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package types contains shared configuration types used across config versions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterConfig

type ClusterConfig struct {
	Driver  string         `yaml:"driver"`            // Required: "auto", "colima", "k3d", or "mock"
	Network *NetworkConfig `yaml:"network,omitempty"` // Optional: Networking configuration
	Colima  *ColimaConfig  `yaml:"colima,omitempty"`  // Required if driver=="colima"
	K3d     *K3dConfig     `yaml:"k3d,omitempty"`     // Required if driver=="k3d"
	Mock    *MockConfig    `yaml:"mock,omitempty"`    // Required if driver=="mock"
}

ClusterConfig specifies cluster settings (driver required, driver-specific config required per schema).

func (*ClusterConfig) GetAllHostnames

func (c *ClusterConfig) GetAllHostnames() []string

GetAllHostnames returns a slice containing the primary hostname and all additional hostnames. Returns nil if network configuration is not present.

type ColimaConfig

type ColimaConfig struct {
	Memory     string `yaml:"memory"`                // Required: Must match ^[0-9]+(GiB|GB|MiB|MB)$
	Cores      int    `yaml:"cores"`                 // Required: Must be >= 1
	K3sVersion string `yaml:"k3s_version,omitempty"` // Optional: Version of k3s to use
}

ColimaConfig specifies Colima-specific cluster settings.

type K3dConfig

type K3dConfig struct {
	Agents       int      `yaml:"agents,omitempty"`        // Optional: Number of agent nodes (default: 0)
	Servers      int      `yaml:"servers,omitempty"`       // Optional: Number of server nodes (default: 1)
	Image        string   `yaml:"image,omitempty"`         // Optional: Docker image for nodes
	PortMappings []string `yaml:"port_mappings,omitempty"` // Optional: Port mappings from host to cluster
}

K3dConfig specifies k3d-specific cluster settings.

type MockConfig

type MockConfig struct {
}

MockConfig specifies mock driver settings for testing. The mock driver doesn't require any configuration.

type NetworkConfig

type NetworkConfig struct {
	Hostname            string   `yaml:"hostname"`                       // Required: Primary hostname for GitLab
	AdditionalHostnames []string `yaml:"additional_hostnames,omitempty"` // Optional: Additional hostnames to configure
}

NetworkConfig specifies networking settings for the cluster.

Jump to

Keyboard shortcuts

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