Skip to content

Commit df28a17

Browse files
deploymentPostfix
1 parent 5b3a404 commit df28a17

File tree

7 files changed

+12
-51
lines changed

7 files changed

+12
-51
lines changed

charts/operator-wandb/Chart.lock

+2-5
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,5 @@ dependencies:
6565
- name: reloader
6666
repository: https://stakater.github.io/stakater-charts
6767
version: 1.3.0
68-
- name: wandb-base
69-
repository: file://../wandb-base
70-
version: 0.7.0
71-
digest: sha256:4a59302a50e80bf06546000758fc196363ce359791c1fc244d0137ebcc539e7b
72-
generated: "2025-03-24T21:26:47.808099-05:00"
68+
digest: sha256:531e95bb8d542edb00f96967942f215436909cffb1c29a359b287f180ac0a28e
69+
generated: "2025-03-29T13:46:42.531649-05:00"

charts/operator-wandb/Chart.yaml

-5
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,3 @@ dependencies:
104104
condition: reloader.install
105105
version: 1.3.0
106106
repository: https://stakater.github.io/stakater-charts
107-
- name: wandb-base
108-
alias: pre-hook
109-
condition: pre-hook.install
110-
version: "*.*.*"
111-
repository: file://../wandb-base

charts/operator-wandb/templates/_kafka.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ pubsub:/{{ .Values.global.pubSub.project }}/{{ .Values.global.pubSub.runUpdateSh
110110
{{- else if .Values.global.beta.bufstream.enabled -}}
111111
kafka://$(KAFKA_BROKER_HOST):9092/$(KAFKA_TOPIC_RUN_UPDATE_SHADOW_QUEUE)?consumer_group_id=default-group&num_partitions=$(KAFKA_RUN_UPDATE_SHADOW_QUEUE_NUM_PARTITIONS)&replication_factor=3
112112
{{- else -}}
113-
kafka://$(KAFKA_CLIENT_USER):$(KAFKA_CLIENT_PASSWORD)@$(KAFKA_BROKER_HOST):9092/$(KAFKA_TOPIC_RUN_UPDATE_SHADOW_QUEUE)?consumer_group_id=default-group&num_partitions=$(KAFKA_RUN_UPDATE_SHADOW_QUEUE_NUM_PARTITIONS)&replication_factor=3
113+
kafka://$(KAFKA_CLIENT_USER):$(A_KAFKA_CLIENT_PASSWORD)@$(KAFKA_BROKER_HOST):9092/$(KAFKA_TOPIC_RUN_UPDATE_SHADOW_QUEUE)?consumer_group_id=default-group&num_partitions=$(KAFKA_RUN_UPDATE_SHADOW_QUEUE_NUM_PARTITIONS)&replication_factor=3
114114
{{- end -}}
115115
{{- end -}}
116116

charts/operator-wandb/values.yaml

+1-39
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ console:
316316

317317
flat-run-fields-updater:
318318
install: true
319+
deploymentPostfix: "bc"
319320
service:
320321
enabled: false
321322
autoscaling:
@@ -1018,42 +1019,3 @@ reloader:
10181019
reloadOnDelete: true
10191020
serviceAccount:
10201021
create: false
1021-
1022-
pre-hook:
1023-
install: true
1024-
service:
1025-
enabled: false
1026-
role:
1027-
create: true
1028-
rules:
1029-
- apiGroups:
1030-
- "apps"
1031-
resources:
1032-
- deployments
1033-
verbs:
1034-
- get
1035-
- list
1036-
- delete
1037-
kind: Job
1038-
jobs:
1039-
pre-hook:
1040-
annotations:
1041-
"helm.sh/hook": pre-install,pre-upgrade
1042-
"helm.sh/hook-delete-policy": hook-succeeded
1043-
containers:
1044-
pre-hook:
1045-
image:
1046-
repository: bitnami/kubectl
1047-
tag: latest
1048-
command:
1049-
- bash
1050-
- -c
1051-
- |
1052-
OLD_VERSION=$(kubectl get deployment wandb-flat-run-fields-updater -o jsonpath="{.metadata.labels.app\.kubernetes\.io/version}" 2>/dev/null || echo "none")
1053-
if [ "$OLD_VERSION" = "0.33.0" ]; then
1054-
echo "Old deployment found with version $OLD_VERSION. Deleting..."
1055-
kubectl delete deployment wandb-flat-run-fields-updater --ignore-not-found
1056-
else
1057-
echo "Old deployment not found or already updated. Skipping deletion."
1058-
fi
1059-
restartPolicy: Never

charts/wandb-base/templates/_helpers.tpl

+6
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ If release name contains chart name it will be used as a full name.
2323
{{- end }}
2424
{{- end }}
2525

26+
{{- define "wandb-base.deploymentPostfix" -}}
27+
{{- if not (eq .Values.deploymentPostfix "") -}}
28+
{{- printf "-%s" .Values.deploymentPostfix -}}
29+
{{- end -}}
30+
{{- end -}}
31+
2632
{{/*
2733
Create chart name and version as used by the chart label.
2834
*/}}

charts/wandb-base/templates/deployment.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: apps/v1
33
kind: Deployment
44
metadata:
5-
name: {{ include "wandb-base.fullname" . }}
5+
name: {{ include "wandb-base.fullname" . }}{{ include "wandb-base.deploymentPostfix" . }}
66
labels:
77
{{- include "wandb-base.labels" . | nindent 4 }}
88
{{- if .Values.addReloaderAnnotations }}

charts/wandb-base/values.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ image:
1919
imagePullSecrets: []
2020
nameOverride: ""
2121
fullnameOverride: ""
22+
deploymentPostfix: ""
2223

2324
env: {}
2425
envFrom: {}

0 commit comments

Comments
 (0)