Skip to content

Commit

Permalink
reinstate terraform variables with an image default
Browse files Browse the repository at this point in the history
  • Loading branch information
HarshCasper committed Mar 1, 2022
1 parent e1adba0 commit 06b8108
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 3 deletions.
13 changes: 13 additions & 0 deletions qhub/template/stages/07-kubernetes-services/conda-store.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@ variable "conda-store-storage" {
type = string
}

variable "conda-store-image" {
description = "Conda-store image"
type = object({
name = string
tag = string
})
default = {
name = "quansight/conda-store-server"
tag = "v0.3.10"
}
}

# ====================== RESOURCES =======================
module "kubernetes-conda-store-server" {
source = "./modules/kubernetes/services/conda-store"
Expand All @@ -21,6 +33,7 @@ module "kubernetes-conda-store-server" {

nfs_capacity = var.conda-store-storage
node-group = var.node_groups.general
conda-store-image = var.conda-store-image
environments = {
for filename, environment in var.conda-store-environments:
filename => yamlencode(environment)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ resource "kubernetes_deployment" "server" {

container {
name = "conda-store-server"
image = "quansight/conda-store-server:v0.3.10"
image = "${var.conda-store-image.name}:${var.conda-store-image.tag}"

args = [
"conda-store-server",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ variable "node-group" {
})
}

variable "conda-store-image" {
description = "Conda-store image"
type = object({
name = string
tag = string
})
}

variable "external-url" {
description = "External url that jupyterhub cluster is accessible"
type = string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ resource "kubernetes_deployment" "worker" {

container {
name = "conda-store-worker"
image = "quansight/conda-store-server:v0.3.10"
image = "${var.conda-store-image.name}:${var.conda-store-image.tag}"

args = [
"conda-store-worker",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ variable "dashboards" {
]
}


variable "node-group" {
description = "Node key value pair for bound resources"
type = object({
Expand Down

0 comments on commit 06b8108

Please sign in to comment.