Skip to content

Commit

Permalink
ref platform/#3152: change kas address to metadata.kas.external_url
Browse files Browse the repository at this point in the history
  • Loading branch information
Stevesibilia committed Oct 21, 2024
1 parent 7e492ae commit 1f503cc
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,7 @@ locals {
}

# Gitlab resources

resource "gitlab_project" "project" {
count = local.use_existing_project == 0 ? 1 : 0
name = var.gitlab_project_name
namespace_id = data.gitlab_group.root_namespace.group_id
}
data "gitlab_metadata" "this" {}

data "gitlab_project" "this" {
count = local.use_existing_project
Expand All @@ -45,6 +40,12 @@ data "gitlab_group" "root_namespace" {
full_path = var.gitlab_root_namespace
}

resource "gitlab_project" "project" {
count = local.use_existing_project == 0 ? 1 : 0
name = var.gitlab_project_name
namespace_id = data.gitlab_group.root_namespace.group_id
}

resource "gitlab_cluster_agent" "this" {
project = local.project_id
name = var.gitlab_agent_name
Expand Down Expand Up @@ -141,7 +142,7 @@ resource "helm_release" "this" {
{
k8s_common_labels = local.k8s_common_labels
agent_replicas = var.agent_replicas
agent_kas_address = var.agent_kas_address
agent_kas_address = data.gitlab_metadata.this.kas.external_url
agent_token_secret_name = kubernetes_secret_v1.gitlab_agent_token_secret.metadata[0].name
# Variables used to configure the default podAntiAffinity for the Gitlab Agent
create_default_pod_anti_affinity = var.create_default_pod_anti_affinity
Expand Down

0 comments on commit 1f503cc

Please sign in to comment.