Skip to content

Commit

Permalink
feat(arc): add ops
Browse files Browse the repository at this point in the history
  • Loading branch information
incubator4 committed Sep 2, 2024
1 parent 5e075b7 commit 53f21d5
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions application_set.tf
Original file line number Diff line number Diff line change
Expand Up @@ -110,25 +110,22 @@ resource "argocd_application_set" "actions_runner_controller" {
namespace = "argo"
}
spec {
go_template = true
generator {
list {
elements = [
{
cluster = argocd_cluster.dev.name
url = argocd_cluster.dev.server
},
{
cluster = argocd_cluster.prod.name
url = argocd_cluster.prod.server
clusters {
selector {
match_labels = {
"argocd.argoproj.io/secret-type" = "cluster"
}
]
}
}
}
template {
metadata {
name = "actions-runner-controller-{{cluster}}"
name = "actions-runner-controller-{{.name}}"
labels = {
cluster = "{{cluster}}"
cluster = "{{.name}}"
env = "{{.metadata.labels.env}}"
}
}

Expand All @@ -137,7 +134,7 @@ resource "argocd_application_set" "actions_runner_controller" {
source {
repo_url = var.repo_url
target_revision = "HEAD"
path = "actions-runner-controller/{{cluster}}"
path = "actions-runner-controller/{{.name}}"
plugin {
name = "avp-kustomize"
env {
Expand All @@ -146,7 +143,7 @@ resource "argocd_application_set" "actions_runner_controller" {
}
env {
name = "AVP_SECRET"
value = "guardian:avp-{{cluster}}"
value = "guardian:{{.metadata.labels.secret}}"
}
}
}
Expand All @@ -158,7 +155,7 @@ resource "argocd_application_set" "actions_runner_controller" {
}

destination {
server = "{{url}}"
name = "{{.name}}"
namespace = "guardian"
}

Expand Down

0 comments on commit 53f21d5

Please sign in to comment.