diff --git a/typescript/infra/src/agents/index.ts b/typescript/infra/src/agents/index.ts index ee0da5889a..3f3f6469aa 100644 --- a/typescript/infra/src/agents/index.ts +++ b/typescript/infra/src/agents/index.ts @@ -164,6 +164,19 @@ export class RelayerHelmManager extends OmniscientAgentHelmManager { signer: signers[name], })); + if (!values.tolerations) { + values.tolerations = []; + } + + // Relayer pods should only be scheduled on nodes with the component label set to relayer. + // NoSchedule was chosen so that some daemonsets (like the prometheus node exporter) would not be evicted. + values.tolerations.push({ + key: 'component', + operator: 'Equal', + value: 'relayer', + effect: 'NoSchedule', + }); + return values; } } diff --git a/typescript/infra/src/config/agent/agent.ts b/typescript/infra/src/config/agent/agent.ts index e9ff6f3e40..987a05f0ea 100644 --- a/typescript/infra/src/config/agent/agent.ts +++ b/typescript/infra/src/config/agent/agent.ts @@ -36,6 +36,7 @@ export interface HelmRootAgentValues { image: HelmImageValues; hyperlane: HelmHyperlaneValues; nameOverride?: string; + tolerations?: KubernetesToleration[]; } // See rust/main/helm/values.yaml for the full list of options and their defaults. @@ -132,6 +133,13 @@ export interface KubernetesComputeResources { memory: string; } +export interface KubernetesToleration { + key: string; + operator: string; + value: string; + effect: string; +} + export class RootAgentConfigHelper implements AgentContextConfig { readonly rawConfig: RootAgentConfig;