From bfca0878ed9c12338c791b91832ddb893293a27c Mon Sep 17 00:00:00 2001 From: Ben Sherman Date: Thu, 2 Nov 2023 09:19:12 -0700 Subject: [PATCH] feat(launch): adding `agent.nodeSelector` variable for agent chart (#40) --- charts/launch-agent/Chart.yaml | 2 +- charts/launch-agent/README.md | 2 ++ charts/launch-agent/templates/deployment.yaml | 2 ++ charts/launch-agent/values.yaml | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/charts/launch-agent/Chart.yaml b/charts/launch-agent/Chart.yaml index 90f6bcdf..6f53fac1 100644 --- a/charts/launch-agent/Chart.yaml +++ b/charts/launch-agent/Chart.yaml @@ -3,7 +3,7 @@ name: launch-agent icon: https://em-content.zobj.net/thumbs/240/apple/354/rocket_1f680.png description: A Helm chart for running the W&B Launch Agent in Kubernetes type: application -version: 0.11.2 +version: 0.11.3 maintainers: - name: wandb email: support@wandb.com diff --git a/charts/launch-agent/README.md b/charts/launch-agent/README.md index 99c6b7ea..bdc5d089 100644 --- a/charts/launch-agent/README.md +++ b/charts/launch-agent/README.md @@ -45,6 +45,8 @@ The table below describes all the available variables in the chart: | `agent.useExternalWandbSecret` | bool | **false** | "" | Used to indicate you want to provide the api key secret external to this chart. | | `agent.image` | string | No | `wandb/launch-agent-dev:latest` | Container image for the agent. | | `agent.imagePullPolicy` | string | No | `Always` | Pull policy for the agent container image. | +| `agent.resources` | object | No | Limit to 1 CPU, 1Gi RAM | Pod spec resources block for the agent. | +| `agent.nodeSelector` | object | No | `{}` | Node selector for the agent pod. | | `agent.resources` | object | No | Limit to 1 CPU, 1Gi RAM | Pod spec resources block for the agent. true | | `agent.startTimeout` | int | No | `1800` | Timeout in seconds that the agent will wait for a job to start before timing out. | | `namespace` | string | No | `wandb` | The namespace to deploy the agent into. | diff --git a/charts/launch-agent/templates/deployment.yaml b/charts/launch-agent/templates/deployment.yaml index f6b83b39..93839baf 100644 --- a/charts/launch-agent/templates/deployment.yaml +++ b/charts/launch-agent/templates/deployment.yaml @@ -79,4 +79,6 @@ spec: secret: secretName: git-config {{ end}} + nodeSelector: + {{- toYaml .Values.agent.nodeSelector | nindent 8 }} ... \ No newline at end of file diff --git a/charts/launch-agent/values.yaml b/charts/launch-agent/values.yaml index d6ad4dd2..4de6a288 100644 --- a/charts/launch-agent/values.yaml +++ b/charts/launch-agent/values.yaml @@ -13,6 +13,8 @@ agent: limits: cpu: 1000m memory: 1Gi + # Node selector for the agent pod. + nodeSelector: {} # Job start timeout (seconds) startTimeout: 1800