From c366bd15214748592d5bcef69df5732c155a74c5 Mon Sep 17 00:00:00 2001 From: Sarhad Date: Mon, 18 Nov 2024 19:27:34 +0400 Subject: [PATCH] fix(DMVP-5941): fix braces for variables file --- modules/runner/README.md | 1 - modules/runner/deployment.tf | 124 ----------------------------------- 2 files changed, 125 deletions(-) delete mode 100644 modules/runner/deployment.tf diff --git a/modules/runner/README.md b/modules/runner/README.md index 07a10f2..1a5b56f 100644 --- a/modules/runner/README.md +++ b/modules/runner/README.md @@ -22,7 +22,6 @@ No modules. | Name | Type | |------|------| | [kubernetes_cron_job_v1.runner_cronjob](https://registry.terraform.io/providers/hashicorp/kubernetes/2.23.0/docs/resources/cron_job_v1) | resource | -| [kubernetes_deployment.runner](https://registry.terraform.io/providers/hashicorp/kubernetes/2.23.0/docs/resources/deployment) | resource | | [kubernetes_namespace_v1.runner](https://registry.terraform.io/providers/hashicorp/kubernetes/2.23.0/docs/resources/namespace_v1) | resource | | [kubernetes_secret.runner](https://registry.terraform.io/providers/hashicorp/kubernetes/2.23.0/docs/resources/secret) | resource | diff --git a/modules/runner/deployment.tf b/modules/runner/deployment.tf deleted file mode 100644 index 764b37b..0000000 --- a/modules/runner/deployment.tf +++ /dev/null @@ -1,124 +0,0 @@ - -resource "kubernetes_deployment" "runner" { - metadata { - name = "runner" - namespace = var.namespace - } - spec { - replicas = var.replica_count - - selector { - match_labels = { - accountUuid = var.accountUuid - runnerUuid = var.runnerUuid - } - } - - - template { - metadata { - labels = { - accountUuid = var.accountUuid - runnerUuid = var.runnerUuid - } - } - - spec { - container { - name = "bitbucket-k8s-runner" - image = "docker-public.packages.atlassian.com/sox/atlassian/bitbucket-pipelines-runner" - - env { - name = "ACCOUNT_UUID" - value = "{${var.accountUuid}}" - } - - env { - name = "RUNNER_UUID" - value = "{${var.runnerUuid}}" - } - - env { - name = "OAUTH_CLIENT_ID" - value_from { - secret_key_ref { - name = "runner-oauth-credentials" - key = "oauthClientId" - } - } - } - - env { - name = "OAUTH_CLIENT_SECRET" - value_from { - secret_key_ref { - name = "runner-oauth-credentials" - key = "oauthClientSecret" - } - } - } - - env { - name = "WORKING_DIRECTORY" - value = "/tmp" - } - - volume_mount { - name = "tmp" - mount_path = "/tmp" - } - - volume_mount { - name = "docker-containers" - mount_path = "/var/lib/docker/containers" - read_only = true - } - - volume_mount { - name = "var-run" - mount_path = "/var/run" - } - } - - container { - name = "docker-in-docker" - image = "docker:20.10.7-dind" - security_context { - privileged = true - } - - volume_mount { - name = "tmp" - mount_path = "/tmp" - } - - volume_mount { - name = "docker-containers" - mount_path = "/var/lib/docker/containers" - } - - volume_mount { - name = "var-run" - mount_path = "/var/run" - } - } - restart_policy = "Always" - volume { - name = "tmp" - } - - volume { - name = "docker-containers" - } - - volume { - name = "var-run" - } - } - } - } - - depends_on = [ - kubernetes_secret.runner - ] -}