Skip to content

Commit

Permalink
Merge e32a353 into f896d90
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyblasczyk authored Jan 22, 2025
2 parents f896d90 + e32a353 commit 6691afe
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 15 deletions.
12 changes: 6 additions & 6 deletions charts/operator-wandb/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dependencies:
version: 0.1.0
- name: wandb-base
repository: file://../wandb-base
version: 0.3.4
version: 0.4.0
- name: console
repository: file://charts/console
version: 0.1.0
Expand Down Expand Up @@ -34,7 +34,7 @@ dependencies:
version: 25.3.5
- name: etcd
repository: oci://registry-1.docker.io/bitnamicharts
version: 10.7.2
version: 10.7.3
- name: bufstream
repository: file://charts/bufstream
version: 0.3.5
Expand All @@ -58,9 +58,9 @@ dependencies:
version: 0.1.0
- name: wandb-base
repository: file://../wandb-base
version: 0.3.4
version: 0.4.0
- name: wandb-base
repository: file://../wandb-base
version: 0.3.4
digest: sha256:98ce75756c091ccd2e7bfb092be88f84444f05e1493bc4adfc66208267a452dd
generated: "2025-01-15T19:56:47.399339-06:00"
version: 0.4.0
digest: sha256:d9e104084992aaca36330a56d4a5b825fd20f0bdf995070bf93f46a883375169
generated: "2025-01-21T12:17:36.303852-06:00"
2 changes: 1 addition & 1 deletion charts/operator-wandb/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: operator-wandb
description: A Helm chart for deploying W&B to Kubernetes
type: application
version: 0.23.9
version: 0.24.0
appVersion: 1.0.0
icon: https://wandb.ai/logo.svg

Expand Down
11 changes: 11 additions & 0 deletions charts/operator-wandb/templates/_kafka.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,14 @@ Return the number of partitions for run-updates-shadow
{{- define "wandb.kafka.runUpdatesShadowNumPartitions" -}}
{{- print .Values.global.kafka.runUpdatesShadowNumPartitions -}}
{{- end -}}

{{- define "wandb.runUpdateShadowTopicProducer" -}}
{{- if .Values.global.pubSub.enabled -}}
pubsub:/{{ .Values.global.pubSub.project }}/{{ .Values.global.pubSub.runUpdateShadowTopic }}
{{- else if .Values.global.beta.bufstream.enabled -}}
kafka://$(KAFKA_BROKER_HOST):$(KAFKA_BROKER_PORT)/$(KAFKA_TOPIC_RUN_UPDATE_SHADOW_QUEUE)?producer_batch_bytes=1048576&num_partitions=$(KAFKA_RUN_UPDATE_SHADOW_QUEUE_NUM_PARTITIONS)&replication_factor=3
{{- else -}}
kafka://$(KAFKA_CLIENT_USER):$(KAFKA_CLIENT_PASSWORD)@$(KAFKA_BROKER_HOST):$(KAFKA_BROKER_PORT)/$(KAFKA_TOPIC_RUN_UPDATE_SHADOW_QUEUE)?producer_batch_bytes=1048576&num_partitions=$(KAFKA_RUN_UPDATE_SHADOW_QUEUE_NUM_PARTITIONS)&replication_factor=3
{{- end -}}
{{- end -}}

2 changes: 1 addition & 1 deletion charts/operator-wandb/templates/_mysql.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Return the db password
Return the db connection string
*/}}
{{- define "wandb.mysql" -}}
mysql://$(MYSQL_USER):$(MYSQL_PASSWORD)@$(MYSQL_HOST):$(MYSQL_PORT)/$(MYSQL_DATABASE)
mysql://$(MYSQL_USER):$(MYSQL_PASSWORD)@$(MYSQL_HOST):$(MYSQL_PORT)/$(MYSQL_DATABASE)?tls=preferred
{{- end -}}


2 changes: 1 addition & 1 deletion charts/operator-wandb/templates/gorilla.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ data:
GORILLA_ARTIFACT_GC_ENABLED: "false"
GORILLA_RUN_STORE_ONPREM_MIGRATE_SHADOW_RUN_UPDATES: "true"
GORILLA_GLUE_TASK_PROVIDER: "memory://"
GORILLA_DEFAULT_REGION: "{{ default "minio-local" ((include "wandb.bucket" . | fromYaml).region) }}"
GORILLA_DEFAULT_REGION: "minio-local"
{{- if .Values.global.executor.enabled }}
GORILLA_TASK_QUEUE_WORKER_ENABLED: "false"
{{- else }}
Expand Down
32 changes: 31 additions & 1 deletion charts/operator-wandb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -622,8 +622,14 @@ glue:

