Skip to content

Commit 115d549

Browse files
authored
Merge branch 'main' into pre-commit-ci-update-config
2 parents c3b347b + cf6be0d commit 115d549

File tree

13 files changed

+495
-11
lines changed

13 files changed

+495
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
- [Install Nebari](#install-nebari)
3838
- [Usage 🚀](#usage-)
3939
- [Nebari HPC](#nebari-hpc)
40-
- [Contributing to Nebari 👩🏻‍💻](#contributing-to-nebari-)
40+
- [Contributing to Nebari 👩🏻‍💻](#contributing-to-nebari-%E2%80%8D)
4141
- [Installing the Development version of Nebari ⚙️](#installing-the-development-version-of-nebari-️)
4242
- [Questions? 🤔](#questions-)
4343
- [Code of Conduct 📖](#code-of-conduct-)

src/_nebari/constants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CURRENT_RELEASE = "2025.6.1"
1+
CURRENT_RELEASE = "2025.10.1"
22

33
HELM_VERSION = "v3.15.3"
44
KUSTOMIZE_VERSION = "5.4.3"
@@ -9,7 +9,7 @@
99
# 04-kubernetes-ingress
1010
DEFAULT_TRAEFIK_IMAGE_TAG = "2.9.1"
1111

12-
HIGHEST_SUPPORTED_K8S_VERSION = ("1", "31") # specify Major and Minor version
12+
HIGHEST_SUPPORTED_K8S_VERSION = ("1", "32") # specify Major and Minor version
1313
DEFAULT_GKE_RELEASE_CHANNEL = "UNSPECIFIED"
1414

1515
DEFAULT_NEBARI_DASK_VERSION = CURRENT_RELEASE

src/_nebari/provider/helm.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ def download_helm_binary(version=constants.HELM_VERSION) -> Path:
5959
def run_helm_subprocess(processargs, **kwargs) -> None:
6060
helm_path = download_helm_binary()
6161
logger.info("helm at %s", helm_path)
62-
if run_subprocess_cmd([helm_path] + processargs, **kwargs):
62+
return_code, output = run_subprocess_cmd(
63+
[helm_path] + processargs, capture_output=True, **kwargs
64+
)
65+
if return_code:
6366
raise HelmException("Helm returned an error")
6467

6568

src/_nebari/stages/infrastructure/template/gcp/modules/kubernetes/main.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ data "google_client_config" "main" {
22
}
33

44
resource "google_container_cluster" "main" {
5-
name = var.name
6-
location = var.location
7-
min_master_version = var.kubernetes_version
5+
name = var.name
6+
location = var.location
7+
min_master_version = var.kubernetes_version
8+
deletion_protection = false
89

910
node_locations = var.availability_zones
1011

src/_nebari/stages/infrastructure/template/local/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ resource "kind_cluster" "default" {
4848

4949
node {
5050
role = "general"
51-
image = "kindest/node:v1.32.0"
51+
image = "kindest/node:v1.32.5"
5252
}
5353
}
5454
}

src/_nebari/stages/kubernetes_services/__init__.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,28 @@ class CondaEnvironment(schema.Base):
239239
dependencies: List[Union[str, Dict[str, List[str]]]]
240240

241241

242+
class WorkerResources(schema.Base):
243+
cpu_limit: Optional[Union[str, float, int]] = 2
244+
mem_limit: Optional[Union[str, float, int]] = "6Gi"
245+
cpu_guarantee: Optional[Union[str, float, int]] = 1
246+
mem_guarantee: Optional[Union[str, float, int]] = "4Gi"
247+
248+
249+
class CondaStoreWorker(schema.Base):
250+
resources: Optional[WorkerResources] = WorkerResources()
251+
# for the rest defaults are handled in terraform (worker.tf),
252+
# so we don't need to set it here
253+
max_workers: Optional[int] = None
254+
255+
242256
class CondaStore(schema.Base):
243257
extra_settings: Dict[str, Any] = {}
244258
extra_config: str = ""
245259
image: str = "quansight/conda-store-server"
246260
image_tag: str = constants.DEFAULT_CONDA_STORE_IMAGE_TAG
247261
default_namespace: str = "nebari-git"
248262
object_storage: str = "200Gi"
263+
worker: Optional[CondaStoreWorker] = None
249264

250265

251266
class NebariWorkflowController(schema.Base):
@@ -489,6 +504,9 @@ class CondaStoreInputVars(schema.Base):
489504
conda_store_service_token_scopes: Dict[str, Dict[str, Any]] = Field(
490505
alias="conda-store-service-token-scopes"
491506
)
507+
conda_store_worker: CondaStoreWorker | None = Field(
508+
alias="conda-store-worker",
509+
)
492510

493511
@field_validator("conda_store_filesystem_storage", mode="before")
494512
@classmethod
@@ -712,6 +730,7 @@ def _node_taint_tolerations(node_group_name: str) -> List[Toleration]:
712730
conda_store_extra_config=self.config.conda_store.extra_config,
713731
conda_store_image=self.config.conda_store.image,
714732
conda_store_image_tag=self.config.conda_store.image_tag,
733+
conda_store_worker=(self.config.conda_store.worker or {}),
715734
)
716735

717736
jupyterhub_vars = JupyterhubInputVars(

src/_nebari/stages/kubernetes_services/template/conda-store.tf

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ variable "conda-store-service-token-scopes" {
3838
type = map(any)
3939
}
4040

41+
variable "conda-store-worker" {
42+
description = "Worker-specific overrides for conda-store worker pods."
43+
type = any
44+
default = {}
45+
}
46+
47+
4148
# ====================== RESOURCES =======================
4249
module "kubernetes-conda-store-server" {
4350
source = "./modules/kubernetes/services/conda-store"
@@ -63,6 +70,8 @@ module "kubernetes-conda-store-server" {
6370
extra-config = var.conda-store-extra-config
6471
conda-store-fs = var.shared_fs_type
6572

73+
conda-store-worker = var.conda-store-worker
74+
6675
depends_on = [
6776
module.rook-ceph
6877
]
@@ -76,4 +85,14 @@ moved {
7685

7786
locals {
7887
conda-store-fs = var.shared_fs_type
88+
conda-store-worker-resources = {
89+
limits = {
90+
cpu = "1"
91+
memory = "2Gi"
92+
}
93+
requests = {
94+
cpu = "0.5"
95+
memory = "1Gi"
96+
}
97+
}
7998
}

src/_nebari/stages/kubernetes_services/template/modules/kubernetes/nfs-server/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ resource "kubernetes_deployment" "main" {
8888

8989
container {
9090
name = "nfs-server"
91-
image = "gcr.io/google_containers/volume-nfs:0.8"
91+
image = "quay.io/nebari/volume-nfs:0.8-repack"
9292

9393
port {
9494
name = "nfs"

src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/conda-store/variables.tf

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,25 @@ variable "conda-store-fs" {
8686
error_message = "Allowed values for input_parameter are \"cephfs\", or \"nfs\"."
8787
}
8888
}
89+
90+
variable "conda-store-worker" {
91+
description = "Worker-specific overrides for conda-store worker pods."
92+
type = object({
93+
max_workers = optional(any)
94+
resources = optional(object({
95+
cpu_limit = optional(any)
96+
mem_limit = optional(any)
97+
cpu_guarantee = optional(any)
98+
mem_guarantee = optional(any)
99+
}))
100+
})
101+
default = {
102+
max_workers = 1
103+
resources = {
104+
cpu_limit = 2
105+
mem_limit = "6Gi"
106+
cpu_guarantee = 1
107+
mem_guarantee = "4Gi"
108+
}
109+
}
110+
}

src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/conda-store/worker.tf

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ resource "kubernetes_deployment" "worker" {
6666
}
6767

6868
spec {
69-
replicas = 1
69+
replicas = var.conda-store-worker.max_workers != null ? tonumber(var.conda-store-worker.max_workers) : 1
7070

7171
selector {
7272
match_labels = {
@@ -94,6 +94,8 @@ resource "kubernetes_deployment" "worker" {
9494
required_during_scheduling_ignored_during_execution {
9595
node_selector_term {
9696
match_expressions {
97+
// Since all node selectors use the same provider key, we can reuse
98+
// the same key even when overriding the value.
9799
key = var.node-group.key
98100
operator = "In"
99101
values = [
@@ -115,6 +117,20 @@ resource "kubernetes_deployment" "worker" {
115117
"/etc/conda-store/conda_store_config.py"
116118
]
117119

120+
dynamic "resources" {
121+
for_each = var.conda-store-worker.resources == null ? [] : [var.conda-store-worker.resources]
122+
content {
123+
limits = {
124+
cpu = resources.value.cpu_limit == null ? null : resources.value.cpu_limit
125+
memory = resources.value.mem_limit == null ? null : resources.value.mem_limit
126+
}
127+
requests = {
128+
cpu = resources.value.cpu_guarantee == null ? null : resources.value.cpu_guarantee
129+
memory = resources.value.mem_guarantee == null ? null : resources.value.mem_guarantee
130+
}
131+
}
132+
}
133+
118134
volume_mount {
119135
name = "config"
120136
mount_path = "/etc/conda-store"
@@ -140,7 +156,7 @@ resource "kubernetes_deployment" "worker" {
140156
for_each = local.enable-nfs-server-worker ? [1] : []
141157
content {
142158
name = "nfs-server"
143-
image = "gcr.io/google_containers/volume-nfs:0.8"
159+
image = "quay.io/nebari/volume-nfs:0.8-repack"
144160

145161
port {
146162
name = "nfs"

0 commit comments

Comments
 (0)