diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml index 9ec3c44e..c8cd243c 100644 --- a/.github/workflows/cleanup.yml +++ b/.github/workflows/cleanup.yml @@ -10,6 +10,6 @@ jobs: with: command: "destroy" branch: ${{ github.event.pull_request.head.ref }} - workspace: "spectrum-${{ github.event.pull_request.head.ref }}" + workspace: "spectrum-${{ github.event.pull_request.number }}" secrets: PAT: ${{ secrets.FLUENCEBOT_RELEASE_PLEASE_PAT }} diff --git a/.github/workflows/create.yml b/.github/workflows/create.yml index ce7e8e24..ba81f37b 100644 --- a/.github/workflows/create.yml +++ b/.github/workflows/create.yml @@ -16,7 +16,7 @@ jobs: uses: ./.github/workflows/terraform.yml with: command: create - workspace: "spectrum-${{ github.head_ref }}" + workspace: "spectrum-${{ github.event.number }}" branch: ${{ github.event.pull_request.head.ref }} secrets: PAT: ${{ secrets.FLUENCEBOT_RELEASE_PLEASE_PAT }} diff --git a/.github/workflows/terraform.yml b/.github/workflows/terraform.yml index 05f8a7c3..54e25a16 100644 --- a/.github/workflows/terraform.yml +++ b/.github/workflows/terraform.yml @@ -139,7 +139,7 @@ jobs: ## ephemeral: ${{ steps.sanitize.outputs.workspace }} Your ephemeral k8s cluster is ready. - Visit the dashboard at https://home.rnd-${{ steps.sanitize.outputs.workspace }}.fluence.dev + Visit the dashboard at https://home.${{ steps.sanitize.outputs.workspace }}.fluence.dev You can obtain kubeconfig and talos config from this [artifact](${{ steps.artifact.outputs.artifact-url }}). Download and unarchive the artifact, then run this command to export variables: diff --git a/terraform/controlplane.tf b/terraform/controlplane.tf index 718d7401..af409f8e 100644 --- a/terraform/controlplane.tf +++ b/terraform/controlplane.tf @@ -5,7 +5,7 @@ locals { } resource "digitalocean_loadbalancer" "cp" { - name = "${local.prefix}-controlplane" + name = "rnd-${local.prefix}-controlplane" region = "fra1" vpc_uuid = data.digitalocean_vpc.spectrum.id @@ -92,7 +92,7 @@ data "talos_client_configuration" "this" { resource "digitalocean_droplet" "cp" { for_each = { for index, name in local.cp : name => index } - name = "${local.prefix}-spectrum-${each.key}" + name = "rnd-${local.prefix}-spectrum-${each.key}" size = "s-4vcpu-8gb" image = data.digitalocean_image.talos.id region = "fra1" @@ -122,6 +122,9 @@ resource "talos_machine_bootstrap" "this" { client_configuration = talos_machine_secrets.this.client_configuration endpoint = digitalocean_droplet.cp["cp-0"].ipv4_address node = digitalocean_droplet.cp["cp-0"].ipv4_address + timeouts = { + create = "3m" + } lifecycle { replace_triggered_by = [ @@ -133,6 +136,9 @@ resource "talos_machine_bootstrap" "this" { resource "talos_cluster_kubeconfig" "this" { client_configuration = talos_machine_secrets.this.client_configuration node = digitalocean_droplet.cp["cp-0"].ipv4_address + timeouts = { + create = "3m" + } } # data "talos_cluster_health" "health" { diff --git a/terraform/main.tf b/terraform/main.tf index 903e0d57..de6f502e 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -1,5 +1,5 @@ locals { - prefix = "rnd-${terraform.workspace}" + prefix = terraform.workspace loadbalancer_dns = "kube.${local.prefix}.fluence.dev" docker_config_json = jsonencode({