-
Notifications
You must be signed in to change notification settings - Fork 21
fix: Expose wandb container images #364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
b3f6bc7
d0102a8
2364f32
cb318b0
069818a
547fc3f
61110ff
3258f55
baf9f84
8a3ef41
7f78cbc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -32,6 +32,12 @@ variable "operator_chart_version" { | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| default = "1.4.2" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| variable "controller_image_repository" { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type = string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description = "wandb/controller image repository" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default = "wandb/controller" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| variable "controller_image_tag" { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type = string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description = "Tag of the controller image to deploy" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -657,3 +663,94 @@ variable "cluster_autoscaler_image_tag" { | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| description = "The tag of the cluster-autoscaler to deploy." | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default = null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| variable "wandb_local_image_repository" { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type = string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description = "wandb/local image repository" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default = "wandb/local" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| variable "wandb_local_image_tag" { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type = string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description = "wandb/local image tag" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default = null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+667
to
+677
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Null tags may serialize as tag: null; guard to omit keys when unset. Using default = null for wandb_local_image_tag is convenient, but if the downstream module renders YAML directly, it can result in tag: null instead of omitting the key, which some charts don’t tolerate. Consider conditioning tag emission (see main.tf comments for a merge() pattern). Also, ensure repository values that already include a tag (repo:tag) are not combined with tag again. Apply this optional validation to prevent “repo already includes tag” when tag is set: variable "wandb_local_image_repository" {
type = string
description = "wandb/local image repository"
default = "wandb/local"
}
variable "wandb_local_image_tag" {
type = string
description = "wandb/local image tag"
default = null
+ validation {
+ condition = var.wandb_local_image_tag == null || !can(regex(":[^/]+$", var.wandb_local_image_repository))
+ error_message = "Do not include a tag in wandb_local_image_repository when wandb_local_image_tag is set."
+ }
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| variable "wandb_console_image_repository" { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type = string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description = "wandb/console image repository" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default = "wandb/console" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| variable "wandb_console_image_tag" { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type = string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description = "wandb/console image tag" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default = null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| variable "wandb_megabinary_image_repository" { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type = string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description = "wandb/megabinary image repository" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default = "wandb/megabinary" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| variable "wandb_megabinary_image_tag" { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type = string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description = "wandb/megabinary image tag" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default = null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| variable "wandb_operator_chart_repository" { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type = string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description = "wandb/operator chart repository" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default = "https://charts.wandb.ai" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| variable "wandb_operator_chart_version" { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type = string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description = "wandb/operator chart version" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default = null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| variable "wandb_operator_chart_name" { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type = string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description = "wandb/operator chart name" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default = "operator-wandb" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| variable "wandb_weave_python_image_repository" { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type = string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description = "wandb/weave-python image repository" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default = "wandb/weave-python" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| variable "wandb_weave_python_image_tag" { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type = string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description = "wandb/weave-python image tag" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default = null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| variable "helm_hooks_image_repository" { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type = string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description = "Helm Chart pre and post hook's image" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default = "alpine/k8s" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| variable "helm_hook_image_tag" { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type = string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description = "Helm Chart pre and post hook's image tag" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default = null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| variable "enable_wandb_prometheus" { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type = bool | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description = "Enable or disable deploying prometheus resources" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default = null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| variable "enable_wandb_otel" { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type = bool | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description = "Enable or disable deploying otel resources" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default = null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Console image: same conditional-tag pattern applies.
See prior comment; use merge() to avoid serializing null tags.
🤖 Prompt for AI Agents