From ea09bcc761dea84fdd4ea4f568f6f92c6931d3d3 Mon Sep 17 00:00:00 2001 From: kaiohenricunha Date: Sat, 20 Jan 2024 19:09:04 -0300 Subject: [PATCH] update workflows [skip ci] --- .github/workflows/destroy-workflow.yaml | 12 +++--------- infra/eks-fargate-karpenter/main.tf | 2 +- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/destroy-workflow.yaml b/.github/workflows/destroy-workflow.yaml index 88a4546..b5cb49b 100644 --- a/.github/workflows/destroy-workflow.yaml +++ b/.github/workflows/destroy-workflow.yaml @@ -13,7 +13,7 @@ on: terraform_components: description: 'Comma-separated list of Terraform components to apply (e.g., vpc,security_group,eks,rds,karpenter)' required: true - default: 'lb,vpc,eks,rds,karpenter' + default: 'lb,vpc,eks,rds,karpenter,stack' jobs: destroy-all: @@ -62,11 +62,12 @@ jobs: cd environments/lab terraform destroy -target=helm_release.aws_load_balancer_controller -auto-approve + # Destroy Karpenter and its dependencies first - name: Terraform Destroy Karpenter if: contains(github.event.inputs.terraform_components, 'karpenter') run: | cd environments/lab - terraform destroy -target=module.eks_fargate_karpenter.module.eks -auto-approve + terraform destroy -target=module.eks_fargate_karpenter.module.karpenter -auto-approve - name: Terraform Destroy RDS if: contains(github.event.inputs.terraform_components, 'rds') @@ -80,13 +81,6 @@ jobs: cd environments/lab terraform destroy -target=module.security_group -auto-approve - # Destroy Karpenter and its dependencies first - - name: Terraform Destroy Karpenter - if: contains(github.event.inputs.terraform_components, 'karpenter') - run: | - cd environments/lab - terraform destroy -target=module.eks_fargate_karpenter.module.karpenter -auto-approve - - name: Terraform Destroy EKS if: contains(github.event.inputs.terraform_components, 'eks') run: | diff --git a/infra/eks-fargate-karpenter/main.tf b/infra/eks-fargate-karpenter/main.tf index 97c3df3..afbc1d3 100644 --- a/infra/eks-fargate-karpenter/main.tf +++ b/infra/eks-fargate-karpenter/main.tf @@ -206,7 +206,7 @@ resource "kubectl_manifest" "karpenter_provisioner" { # Include micro instance sizes - key: karpenter.k8s.aws/instance-size operator: In - values: [micro] + values: [micro, small] providerRef: name: default kubeletConfiguration: