Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add taint & toleration to mainnet3 relayer node pool #4780

Merged
merged 2 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions typescript/infra/src/agents/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
8 changes: 8 additions & 0 deletions typescript/infra/src/config/agent/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export interface HelmRootAgentValues {
image: HelmImageValues;
hyperlane: HelmHyperlaneValues;
nameOverride?: string;
tolerations?: KubernetesToleration[];
tkporter marked this conversation as resolved.
Show resolved Hide resolved
}

// See rust/main/helm/values.yaml for the full list of options and their defaults.
Expand Down Expand Up @@ -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;

Expand Down