-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allows specific regional location image to be created for GCP (#…
…1184) (#1223) * bug: allows specific regional location image to be created for GCP * fix: revert go releaser changes * ci: update GHA secret for GCP credentials * build: set image storage location for gcp * ci: use GCP infra varaible fro GHA --------- Co-authored-by: Manoj Surudwad <[email protected]>
- Loading branch information
1 parent
30a52f8
commit f0e56a0
Showing
10 changed files
with
52 additions
and
22 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
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
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
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
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
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 |
---|---|---|
|
@@ -80,6 +80,11 @@ variable "project_id" { | |
default = "" | ||
} | ||
|
||
variable "image_storage_locations" { | ||
type = string | ||
default = "" | ||
} | ||
|
||
variable "region" { | ||
type = string | ||
default = "" | ||
|
@@ -238,6 +243,7 @@ locals { | |
ansible_extra_vars = "${var.ansible_extra_vars}" | ||
build_timestamp = local.timestamp | ||
zone = "${var.region}-a" | ||
image_storage_locations = split(",", var.image_storage_locations) | ||
generated_image_name = "konvoy-${var.build_name}-${var.kubernetes_full_version}-${local.build_timestamp}" | ||
# clean_resource_name https://github.com/hashicorp/packer-plugin-googlecompute/blob/81d8d5a740c0d7fb0b02be93133ac17a11557f34/builder/googlecompute/template_funcs.go#L20 | ||
image_name = regex_replace(lower(local.generated_image_name), "[^-a-z0-9]", "-") | ||
|
@@ -267,14 +273,14 @@ source "googlecompute" "kib_image" { | |
image_name = local.image_name | ||
network = var.network | ||
project_id = var.project_id | ||
image_storage_locations = local.image_storage_locations | ||
region = var.region | ||
source_image = var.source_image | ||
source_image_family = var.distribution_family | ||
ssh_key_exchange_algorithms = ["[email protected]", "ecdh-sha2-nistp256", "ecdh-sha2-nistp384", "ecdh-sha2-nistp521", "diffie-hellman-group14-sha1", "diffie-hellman-group1-sha1"] | ||
ssh_username = var.ssh_username | ||
wait_to_add_ssh_keys = "20s" | ||
zone = local.zone | ||
|
||
skip_create_image = var.dry_run | ||
} | ||
|
||
|