@@ -121,6 +121,16 @@ const Env = z
121121
122122 KUBERNETES_MEMORY_OVERHEAD_GB : z . coerce . number ( ) . min ( 0 ) . optional ( ) , // Optional memory overhead to add to the limit in GB
123123 KUBERNETES_SCHEDULER_NAME : z . string ( ) . optional ( ) , // Custom scheduler name for pods
124+
125+ // Pod DNS config — override the cluster default ndots to `KUBERNETES_POD_DNS_NDOTS`.
126+ // Default k8s ndots is 5: any name with fewer than 5 dots (e.g. `api.example.com`, 2 dots) is first walked
127+ // through every entry in the cluster search list (`<ns>.svc.cluster.local`, `svc.cluster.local`, `cluster.local`)
128+ // before being tried as-is, turning one resolution into 4+ CoreDNS queries (×2 with A+AAAA).
129+ // Overriding the default can be useful to cut CoreDNS query amplification for external domains.
130+ // Note: before enabling, make sure no code path relies on search-list expansion for names with dots ≥ the value
131+ // set here — those names will now hit their as-is form first and could resolve externally before falling back.
132+ KUBERNETES_POD_DNS_NDOTS_OVERRIDE_ENABLED : BoolEnv . default ( false ) ,
133+ KUBERNETES_POD_DNS_NDOTS : z . coerce . number ( ) . int ( ) . min ( 1 ) . max ( 15 ) . default ( 2 ) ,
124134 // Large machine affinity settings - large-* presets prefer a dedicated pool
125135 KUBERNETES_LARGE_MACHINE_AFFINITY_ENABLED : BoolEnv . default ( false ) ,
126136 KUBERNETES_LARGE_MACHINE_AFFINITY_POOL_LABEL_KEY : z
@@ -189,7 +199,9 @@ const Env = z
189199 if ( ! validEffects . includes ( effect ) ) {
190200 ctx . addIssue ( {
191201 code : z . ZodIssueCode . custom ,
192- message : `Invalid toleration effect "${ effect } " in "${ entry } ". Must be one of: ${ validEffects . join ( ", " ) } ` ,
202+ message : `Invalid toleration effect "${ effect } " in "${ entry } ". Must be one of: ${ validEffects . join (
203+ ", "
204+ ) } `,
193205 } ) ;
194206 return z . NEVER ;
195207 }
0 commit comments