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
- func DerivedNodeArch(instanceType string) string
- func ExplicitArchMatchesInstance(explicit, instanceType string) bool
- func FirecrackerUpstreamArch(clusterArch string) string
- func HomogeneousClusterArch(nodeArch map[string]string) string
- func IngressCapable(role string) bool
- func IngressTierAllowed(roles map[string]string, shardAwareIngress bool) bool
- func NodeArch(explicit, instanceType string) string
Constants ¶
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 ¶
DerivedNodeArch returns amd64 or arm64 from the instance type alone.
func ExplicitArchMatchesInstance ¶
ExplicitArchMatchesInstance mirrors Terraform's guard that prevents selecting arm artifacts/AMIs for x86 instances or x86 artifacts/AMIs for Graviton.
func FirecrackerUpstreamArch ¶
FirecrackerUpstreamArch maps cluster arch to Firecracker release bucket arch.
func HomogeneousClusterArch ¶
HomogeneousClusterArch returns the single arch when all nodes agree, or "".
func IngressCapable ¶ added in v0.6.1
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
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.
Types ¶
This section is empty.