From 42619b9becc36f9eb24bcdfd7593a6e8250c5224 Mon Sep 17 00:00:00 2001 From: Daniel Panzella Date: Tue, 14 Jul 2026 05:58:46 -0700 Subject: [PATCH 1/2] fix: Make bucket proxy conditional --- api/v2/weightsandbiases_types.go | 1 + .../bases/apps.wandb.com_weightsandbiases.yaml | 3 +++ .../0.83.0-clickhouse-keeper.1/manifest.yaml | 15 ++++++++++++--- .../0.83.0-clickhouse-keeper.2/manifest.yaml | 17 +++++++++++++---- .../apps.wandb.com_weightsandbiases.yaml | 3 +++ internal/webhook/v2/weightsandbiases_webhook.go | 4 ++++ 6 files changed, 36 insertions(+), 7 deletions(-) diff --git a/api/v2/weightsandbiases_types.go b/api/v2/weightsandbiases_types.go index 03d1c21d..1bcec37c 100644 --- a/api/v2/weightsandbiases_types.go +++ b/api/v2/weightsandbiases_types.go @@ -305,6 +305,7 @@ type WandbAppSpec struct { Version string `json:"version"` Features map[string]bool `json:"features"` InternalServiceAuth InternalServiceAuth `json:"internalServiceAuth,omitempty"` + BucketProxy bool `json:"bucketProxy"` ServiceAccount ServiceAccountSpec `json:"serviceAccount,omitempty"` diff --git a/config/crd/bases/apps.wandb.com_weightsandbiases.yaml b/config/crd/bases/apps.wandb.com_weightsandbiases.yaml index fe53a57a..611d875b 100644 --- a/config/crd/bases/apps.wandb.com_weightsandbiases.yaml +++ b/config/crd/bases/apps.wandb.com_weightsandbiases.yaml @@ -3821,6 +3821,8 @@ spec: items: type: string type: array + bucketProxy: + type: boolean features: additionalProperties: type: boolean @@ -4280,6 +4282,7 @@ spec: version: type: string required: + - bucketProxy - features - hostname - version diff --git a/hack/testing-manifests/server-manifest/0.83.0-clickhouse-keeper.1/manifest.yaml b/hack/testing-manifests/server-manifest/0.83.0-clickhouse-keeper.1/manifest.yaml index d12159a4..86fa3f5e 100644 --- a/hack/testing-manifests/server-manifest/0.83.0-clickhouse-keeper.1/manifest.yaml +++ b/hack/testing-manifests/server-manifest/0.83.0-clickhouse-keeper.1/manifest.yaml @@ -249,11 +249,20 @@ commonEnvvars: - name: session-key type: generatedSecret - name: BUCKET_PROXY - value: "true" + sources: + - name: bucket-proxy + type: custom-resource + field: spec.wandb.bucketProxy - name: GORILLA_GLUE_FILE_STORE_IS_PROXIED - value: "true" + sources: + - name: bucket-proxy + type: custom-resource + field: spec.wandb.bucketProxy - name: GORILLA_FILE_STORE_IS_PROXIED - value: "true" + sources: + - name: bucket-proxy + type: custom-resource + field: spec.wandb.bucketProxy - name: GORILLA_FILE_HOST sources: - name: hostname diff --git a/hack/testing-manifests/server-manifest/0.83.0-clickhouse-keeper.2/manifest.yaml b/hack/testing-manifests/server-manifest/0.83.0-clickhouse-keeper.2/manifest.yaml index d12159a4..97f48a09 100644 --- a/hack/testing-manifests/server-manifest/0.83.0-clickhouse-keeper.2/manifest.yaml +++ b/hack/testing-manifests/server-manifest/0.83.0-clickhouse-keeper.2/manifest.yaml @@ -249,11 +249,20 @@ commonEnvvars: - name: session-key type: generatedSecret - name: BUCKET_PROXY - value: "true" + sources: + - name: bucket-proxy + type: custom-resource + field: spec.wandb.bucketProxy - name: GORILLA_GLUE_FILE_STORE_IS_PROXIED - value: "true" + sources: + - name: bucket-proxy + type: custom-resource + field: spec.wandb.bucketProxy - name: GORILLA_FILE_STORE_IS_PROXIED - value: "true" + sources: + - name: bucket-proxy + type: custom-resource + field: spec.wandb.bucketProxy - name: GORILLA_FILE_HOST sources: - name: hostname @@ -1048,7 +1057,7 @@ applications: location /bucket { proxy_ssl_verify off; proxy_set_header Host $bucket; - proxy_pass https://bucket; + proxy_pass http://bucket; } } } diff --git a/internal/crdinstaller/crds/operator/apps.wandb.com_weightsandbiases.yaml b/internal/crdinstaller/crds/operator/apps.wandb.com_weightsandbiases.yaml index fe53a57a..611d875b 100644 --- a/internal/crdinstaller/crds/operator/apps.wandb.com_weightsandbiases.yaml +++ b/internal/crdinstaller/crds/operator/apps.wandb.com_weightsandbiases.yaml @@ -3821,6 +3821,8 @@ spec: items: type: string type: array + bucketProxy: + type: boolean features: additionalProperties: type: boolean @@ -4280,6 +4282,7 @@ spec: version: type: string required: + - bucketProxy - features - hostname - version diff --git a/internal/webhook/v2/weightsandbiases_webhook.go b/internal/webhook/v2/weightsandbiases_webhook.go index a329dde1..1dedc37e 100644 --- a/internal/webhook/v2/weightsandbiases_webhook.go +++ b/internal/webhook/v2/weightsandbiases_webhook.go @@ -125,6 +125,10 @@ func (d *WeightsAndBiasesCustomDefaulter) Default(ctx context.Context, obj runti applyClickHouseDefaults(wandb) applyProbeDefaults(wandb) + if defaultStore, ok := wandb.Spec.ObjectStore["default"]; ok && defaultStore.ManagedObjectStore != nil { + wandb.Spec.Wandb.BucketProxy = true + } + return nil } From 1106901ed1b6033500c0e660fcd4682e5a400189 Mon Sep 17 00:00:00 2001 From: Daniel Panzella Date: Tue, 14 Jul 2026 06:18:54 -0700 Subject: [PATCH 2/2] fix: Remove nginx proxy --- .../0.83.0-clickhouse-keeper.1/manifest.yaml | 147 ------------------ .../0.83.0-clickhouse-keeper.1/sizing.yaml | 27 ---- .../0.83.0-clickhouse-keeper.2/manifest.yaml | 147 ------------------ .../0.83.0-clickhouse-keeper.2/sizing.yaml | 27 ---- 4 files changed, 348 deletions(-) diff --git a/hack/testing-manifests/server-manifest/0.83.0-clickhouse-keeper.1/manifest.yaml b/hack/testing-manifests/server-manifest/0.83.0-clickhouse-keeper.1/manifest.yaml index 86fa3f5e..0769371c 100644 --- a/hack/testing-manifests/server-manifest/0.83.0-clickhouse-keeper.1/manifest.yaml +++ b/hack/testing-manifests/server-manifest/0.83.0-clickhouse-keeper.1/manifest.yaml @@ -3,7 +3,6 @@ requiredOperatorVersion: ^2.0.0 features: filestreamQueue: false - proxy: false bucket: default: @@ -921,152 +920,6 @@ applications: - "python" - "-m" - "src.workers.evaluate_model_worker.evaluate_model_worker" - nginx-proxy: - name: nginx-proxy - legacyKey: nginx - features: - - proxy - image: - repository: nginxinc/nginx-unprivileged - tag: latest - commonEnvs: - env: - - name: UPSTREAM_FRONTEND - sources: - - name: frontend - type: service - proto: "" - path: "" - - name: UPSTREAM_API - sources: - - name: api - type: service - proto: "" - path: "" - - name: UPSTREAM_WEAVE_TRACE - sources: - - name: weave-trace - type: service - proto: "" - path: "" - - name: UPSTREAM_WEAVE - sources: - - name: weave - type: service - proto: "" - path: "" - - name: BUCKET_HOST - sources: - - name: default - type: bucket - field: host - - name: BUCKET_PORT - sources: - - name: default - type: bucket - field: port - - name: UPSTREAM_BUCKET - value: "$(BUCKET_HOST):$(BUCKET_PORT)" - files: - - name: envvar.conf.template - mountPath: /etc/nginx/templates - fileName: envvar.conf.template - inline: | - upstream frontend { - server $UPSTREAM_FRONTEND; - } - - upstream api { - server $UPSTREAM_API; - } - - upstream weave_trace { - server $UPSTREAM_WEAVE_TRACE; - } - - upstream weave { - server $UPSTREAM_WEAVE; - } - - upstream bucket { - server $UPSTREAM_BUCKET; - } - - map $host $bucket{ - default $UPSTREAM_BUCKET; - } - - name: nginx.conf - mountPath: /etc/nginx - fileName: nginx.conf - inline: | - worker_processes auto; - - error_log /var/log/nginx/error.log notice; - pid /tmp/nginx.pid; - - events { - worker_connections 1024; - } - - http { - - include /etc/nginx/conf.d/envvar.conf; - - server { - listen 8080; - proxy_set_header Host $http_host; - client_max_body_size 0; - location / { - proxy_pass http://frontend; - } - - location /api { - proxy_pass http://api; - } - location /artifacts { - proxy_pass http://api; - } - location /artifactsV2 { - proxy_pass http://api; - } - - location /files { - proxy_pass http://api; - } - - location /graphql { - proxy_pass http://api; - } - - location /graphql2 { - proxy_pass http://api; - } - - location /oidc { - proxy_pass http://api; - } - - location /traces { - proxy_pass http://weave_trace; - } - - location /weave/ { - proxy_pass http://weave/; - } - - location /bucket { - proxy_ssl_verify off; - proxy_set_header Host $bucket; - proxy_pass https://bucket; - } - } - } - service: - type: NodePort - ports: - - name: http - port: 8080 - protocol: TCP migrations: gorilla: diff --git a/hack/testing-manifests/server-manifest/0.83.0-clickhouse-keeper.1/sizing.yaml b/hack/testing-manifests/server-manifest/0.83.0-clickhouse-keeper.1/sizing.yaml index d6011f21..29f7223b 100644 --- a/hack/testing-manifests/server-manifest/0.83.0-clickhouse-keeper.1/sizing.yaml +++ b/hack/testing-manifests/server-manifest/0.83.0-clickhouse-keeper.1/sizing.yaml @@ -1515,30 +1515,3 @@ applications: enabled: true maxReplicas: 8 minReplicas: 4 - nginx-proxy: - sizing: - default: - autoscaling: - enabled: true - minReplicas: 2 - maxReplicas: 4 - resources: - limits: - cpu: "2" - memory: 2Gi - requests: - cpu: "2" - memory: 2Gi - micro: - resources: - limits: - cpu: "1" - memory: 2Gi - requests: - cpu: "1" - memory: 2Gi - autoscaling: - horizontal: - enabled: true - maxReplicas: 2 - minReplicas: 1 diff --git a/hack/testing-manifests/server-manifest/0.83.0-clickhouse-keeper.2/manifest.yaml b/hack/testing-manifests/server-manifest/0.83.0-clickhouse-keeper.2/manifest.yaml index 97f48a09..0769371c 100644 --- a/hack/testing-manifests/server-manifest/0.83.0-clickhouse-keeper.2/manifest.yaml +++ b/hack/testing-manifests/server-manifest/0.83.0-clickhouse-keeper.2/manifest.yaml @@ -3,7 +3,6 @@ requiredOperatorVersion: ^2.0.0 features: filestreamQueue: false - proxy: false bucket: default: @@ -921,152 +920,6 @@ applications: - "python" - "-m" - "src.workers.evaluate_model_worker.evaluate_model_worker" - nginx-proxy: - name: nginx-proxy - legacyKey: nginx - features: - - proxy - image: - repository: nginxinc/nginx-unprivileged - tag: latest - commonEnvs: - env: - - name: UPSTREAM_FRONTEND - sources: - - name: frontend - type: service - proto: "" - path: "" - - name: UPSTREAM_API - sources: - - name: api - type: service - proto: "" - path: "" - - name: UPSTREAM_WEAVE_TRACE - sources: - - name: weave-trace - type: service - proto: "" - path: "" - - name: UPSTREAM_WEAVE - sources: - - name: weave - type: service - proto: "" - path: "" - - name: BUCKET_HOST - sources: - - name: default - type: bucket - field: host - - name: BUCKET_PORT - sources: - - name: default - type: bucket - field: port - - name: UPSTREAM_BUCKET - value: "$(BUCKET_HOST):$(BUCKET_PORT)" - files: - - name: envvar.conf.template - mountPath: /etc/nginx/templates - fileName: envvar.conf.template - inline: | - upstream frontend { - server $UPSTREAM_FRONTEND; - } - - upstream api { - server $UPSTREAM_API; - } - - upstream weave_trace { - server $UPSTREAM_WEAVE_TRACE; - } - - upstream weave { - server $UPSTREAM_WEAVE; - } - - upstream bucket { - server $UPSTREAM_BUCKET; - } - - map $host $bucket{ - default $UPSTREAM_BUCKET; - } - - name: nginx.conf - mountPath: /etc/nginx - fileName: nginx.conf - inline: | - worker_processes auto; - - error_log /var/log/nginx/error.log notice; - pid /tmp/nginx.pid; - - events { - worker_connections 1024; - } - - http { - - include /etc/nginx/conf.d/envvar.conf; - - server { - listen 8080; - proxy_set_header Host $http_host; - client_max_body_size 0; - location / { - proxy_pass http://frontend; - } - - location /api { - proxy_pass http://api; - } - location /artifacts { - proxy_pass http://api; - } - location /artifactsV2 { - proxy_pass http://api; - } - - location /files { - proxy_pass http://api; - } - - location /graphql { - proxy_pass http://api; - } - - location /graphql2 { - proxy_pass http://api; - } - - location /oidc { - proxy_pass http://api; - } - - location /traces { - proxy_pass http://weave_trace; - } - - location /weave/ { - proxy_pass http://weave/; - } - - location /bucket { - proxy_ssl_verify off; - proxy_set_header Host $bucket; - proxy_pass http://bucket; - } - } - } - service: - type: NodePort - ports: - - name: http - port: 8080 - protocol: TCP migrations: gorilla: diff --git a/hack/testing-manifests/server-manifest/0.83.0-clickhouse-keeper.2/sizing.yaml b/hack/testing-manifests/server-manifest/0.83.0-clickhouse-keeper.2/sizing.yaml index d6011f21..29f7223b 100644 --- a/hack/testing-manifests/server-manifest/0.83.0-clickhouse-keeper.2/sizing.yaml +++ b/hack/testing-manifests/server-manifest/0.83.0-clickhouse-keeper.2/sizing.yaml @@ -1515,30 +1515,3 @@ applications: enabled: true maxReplicas: 8 minReplicas: 4 - nginx-proxy: - sizing: - default: - autoscaling: - enabled: true - minReplicas: 2 - maxReplicas: 4 - resources: - limits: - cpu: "2" - memory: 2Gi - requests: - cpu: "2" - memory: 2Gi - micro: - resources: - limits: - cpu: "1" - memory: 2Gi - requests: - cpu: "1" - memory: 2Gi - autoscaling: - horizontal: - enabled: true - maxReplicas: 2 - minReplicas: 1