Skip to content

Commit 944905c

Browse files
committed
update SSO on kargo/argo to make admin use of GH demo team.
1 parent 099f6e7 commit 944905c

2 files changed

Lines changed: 12 additions & 11 deletions

File tree

akuity-bootstrap/main.tf

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,16 @@ resource "akp_instance" "se-demo-iac" {
112112
clientID: ${var.GH_OAUTH_CLIENT_ID}
113113
clientSecret: $dex.github.clientSecret
114114
redirectURI: https://${local.argo_custom_url}/api/dex/callback
115-
#orgs:
116-
#- name: akuity
115+
orgs:
116+
- name: akuity
117117
#preferredEmailDomain: "akuity.io"
118118
EOF
119119
}
120120
argocd_rbac_cm = {
121-
"policy.default" = "role:readonly" #grant GH login read-only access
121+
"policy.default" = <<-EOF
122+
p, role:org-admin, *,*, */*, allow
123+
g, akuity:demo, role:org-admin
124+
EOF
122125
}
123126
# Set password for `admin` user.
124127
argocd_secret = {
@@ -159,8 +162,8 @@ resource "akp_kargo_instance" "kargo-instance" {
159162
clientID: ${var.GH_OAUTH_CLIENT_ID_KARGO}
160163
clientSecret: $GITHUB_CLIENT_SECRET
161164
redirectURI: https://${local.kargo_custom_url}/api/dex/callback
162-
#orgs:
163-
#- name: akuity
165+
orgs:
166+
- name: akuity
164167
#preferredEmailDomain: "akuity.io"
165168
EOF
166169
# this doesnt quite work
@@ -172,8 +175,8 @@ resource "akp_kargo_instance" "kargo-instance" {
172175
}
173176
admin_account = {
174177
claims = {
175-
email = {
176-
values = ["ollitech@gmail.com"]
178+
groups = {
179+
values = ["akuity:demo"]
177180
}
178181
}
179182
}

argocd-bootstrap/main.tf

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ resource "argocd_project" "projects" {
77

88
spec {
99
description = each.value.description
10-
1110
source_repos = ["*"]
12-
13-
1411
dynamic "destination" {
1512
for_each = each.value.destinations
1613
iterator = DESTINATION
@@ -20,7 +17,6 @@ resource "argocd_project" "projects" {
2017
server = "*"
2118
}
2219
}
23-
2420
dynamic "cluster_resource_whitelist" {
2521
for_each = each.value.cluster-allows
2622
iterator = ALLOW
@@ -59,6 +55,8 @@ resource "argocd_application" "app-of-apps" {
5955
}
6056
}
6157

58+
ignoreApplicationDifferences {
59+
jsonPointers = ["/spec/syncPolicy"]
6260
# sync_policy {
6361
# automated {
6462
# prune = true

0 commit comments

Comments
 (0)