Skip to content

Commit

Permalink
Merge pull request #2082 from yuvipanda/cleaner-template
Browse files Browse the repository at this point in the history
Set daskNodes = [] if dask isn't specified
  • Loading branch information
consideRatio authored Feb 1, 2023
2 parents 98ca113 + 3bc7de3 commit a9d8816
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions eksctl/template.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,24 @@ local notebookNodes = [
{ instanceType: "m5.2xlarge" },
{ instanceType: "m5.8xlarge" },
];

local daskNodes =
if "<< hub_type >>" == "daskhub" then [
<% if hub_type == "daskhub" %>
local daskNodes = [
// Node definitions for dask worker nodes. Config here is merged
// with our dask worker node definition, which uses spot instances.
// A `node.kubernetes.io/instance-type label is set to the name of the
// *first* item in instanceDistribution.instanceTypes, to match
// what we do with notebook nodes. Pods can request a particular
// kind of node with a nodeSelector
{ instancesDistribution+: { instanceTypes: ["m5.large"] }},
{ instancesDistribution+: { instanceTypes: ["m5.xlarge"] }},
{ instancesDistribution+: { instanceTypes: ["m5.2xlarge"] }},
{ instancesDistribution+: { instanceTypes: ["m5.8xlarge"] }},
];
{ instancesDistribution+: { instanceTypes: ["m5.large"] }},
{ instancesDistribution+: { instanceTypes: ["m5.xlarge"] }},
{ instancesDistribution+: { instanceTypes: ["m5.2xlarge"] }},
{ instancesDistribution+: { instanceTypes: ["m5.8xlarge"] }},
];
<% else %>
local daskNodes = [];
<% endif %>


{
apiVersion: 'eksctl.io/v1alpha5',
kind: 'ClusterConfig',
Expand Down Expand Up @@ -130,4 +134,4 @@ local daskNodes =
} + n for n in daskNodes
] else []
)
}
}

0 comments on commit a9d8816

Please sign in to comment.