api:
# install: false
autoscaling:
horizontal:
enabled: true
maxReplicas: 3
minReplicas: 2
service:
enabled: true
loadBalancerHealthCheckPath: "/ready"
type: ClusterIP
ports:
- port: 8081
Expand Down Expand Up @@ -673,6 +679,22 @@ api:
value: '{{ (include "wandb.bucket" . | fromYaml).url }}'
GORILLA_STORAGE_BUCKET:
value: '{{ (include "wandb.bucket" . | fromYaml).url }}'
GORILLA_RUN_UPDATE_SHADOW_QUEUE:
value: >
{
"overflow-bucket": {
"store": {{ (include "wandb.bucket" . | fromYaml).url | quote}},
"name": "wandb",
"prefix": "wandb-overflow"
},
"addr": {{ include "wandb.runUpdateShadowTopicProducer" . | quote }}
}
KAFKA_CLIENT_PASSWORD:
valueFrom:
secretKeyRef:
name: '{{ include "wandb.kafka.passwordSecret" . }}'
key: '{{ include "wandb.kafka.passwordSecret.passwordKey" . }}'
optional: true
GORILLA_PORT:
value: "8081"
AZURE_STORAGE_KEY:
Expand All @@ -687,6 +709,7 @@ api:
"{{ .Release.Name }}-mysql-configmap": "configMapRef"
"{{ .Release.Name }}-redis-secret": "secretRef"
"{{ .Release.Name }}-redis-configmap": "configMapRef"
"{{ .Release.Name }}-kafka-configmap": "configMapRef"
"{{ .Release.Name }}-global-secret": "secretRef"
"{{ .Release.Name }}-gorilla-secret": "secretRef"
"{{ .Release.Name }}-gorilla-configmap": "configMapRef"
Expand Down Expand Up @@ -747,10 +770,17 @@ api:
path: /healthz
port: 8081
initialDelaySeconds: 30
periodSeconds: 1
periodSeconds: 5
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 3
readinessProbe:
httpGet:
path: /ready
port: api
periodSeconds: 5
successThreshold: 1
failureThreshold: 5
resources:
limits:
cpu: "2"
Expand Down
2 changes: 1 addition & 1 deletion charts/wandb-base/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: wandb-base
description: A generic helm chart for deploying services to kubernetes
type: application
version: 0.3.4
version: 0.4.0
icon: https://wandb.ai/logo.svg

maintainers:
Expand Down
26 changes: 22 additions & 4 deletions charts/wandb-base/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
{{- if .Values.service.enabled }}
{{- if .Values.global.createGCPLoadBalancerBackend }}
{{- if eq .Values.global.cloudProvider "gcp" }}
---
apiVersion: cloud.google.com/v1
kind: BackendConfig
metadata:
name: {{ include "wandb-base.fullname" . }}-backend-config
labels:
{{- include "wandb-base.labels" . | nindent 4 }}
spec:
timeoutSec: 120
{{- end }}
{{- end }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ include "wandb-base.fullname" . }}
labels:
{{- include "wandb-base.labels" . | nindent 4 }}
{{- if eq .Values.global.cloudProvider "aws" }}
annotations:
alb.ingress.kubernetes.io/healthcheck-path: /ready
{{- end }}
{{- if and ( eq .Values.global.cloudProvider "aws" ) .Values.service.loadBalancerHealthCheckPath }}
alb.ingress.kubernetes.io/healthcheck-path: {{ .Values.service.loadBalancerHealthCheckPath }}
{{- end }}
{{- if and .Values.global.createGCPLoadBalancerBackend (eq .Values.global.cloudProvider "gcp") }}
cloud.google.com/neg: '{"ingress": true}'
cloud.google.com/backend-config: '{"default": "{{ include "wandb-base.fullname" . }}-backend-config"}'
{{- end }}
spec:
type: {{ .Values.service.type }}
ports:
Expand All @@ -17,4 +35,4 @@ spec:
{{- end }}
selector:
{{- include "wandb-base.selectorLabels" . | nindent 4 }}
{{ end }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/wandb-base/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ cronJobs: {}
# This is for setting up a service more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/
service:
enabled: true
# This path is currently only used for AWS ALB health checks
loadBalancerHealthCheckPath: ""
# This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
type: ClusterIP
ports:
Expand Down

0 comments on commit 6691afe

Please sign in to comment.