-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(backend): Add flat runs field updater (#91)
- Loading branch information
Showing
13 changed files
with
562 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,33 @@ | ||
dependencies: | ||
- name: app | ||
repository: file://charts/app | ||
version: 0.1.0 | ||
- name: console | ||
repository: file://charts/console | ||
version: 0.1.0 | ||
- name: weave | ||
repository: file://charts/weave | ||
version: 0.1.0 | ||
- name: parquet | ||
repository: file://charts/parquet | ||
version: 0.1.0 | ||
- name: mysql | ||
repository: file://charts/mysql | ||
version: 0.1.0 | ||
- name: prometheus | ||
repository: file://charts/prometheus | ||
version: 0.1.0 | ||
- name: redis | ||
repository: https://charts.bitnami.com/bitnami | ||
version: 18.19.4 | ||
- name: kafka | ||
repository: https://charts.bitnami.com/bitnami | ||
version: 25.3.5 | ||
- name: otel | ||
repository: file://charts/otel | ||
version: 0.1.0 | ||
digest: sha256:d6fd61036406090b2be7526adb3114a3343b4463c30ab67a04534ea8ecf6ff36 | ||
generated: "2024-03-20T14:23:36.905681214-04:00" | ||
- name: app | ||
repository: file://charts/app | ||
version: 0.1.0 | ||
- name: console | ||
repository: file://charts/console | ||
version: 0.1.0 | ||
- name: weave | ||
repository: file://charts/weave | ||
version: 0.1.0 | ||
- name: parquet | ||
repository: file://charts/parquet | ||
version: 0.1.0 | ||
- name: mysql | ||
repository: file://charts/mysql | ||
version: 0.1.0 | ||
- name: prometheus | ||
repository: file://charts/prometheus | ||
version: 0.1.0 | ||
- name: redis | ||
repository: https://charts.bitnami.com/bitnami | ||
version: 18.19.4 | ||
- name: kafka | ||
repository: https://charts.bitnami.com/bitnami | ||
version: 25.3.5 | ||
- name: otel | ||
repository: file://charts/otel | ||
version: 0.1.0 | ||
- name: flat-run-fields-updater | ||
repository: file://charts/flat-run-fields-updater | ||
version: 0.1.0 | ||
digest: sha256:72ce111a55d35fac65edc81862f81dd1c0a6ad747aa2a6b2522966f91b27c814 | ||
generated: "2024-03-26T20:48:42.072569696Z" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
charts/operator-wandb/charts/flat-run-fields-updater/.helmignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
13 changes: 13 additions & 0 deletions
13
charts/operator-wandb/charts/flat-run-fields-updater/Chart.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
apiVersion: v2 | ||
name: flat-run-fields-updater | ||
description: Chart for deploying the flat runs field updater | ||
type: application | ||
version: 0.1.0 | ||
appVersion: "0.33.0" | ||
home: https://wandb.ai | ||
icon: https://wandb.ai/logo.svg | ||
maintainers: | ||
- name: wandb | ||
email: support@wandb.com | ||
url: https://wandb.com |
125 changes: 125 additions & 0 deletions
125
charts/operator-wandb/charts/flat-run-fields-updater/templates/_helpers.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "flat-run-fields-updater.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "flat-run-fields-updater.fullname" -}} | ||
{{- if .Values.fullnameOverride }} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- $name := default .Chart.Name .Values.nameOverride }} | ||
{{- if contains $name .Release.Name }} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "flat-run-fields-updater.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "flat-run-fields-updater.labels" -}} | ||
helm.sh/chart: {{ include "flat-run-fields-updater.chart" . }} | ||
{{ include "flat-run-fields-updater.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Returns the extraEnv keys and values to inject into containers. | ||
Global values will override any chart-specific values. | ||
*/}} | ||
{{- define "flat-run-fields-updater.extraEnv" -}} | ||
{{- $allExtraEnv := merge (default (dict) .local.extraEnv) .global.extraEnv -}} | ||
{{- range $key, $value := $allExtraEnv }} | ||
- name: {{ $key }} | ||
value: {{ $value | quote }} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Returns a list of _common_ labels to be shared across all | ||
flat-run-fields-updater deployments and other shared objects. | ||
*/}} | ||
{{- define "flat-run-fields-updater.commonLabels" -}} | ||
{{- $commonLabels := default (dict) .Values.common.labels -}} | ||
{{- if $commonLabels }} | ||
{{- range $key, $value := $commonLabels }} | ||
{{ $key }}: {{ $value | quote }} | ||
{{- end }} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Returns a list of _pod_ labels to be shared across all | ||
flat-run-fields-updater deployments. | ||
*/}} | ||
{{- define "flat-run-fields-updater.podLabels" -}} | ||
{{- range $key, $value := .Values.pod.labels }} | ||
{{ $key }}: {{ $value | quote }} | ||
{{- end }} | ||
{{- end -}} | ||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "flat-run-fields-updater.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "flat-run-fields-updater.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "flat-run-fields-updater.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create }} | ||
{{- default (include "flat-run-fields-updater.fullname" .) .Values.serviceAccount.name }} | ||
{{- else }} | ||
{{- default "default" .Values.serviceAccount.name }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{- define "flat-run-fields-updater.redis" -}} | ||
{{- $cs := include "wandb.redis.connectionString" . }} | ||
{{- $ca := include "wandb.redis.caCert" . }} | ||
{{- if $ca }} | ||
{{- printf "%s?tls=true&caCertPath=/etc/ssl/certs/redis_ca.pem&ttlInSeconds=604800" $cs -}} | ||
{{- else }} | ||
{{- print $cs -}} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{- define "flat-run-fields-updater.bucket" -}} | ||
{{- $bucket := "" -}} | ||
{{- if eq .Values.global.bucket.provider "az" -}} | ||
{{- $bucket = printf "az://%s/%s" .Values.global.bucket.name .Values.global.bucket.path -}} | ||
{{- end -}} | ||
{{- if eq .Values.global.bucket.provider "gcs" -}} | ||
{{- $bucket = printf "gs://%s" .Values.global.bucket.name -}} | ||
{{- end -}} | ||
{{- if eq .Values.global.bucket.provider "s3" -}} | ||
{{- if and .Values.global.bucket.accessKey .Values.global.bucket.secretKey -}} | ||
{{- $bucket = printf "s3://%s:%s@%s/%s" .Values.global.bucket.accessKey .Values.global.bucket.secretKey .Values.global.bucket.name .Values.global.bucket.path -}} | ||
{{- else -}} | ||
{{- $bucket = printf "s3://%s/%s" .Values.global.bucket.name .Values.global.bucket.path -}} | ||
{{- end -}} | ||
{{- end -}} | ||
{{- trimSuffix "/" $bucket -}} | ||
{{- end -}} |
Oops, something went wrong.