mk8sCommon

package
v1.1.68-test Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CplnHostLocations = []any{"aws-eu-central-1", "aws-us-east-2", "aws-us-west-2", "gcp-me-west1", "gcp-us-east1"}

CplnHostLocations is the Control Plane location enum shared by the ephemeral, generic and triton providers (mk8sEphemeral.ts:33 etc.).

Functions

func AutoscalerConfigRule

func AutoscalerConfigRule() *validate.Rule

AutoscalerConfigRule ports AutoscalerConfig (mk8sCommon.ts:98).

func GoDurationRule

func GoDurationRule() *validate.Rule

GoDurationRule ports mk8sCommon.ts:10 GoDuration.

func HostnameStringRule

func HostnameStringRule() *validate.Rule

HostnameStringRule ports Joi.string().hostname() — base.HostnameRule is the one implementation (it is Joi's domain-analyze, not an RFC-1123 regex, so a TLD that starts with a digit is rejected the way Joi rejects it).

func IpStringRule

func IpStringRule(versions []string, cidr string) *validate.Rule

IpStringRule ports Joi.string().ip({version, cidr}). versions is a subset of {"ipv4","ipv6"}; cidr is "optional" | "forbidden" | "required". The check itself is base.IPRule — the single Joi-faithful implementation (this wrapper stays because twelve provider packages name it).

func LabelsRule

func LabelsRule() *validate.Rule

LabelsRule ports Labels (mk8sCommon.ts:53).

func MaxPodsRule

func MaxPodsRule() *validate.Rule

MaxPodsRule ports MaxPods (mk8sCommon.ts:68): an optional per-nodepool pod cap.

func NetworkingConfigRule

func NetworkingConfigRule(podVpc bool) *validate.Rule

NetworkingConfigRule ports the per-provider NetworkingConfig object. podVpc adds the 'vpc' pod-network option (aws/gcp only); every variant defaults to defaultNetworkingConfig and enforces serviceNetwork != podNetwork.

func NodePoolNameRule

func NodePoolNameRule() *validate.Rule

NodePoolNameRule ports NodePoolName (mk8sCommon.ts:69).

func PoolNamesUniqueArrayCustom

func PoolNamesUniqueArrayCustom(value any, h *validate.Helper) (any, error)

PoolNamesUniqueArrayCustom ports the `.custom` some providers attach directly to their nodePools array (aws/azure/gcp/ephemeral): reject duplicate pool names.

func PoolNamesUniqueObjectCustom

func PoolNamesUniqueObjectCustom(keys ...string) validate.CustomFn

PoolNamesUniqueObjectCustom ports the provider-level `.custom` that rejects duplicate node-pool names across the given array keys (e.g. nodePools + dedicatedServerNodePools + unmanagedNodePools).

func PreInstallScriptRule

func PreInstallScriptRule(allowSSM bool) *validate.Rule

PreInstallScriptRule ports PreInstallScript (mk8sCommon.ts:145 / mk8sAws.ts:153 when allowSSM). ” is .allow()'d (bypasses the custom); a non-” script must start with '#!' (or 'resolve:ssm:' on AWS).

func SshPublicKeyRule

func SshPublicKeyRule() *validate.Rule

SshPublicKeyRule ports SshPublicKey (mk8sCommon.ts:73).

func StrOf

func StrOf(obj any, key string) string

StrOf reads a string field off an object in either form a container custom sees: a map (generic evaluator) or a pointer to a struct (typed walk), by json name.

func TaintsRule

func TaintsRule() *validate.Rule

TaintsRule ports Taints (mk8sCommon.ts:63).

func UnmanagedPoolRule

func UnmanagedPoolRule() *validate.Rule

UnmanagedPoolRule ports UnmanagedPool (mk8sCommon.ts:115).

func UriStringRule

func UriStringRule(schemes ...string) *validate.Rule

UriStringRule ports Joi.string().uri({scheme}). With no schemes it is the plain .URI(); with schemes the value must additionally carry one of them.

Types

type AutoscalerConfig

type AutoscalerConfig struct {
	Expander             []AutoscalerConfigExpander `json:"expander,omitzero"`
	UnneededTime         string                     `json:"unneededTime,omitzero"`
	UnreadyTime          string                     `json:"unreadyTime,omitzero"`
	UtilizationThreshold *float64                   `json:"utilizationThreshold,omitzero"`
}

type AutoscalerConfigExpander

type AutoscalerConfigExpander string
const (
	AutoscalerConfigExpanderRandom     AutoscalerConfigExpander = "random"
	AutoscalerConfigExpanderMostPods   AutoscalerConfigExpander = "most-pods"
	AutoscalerConfigExpanderLeastWaste AutoscalerConfigExpander = "least-waste"
)

type CacertsRes

type CacertsRes struct {
	Cacerts string `json:"cacerts,omitzero"`
}

type GoDuration

type GoDuration string

type InitBody

type InitBody map[string]any

type InitRes

type InitRes struct {
	Script string `json:"script,omitzero"`
}

type JoinBody

type JoinBody map[string]any

type JoinRes

type JoinRes struct {
	Script string `json:"script,omitzero"`
}

type KubeConfigBody

type KubeConfigBody map[string]any

type KubeConfigRes

type KubeConfigRes struct {
	Kubeconfig string `json:"kubeconfig,omitzero"`
	FileName   string `json:"fileName,omitzero"`
}

type Labels

type Labels map[string]string

type MaxPods added in v1.1.25

type MaxPods float32

type NodePoolName

type NodePoolName string

type PreInstallScript

type PreInstallScript string

type ReadyRes

type ReadyRes struct {
	Ready   *bool  `json:"ready,omitzero"`
	Message string `json:"message,omitzero"`
}

type SshPublicKey

type SshPublicKey string

type Taint

type Taint struct {
	Key    SshPublicKey `json:"key,omitzero"`
	Value  string       `json:"value,omitzero"`
	Effect TaintEffect  `json:"effect,omitzero"`
}

type TaintEffect

type TaintEffect string
const (
	TaintEffectNoSchedule       TaintEffect = "NoSchedule"
	TaintEffectPreferNoSchedule TaintEffect = "PreferNoSchedule"
	TaintEffectNoExecute        TaintEffect = "NoExecute"
)

type Taints

type Taints []Taint

type UnmanagedPool

type UnmanagedPool struct {
	Name   string `json:"name"`
	Labels Labels `json:"labels,omitzero"`
	Taints Taints `json:"taints,omitzero"`
}

Jump to

Keyboard shortcuts

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