diff --git a/NEXT_RELEASE_NOTES.md b/NEXT_RELEASE_NOTES.md index 75ecfc730..e2a6b428f 100644 --- a/NEXT_RELEASE_NOTES.md +++ b/NEXT_RELEASE_NOTES.md @@ -79,6 +79,8 @@ The release notes should contain at least the following sections: * [terraform] New variable `schema_manager_enabled` (default `true`), passed to Helm and Tanka. * [helm] The service name of the Go profiler can now be set with `dss.conf.gcpProfServiceName`. * [terraform] New variable `gcp_prof_service_name` (default empty), passed to Helm and Tanka. +* [helm] The image of the schema manager and evict jobs can now be set with `dss.schemaManager.image` (defaults to `dss.image`). +* [terraform] New variable `schema_manager_image` (defaults to `image`), passed to Helm and Tanka. ## Minimal database schema version diff --git a/deploy/infrastructure/dependencies/terraform-commons-dss/helm.tf b/deploy/infrastructure/dependencies/terraform-commons-dss/helm.tf index 9a2490e1c..a15aeb931 100644 --- a/deploy/infrastructure/dependencies/terraform-commons-dss/helm.tf +++ b/deploy/infrastructure/dependencies/terraform-commons-dss/helm.tf @@ -122,6 +122,7 @@ resource "local_file" "helm_chart_values" { schemaManager = { enabled = var.schema_manager_enabled + image = var.schema_manager_image desiredRidDbVersion = local.rid_db_schema desiredScdDbVersion = local.scd_db_schema desiredAuxDbVersion = local.aux_db_schema diff --git a/deploy/infrastructure/dependencies/terraform-commons-dss/tanka.tf b/deploy/infrastructure/dependencies/terraform-commons-dss/tanka.tf index 72ce488d1..be453f935 100644 --- a/deploy/infrastructure/dependencies/terraform-commons-dss/tanka.tf +++ b/deploy/infrastructure/dependencies/terraform-commons-dss/tanka.tf @@ -59,6 +59,7 @@ resource "local_file" "tanka_config_main" { VAR_DESIRED_SCD_DB_VERSION = local.scd_db_schema VAR_DESIRED_AUX_DB_VERSION = local.aux_db_schema VAR_SCHEMA_MANAGER_ENABLED = var.schema_manager_enabled + VAR_SCHEMA_MANAGER_IMAGE = var.schema_manager_image != "" ? var.schema_manager_image : var.image VAR_SHOULD_INIT = var.should_init VAR_DOCKER_IMAGE_PULL_SECRET = var.image_pull_secret != null ? var.image_pull_secret : "" VAR_CLOUD_PROVIDER = var.kubernetes_cloud_provider_name diff --git a/deploy/infrastructure/dependencies/terraform-commons-dss/templates/main.jsonnet.tmp b/deploy/infrastructure/dependencies/terraform-commons-dss/templates/main.jsonnet.tmp index ae8a43ff8..57556d7b4 100644 --- a/deploy/infrastructure/dependencies/terraform-commons-dss/templates/main.jsonnet.tmp +++ b/deploy/infrastructure/dependencies/terraform-commons-dss/templates/main.jsonnet.tmp @@ -91,7 +91,7 @@ local metadata = metadataBase { }, schema_manager+: { enable: ${VAR_SCHEMA_MANAGER_ENABLED}, - image: '${VAR_DOCKER_IMAGE_NAME}', + image: '${VAR_SCHEMA_MANAGER_IMAGE}', desired_rid_db_version: '${VAR_DESIRED_RID_DB_VERSION}', desired_scd_db_version: '${VAR_DESIRED_SCD_DB_VERSION}', desired_aux_db_version: '${VAR_DESIRED_AUX_DB_VERSION}', diff --git a/deploy/infrastructure/dependencies/terraform-commons-dss/variables.gen.tf b/deploy/infrastructure/dependencies/terraform-commons-dss/variables.gen.tf index adf325779..492cebbc0 100644 --- a/deploy/infrastructure/dependencies/terraform-commons-dss/variables.gen.tf +++ b/deploy/infrastructure/dependencies/terraform-commons-dss/variables.gen.tf @@ -294,6 +294,17 @@ variable "schema_manager_enabled" { } +variable "schema_manager_image" { + type = string + default = "" + description = <<-EOT + Image used by the schema manager and evict jobs. When empty, `image` is used. + + Example: `docker.io/interuss/dss:v0.15.0` + EOT +} + + variable "crdb_image_tag" { type = string description = <<-EOT diff --git a/deploy/infrastructure/modules/terraform-aws-dss/TFVARS.gen.md b/deploy/infrastructure/modules/terraform-aws-dss/TFVARS.gen.md index 6b1fe21cc..633abf773 100644 --- a/deploy/infrastructure/modules/terraform-aws-dss/TFVARS.gen.md +++ b/deploy/infrastructure/modules/terraform-aws-dss/TFVARS.gen.md @@ -463,6 +463,11 @@ Currently, only single node or three nodes deployments are supported.

