Documentation
¶
Index ¶
- Variables
- func AutoscalerConfigRule() *validate.Rule
- func GoDurationRule() *validate.Rule
- func HostnameStringRule() *validate.Rule
- func IpStringRule(versions []string, cidr string) *validate.Rule
- func LabelsRule() *validate.Rule
- func MaxPodsRule() *validate.Rule
- func NetworkingConfigRule(podVpc bool) *validate.Rule
- func NodePoolNameRule() *validate.Rule
- func PoolNamesUniqueArrayCustom(value any, h *validate.Helper) (any, error)
- func PoolNamesUniqueObjectCustom(keys ...string) validate.CustomFn
- func PreInstallScriptRule(allowSSM bool) *validate.Rule
- func SshPublicKeyRule() *validate.Rule
- func StrOf(obj any, key string) string
- func TaintsRule() *validate.Rule
- func UnmanagedPoolRule() *validate.Rule
- func UriStringRule(schemes ...string) *validate.Rule
- type AutoscalerConfig
- type AutoscalerConfigExpander
- type CacertsRes
- type GoDuration
- type InitBody
- type InitRes
- type JoinBody
- type JoinRes
- type KubeConfigBody
- type KubeConfigRes
- type Labels
- type MaxPods
- type NodePoolName
- type PreInstallScript
- type ReadyRes
- type SshPublicKey
- type Taint
- type TaintEffect
- type Taints
- type UnmanagedPool
Constants ¶
This section is empty.
Variables ¶
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 ¶
AutoscalerConfigRule ports AutoscalerConfig (mk8sCommon.ts:98).
func GoDurationRule ¶
GoDurationRule ports mk8sCommon.ts:10 GoDuration.
func HostnameStringRule ¶
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 ¶
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 MaxPodsRule ¶
MaxPodsRule ports MaxPods (mk8sCommon.ts:68): an optional per-nodepool pod cap.
func NetworkingConfigRule ¶
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 ¶
NodePoolNameRule ports NodePoolName (mk8sCommon.ts:69).
func PoolNamesUniqueArrayCustom ¶
PoolNamesUniqueArrayCustom ports the `.custom` some providers attach directly to their nodePools array (aws/azure/gcp/ephemeral): reject duplicate pool names.
func PoolNamesUniqueObjectCustom ¶
PoolNamesUniqueObjectCustom ports the provider-level `.custom` that rejects duplicate node-pool names across the given array keys (e.g. nodePools + dedicatedServerNodePools + unmanagedNodePools).
func PreInstallScriptRule ¶
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 ¶
SshPublicKeyRule ports SshPublicKey (mk8sCommon.ts:73).
func StrOf ¶
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 UnmanagedPoolRule ¶
UnmanagedPoolRule ports UnmanagedPool (mk8sCommon.ts:115).
func UriStringRule ¶
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 KubeConfigBody ¶
type KubeConfigRes ¶
type NodePoolName ¶
type NodePoolName string
type PreInstallScript ¶
type PreInstallScript string
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" )