validate

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package validate mirrors Terraform locals.tf node-arch derivation and the homogeneous-cluster precondition so mixed-arch tfvars fail in offline tests without a live AWS plan.

Index

Constants

View Source
const MaxReplicatedIngressRouteNodes = 10

MaxReplicatedIngressRouteNodes mirrors internal/cluster.MaxReplicatedIngressRouteNodes: the largest ingress tier where every ingress-capable node holds the full public route table, so a router that picks any ingress node for any sandbox (DNS round-robin, a cloud TCP LB, a BGP VIP) is correct. Above it the daemon fails closed unless SB_CLUSTER_SHARD_AWARE_INGRESS declares a router that resolves owners through /v1/cluster/ingress-route/{id}. Keep in step with the Go constant and the precondition in Terraform/nodes.tf.

Variables

This section is empty.

Functions

func DerivedNodeArch

func DerivedNodeArch(instanceType string) string

DerivedNodeArch returns amd64 or arm64 from the instance type alone.

func ExplicitArchMatchesInstance

func ExplicitArchMatchesInstance(explicit, instanceType string) bool

ExplicitArchMatchesInstance mirrors Terraform's guard that prevents selecting arm artifacts/AMIs for x86 instances or x86 artifacts/AMIs for Graviton.

func FirecrackerUpstreamArch

func FirecrackerUpstreamArch(clusterArch string) string

FirecrackerUpstreamArch maps cluster arch to Firecracker release bucket arch.

func HomogeneousClusterArch

func HomogeneousClusterArch(nodeArch map[string]string) string

HomogeneousClusterArch returns the single arch when all nodes agree, or "".

func IngressCapable added in v0.6.1

func IngressCapable(role string) bool

IngressCapable mirrors locals.tf ingress_node_names: a role set containing "ingress", or the "mixed" shorthand, serves public ingress.

func IngressTierAllowed added in v0.6.1

func IngressTierAllowed(roles map[string]string, shardAwareIngress bool) bool

IngressTierAllowed mirrors the nodes.tf precondition: more than MaxReplicatedIngressRouteNodes ingress-capable nodes need the operator's shard_aware_ingress declaration, or the daemon refuses the topology at boot.

func NodeArch

func NodeArch(explicit, instanceType string) string

NodeArch returns amd64 or arm64 from an explicit arch field or instance type.

Types

This section is empty.

Jump to

Keyboard shortcuts

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