From dbe588f2ece44ff619965aec23478e55318981f3 Mon Sep 17 00:00:00 2001 From: Florian Lemaitre Date: Mon, 29 Apr 2024 19:24:20 +0200 Subject: [PATCH 1/3] Optional upload of images for GCP --- infrastructure/quick-deploy/gcp/gar.tf | 8 ++++++-- infrastructure/quick-deploy/gcp/variables.tf | 6 ++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/infrastructure/quick-deploy/gcp/gar.tf b/infrastructure/quick-deploy/gcp/gar.tf index 9c52a7cb3..b258a13ff 100644 --- a/infrastructure/quick-deploy/gcp/gar.tf +++ b/infrastructure/quick-deploy/gcp/gar.tf @@ -65,10 +65,14 @@ locals { docker_images_raw = { for rep in local.docker_repositories : - rep.key => { + rep.key => var.upload_images ? { image = try(module.artifact_registry.docker_repositories["${rep.image}:${rep.tag}"], null), name = try(module.artifact_registry.docker_repositories["${rep.image}:${rep.tag}"], null), tag = rep.tag, + } : { + image = rep.image, + name = rep.image, + tag = rep.tag, } } @@ -96,7 +100,7 @@ module "default_images" { module "artifact_registry" { source = "./generated/infra-modules/container-registry/gcp/artifact-registry" - docker_images = local.repositories + docker_images = var.upload_images ? local.repositories : {} name = "${local.prefix}-docker-registry" description = "All docker images for ArmoniK" kms_key_id = local.kms_key_id diff --git a/infrastructure/quick-deploy/gcp/variables.tf b/infrastructure/quick-deploy/gcp/variables.tf index b70aa7c2c..0ffec170e 100644 --- a/infrastructure/quick-deploy/gcp/variables.tf +++ b/infrastructure/quick-deploy/gcp/variables.tf @@ -179,6 +179,12 @@ variable "armonik_versions" { }) } +variable "upload_images" { + description = "Whether the images are uploaded to the Artifact Registry or not" + type = bool + default = true +} + variable "seq" { description = "Seq configuration (nullable)" type = object({ From b0518eb2f533a078e96f5c71b9a56c5c6f7e5327 Mon Sep 17 00:00:00 2001 From: Florian Lemaitre Date: Tue, 7 May 2024 10:11:51 +0200 Subject: [PATCH 2/3] Optional upload images for AWS --- infrastructure/quick-deploy/aws/ecr.tf | 8 ++++++-- infrastructure/quick-deploy/aws/variables.tf | 6 ++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/infrastructure/quick-deploy/aws/ecr.tf b/infrastructure/quick-deploy/aws/ecr.tf index ee6525b7c..7176a8f05 100644 --- a/infrastructure/quick-deploy/aws/ecr.tf +++ b/infrastructure/quick-deploy/aws/ecr.tf @@ -58,10 +58,14 @@ locals { }] ecr_images_raw = { for rep in local.ecr_repositories : - rep.key => { + rep.key => var.upload_images ? { image = try(module.ecr.repositories[rep.name], null), name = try(module.ecr.repositories[rep.name], null), tag = rep.tag, + } : { + image = rep.image, + name = rep.image, + tag = rep.tag, } } @@ -92,7 +96,7 @@ module "ecr" { source = "./generated/infra-modules/container-registry/aws/ecr" aws_profile = var.profile kms_key_id = local.kms_key - repositories = local.repositories + repositories = var.upload_images ? local.repositories : [] encryption_type = var.ecr.encryption_type tags = local.tags } diff --git a/infrastructure/quick-deploy/aws/variables.tf b/infrastructure/quick-deploy/aws/variables.tf index b9e9cfab6..a6c7e0d23 100644 --- a/infrastructure/quick-deploy/aws/variables.tf +++ b/infrastructure/quick-deploy/aws/variables.tf @@ -715,6 +715,12 @@ variable "authentication" { default = {} } +variable "upload_images" { + description = "Whether the images are uploaded to the Artifact Registry or not" + type = bool + default = true +} + variable "armonik_versions" { description = "Versions of all the ArmoniK components" type = object({ From fdc57b1380933abb0950da7d76ad6689c3e8937d Mon Sep 17 00:00:00 2001 From: Florian Lemaitre Date: Tue, 7 May 2024 10:13:51 +0200 Subject: [PATCH 3/3] Changelog for optional image upload --- CHANGELOG.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee03d801b..bb8480c22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## [main](https://github.com/aneoconsulting/armonik/tree/main) +Added +- + +* Optional upload of images for GCP and AWS + ## [v2.19.4](https://github.com/aneoconsulting/armonik/tree/v2.19.4) (2024-04-26) @@ -15,12 +20,9 @@ Changed Changed - -* Upgrade version of ArmoniK API from `3.16.0` to `3.17.0` [Changelog](https://github.com/aneoconsulting/ArmoniK.Api/r -eleases). -* Upgrade version of ArmoniK Core from `0.23.2` to `0.24.0` [Changelog](https://github.com/aneoconsulting/ArmoniK.Core/r -eleases). -* Upgrade version of ArmoniK Admin Gui from `0.11.6` to `0.11.8` [Changelog](https://github.com/aneoconsulting/ArmoniK.A -dmin.GUI/releases). +* Upgrade version of ArmoniK API from `3.16.0` to `3.17.0` [Changelog](https://github.com/aneoconsulting/ArmoniK.Api/releases). +* Upgrade version of ArmoniK Core from `0.23.2` to `0.24.0` [Changelog](https://github.com/aneoconsulting/ArmoniK.Core/releases). +* Upgrade version of ArmoniK Admin Gui from `0.11.6` to `0.11.8` [Changelog](https://github.com/aneoconsulting/ArmoniK.Admin.GUI/releases). * Upgrade version of ArmoniK Extensions Csharp from `0.14.2` to `0.14.4` [Changelog](https://github.com/aneoconsulting/ArmoniK.Extensions.Csharp/releases). ## [v2.19.2](https://github.com/aneoconsulting/armonik/tree/v2.19.2) (2024-04-05) @@ -28,10 +30,8 @@ dmin.GUI/releases). Changed - -* Upgrade version of ArmoniK Core from `0.23.0` to `0.23.2` [Changelog](https://github.com/aneoconsulting/ArmoniK.Core/r -eleases). -* Upgrade version of ArmoniK Admin Gui from `0.11.4` to `0.11.6` [Changelog](https://github.com/aneoconsulting/ArmoniK.A -dmin.GUI/releases). +* Upgrade version of ArmoniK Core from `0.23.0` to `0.23.2` [Changelog](https://github.com/aneoconsulting/ArmoniK.Core/releases). +* Upgrade version of ArmoniK Admin Gui from `0.11.4` to `0.11.6` [Changelog](https://github.com/aneoconsulting/ArmoniK.Admin.GUI/releases). ## [v2.19.1](https://github.com/aneoconsulting/ArmoniK/tree/v2.19.1) (2024-03-29)