ci: make instance type configurable for provider sample (#2893)

* Make default instance type configurable for provider sample
* Set TDX instance type when running TDX provider e2e test
* Fix missing attestation variant when setting up stub config in provider e2e test

---------

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
Daniel Weiße 2024-02-05 15:46:57 +01:00 committed by GitHub
parent f21252c57d
commit 64c32c2236
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 22 additions and 7 deletions

View File

@ -301,6 +301,18 @@ jobs:
EOF
cat _override.tf
- name: Create Azure TDX Terraform overrides
if: inputs.attestationVariant == 'azure-tdx'
working-directory: ${{ github.workspace }}/cluster
shell: bash
run: |
cat >> _override.tf <<EOF
locals {
instance_type = "Standard_DC4es_v5"
}
EOF
cat _override.tf
- name: Copy example Terraform file
working-directory: ${{ github.workspace }}
shell: bash
@ -408,7 +420,7 @@ jobs:
fi
# cfg must be in same dir as KUBECONFIG
${{ github.workspace }}/build/constellation config generate "${{ steps.determine.outputs.cloudProvider }}"
${{ github.workspace }}/build/constellation config generate "${{ steps.determine.outputs.cloudProvider }}" --attestation ${{ inputs.attestationVariant}}
# make cfg valid with fake data
# IMPORTANT: zone needs to be correct because it is used to resolve the CSP image ref
if [[ "${{ steps.determine.outputs.cloudProvider }}" == "azure" ]]; then

View File

@ -22,6 +22,7 @@ locals {
zone = "us-east-2c"
control_plane_count = 3
worker_count = 2
instance_type = "m6a.xlarge"
master_secret = random_bytes.master_secret.hex
master_secret_salt = random_bytes.master_secret_salt.hex
@ -54,7 +55,7 @@ module "aws_infrastructure" {
node_groups = {
control_plane_default = {
role = "control-plane"
instance_type = "m6a.xlarge"
instance_type = local.instance_type
disk_size = 30
disk_type = "gp3"
initial_count = local.control_plane_count
@ -62,7 +63,7 @@ module "aws_infrastructure" {
},
worker_default = {
role = "worker"
instance_type = "m6a.xlarge"
instance_type = local.instance_type
disk_size = 30
disk_type = "gp3"
initial_count = local.worker_count

View File

@ -21,6 +21,7 @@ locals {
location = "northeurope"
control_plane_count = 3
worker_count = 2
instance_type = "Standard_DC4as_v5"
master_secret = random_bytes.master_secret.hex
master_secret_salt = random_bytes.master_secret_salt.hex
@ -55,14 +56,14 @@ module "azure_infrastructure" {
node_groups = {
control_plane_default = {
role = "control-plane"
instance_type = "Standard_DC4as_v5"
instance_type = local.instance_type
disk_size = 30
disk_type = "Premium_LRS"
initial_count = local.control_plane_count
},
worker_default = {
role = "worker"
instance_type = "Standard_DC4as_v5"
instance_type = local.instance_type
disk_size = 30
disk_type = "Premium_LRS"
initial_count = local.worker_count

View File

@ -23,6 +23,7 @@ locals {
project_id = "constellation-331613"
control_plane_count = 3
worker_count = 2
instance_type = "n2d-standard-4"
master_secret = random_bytes.master_secret.hex
master_secret_salt = random_bytes.master_secret_salt.hex
@ -57,7 +58,7 @@ module "gcp_infrastructure" {
node_groups = {
control_plane_default = {
role = "control-plane"
instance_type = "n2d-standard-4"
instance_type = local.instance_type
disk_size = 30
disk_type = "pd-ssd"
initial_count = local.control_plane_count
@ -65,7 +66,7 @@ module "gcp_infrastructure" {
},
worker_default = {
role = "worker"
instance_type = "n2d-standard-4"
instance_type = local.instance_type
disk_size = 30
disk_type = "pd-ssd"
initial_count = local.worker_count