With Tanka, the schema manager jobs are always deployed when should_init is true.

Example: true


Default value: true + + schema_manager_image (string) +

Image used by the schema manager and evict jobs. When empty, image is used.

+

Example: docker.io/interuss/dss:v0.15.0

+
Default value: "" should_init (bool)

Set to false if joining an existing pool, true if creating the first DSS instance diff --git a/deploy/infrastructure/modules/terraform-aws-dss/main.tf b/deploy/infrastructure/modules/terraform-aws-dss/main.tf index e34e602a0..5ede74662 100644 --- a/deploy/infrastructure/modules/terraform-aws-dss/main.tf +++ b/deploy/infrastructure/modules/terraform-aws-dss/main.tf @@ -53,6 +53,7 @@ module "terraform-commons-dss" { desired_scd_db_version = var.desired_scd_db_version desired_aux_db_version = var.desired_aux_db_version schema_manager_enabled = var.schema_manager_enabled + schema_manager_image = var.schema_manager_image authorization = var.authorization locality = var.locality crdb_external_nodes = var.crdb_external_nodes diff --git a/deploy/infrastructure/modules/terraform-aws-dss/variables.gen.tf b/deploy/infrastructure/modules/terraform-aws-dss/variables.gen.tf index 53e0e6e94..aba87740b 100644 --- a/deploy/infrastructure/modules/terraform-aws-dss/variables.gen.tf +++ b/deploy/infrastructure/modules/terraform-aws-dss/variables.gen.tf @@ -466,6 +466,17 @@ variable "schema_manager_enabled" { } +variable "schema_manager_image" { + type = string + default = "" + description = <<-EOT + Image used by the schema manager and evict jobs. When empty, `image` is used. + + Example: `docker.io/interuss/dss:v0.15.0` + EOT +} + + variable "crdb_image_tag" { type = string description = <<-EOT diff --git a/deploy/infrastructure/modules/terraform-google-dss/TFVARS.gen.md b/deploy/infrastructure/modules/terraform-google-dss/TFVARS.gen.md index e5e0179af..bbada4bcb 100644 --- a/deploy/infrastructure/modules/terraform-google-dss/TFVARS.gen.md +++ b/deploy/infrastructure/modules/terraform-google-dss/TFVARS.gen.md @@ -434,6 +434,11 @@ Currently, only single node or three nodes deployments are supported.

With Tanka, the schema manager jobs are always deployed when should_init is true.

Example: true


Default value: true + + schema_manager_image (string) +

Image used by the schema manager and evict jobs. When empty, image is used.

+

Example: docker.io/interuss/dss:v0.15.0

+
Default value: "" should_init (bool)

Set to false if joining an existing pool, true if creating the first DSS instance diff --git a/deploy/infrastructure/modules/terraform-google-dss/main.tf b/deploy/infrastructure/modules/terraform-google-dss/main.tf index c47245c6a..f4766c088 100644 --- a/deploy/infrastructure/modules/terraform-google-dss/main.tf +++ b/deploy/infrastructure/modules/terraform-google-dss/main.tf @@ -49,6 +49,7 @@ module "terraform-commons-dss" { desired_scd_db_version = var.desired_scd_db_version desired_aux_db_version = var.desired_aux_db_version schema_manager_enabled = var.schema_manager_enabled + schema_manager_image = var.schema_manager_image authorization = var.authorization locality = var.locality image_pull_secret = var.image_pull_secret diff --git a/deploy/infrastructure/modules/terraform-google-dss/variables.gen.tf b/deploy/infrastructure/modules/terraform-google-dss/variables.gen.tf index 4cedc0888..704ddad0e 100644 --- a/deploy/infrastructure/modules/terraform-google-dss/variables.gen.tf +++ b/deploy/infrastructure/modules/terraform-google-dss/variables.gen.tf @@ -410,6 +410,17 @@ variable "schema_manager_enabled" { } +variable "schema_manager_image" { + type = string + default = "" + description = <<-EOT + Image used by the schema manager and evict jobs. When empty, `image` is used. + + Example: `docker.io/interuss/dss:v0.15.0` + EOT +} + + variable "crdb_image_tag" { type = string description = <<-EOT diff --git a/deploy/infrastructure/utils/definitions/schema_manager_image.tf b/deploy/infrastructure/utils/definitions/schema_manager_image.tf new file mode 100644 index 000000000..80611dc51 --- /dev/null +++ b/deploy/infrastructure/utils/definitions/schema_manager_image.tf @@ -0,0 +1,9 @@ +variable "schema_manager_image" { + type = string + default = "" + description = <<-EOT + Image used by the schema manager and evict jobs. When empty, `image` is used. + + Example: `docker.io/interuss/dss:v0.15.0` + EOT +} diff --git a/deploy/infrastructure/utils/variables.py b/deploy/infrastructure/utils/variables.py index 559502938..9eaf2794a 100755 --- a/deploy/infrastructure/utils/variables.py +++ b/deploy/infrastructure/utils/variables.py @@ -50,6 +50,7 @@ "desired_scd_db_version", "desired_aux_db_version", "schema_manager_enabled", + "schema_manager_image", "crdb_image_tag", "crdb_cluster_name", "crdb_cache", diff --git a/deploy/operations/ci/aws-1/variables.gen.tf b/deploy/operations/ci/aws-1/variables.gen.tf index 53e0e6e94..aba87740b 100644 --- a/deploy/operations/ci/aws-1/variables.gen.tf +++ b/deploy/operations/ci/aws-1/variables.gen.tf @@ -466,6 +466,17 @@ variable "schema_manager_enabled" { } +variable "schema_manager_image" { + type = string + default = "" + description = <<-EOT + Image used by the schema manager and evict jobs. When empty, `image` is used. + + Example: `docker.io/interuss/dss:v0.15.0` + EOT +} + + variable "crdb_image_tag" { type = string description = <<-EOT diff --git a/deploy/services/helm-charts/dss/templates/dss-evict.yaml b/deploy/services/helm-charts/dss/templates/dss-evict.yaml index c69c9245b..ceb9579b0 100644 --- a/deploy/services/helm-charts/dss/templates/dss-evict.yaml +++ b/deploy/services/helm-charts/dss/templates/dss-evict.yaml @@ -1,4 +1,4 @@ -{{- $image := .Values.dss.image }} +{{- $image := .Values.dss.schemaManager.image | default .Values.dss.image }} {{- $datastoreImage := (include "datastoreImage" .) -}} {{- $datastoreHost := (include "datastoreHost" .) -}} diff --git a/deploy/services/helm-charts/dss/templates/schema-manager.yaml b/deploy/services/helm-charts/dss/templates/schema-manager.yaml index 70bc8f68d..dec4963dc 100644 --- a/deploy/services/helm-charts/dss/templates/schema-manager.yaml +++ b/deploy/services/helm-charts/dss/templates/schema-manager.yaml @@ -1,4 +1,4 @@ -{{- $image := .Values.dss.image }} +{{- $image := .Values.dss.schemaManager.image | default .Values.dss.image }} {{- $datastoreHost := (include "datastoreHost" .) -}} {{- $datastorePort := (include "datastorePort" .) -}} {{- $datastoreUser := (include "datastoreUser" .) -}} diff --git a/deploy/services/helm-charts/dss/values.schema.json b/deploy/services/helm-charts/dss/values.schema.json index bd192c7b9..a5290fda1 100644 --- a/deploy/services/helm-charts/dss/values.schema.json +++ b/deploy/services/helm-charts/dss/values.schema.json @@ -286,6 +286,10 @@ "type": "boolean", "description": "Deploy the schema manager jobs." }, + "image": { + "type": "string", + "description": "Optional: Image used by the schema manager and evict jobs. Defaults to `dss.image`." + }, "desiredRidDbVersion": { "type": "string", "description": "Desired RID DB schema version. When empty, the latest version for the datastore is used. Example: `4.1.0`"