This commit is contained in:
2024-05-31 14:40:46 +02:00
parent eb823b7cd8
commit 0122c47638

View File

@@ -7,6 +7,7 @@ resource "kubectl_manifest" "post_install_job_taiga" {
name: "${var.component}-${trimprefix(var.instance,"org-")}-config-taiga" name: "${var.component}-${trimprefix(var.instance,"org-")}-config-taiga"
namespace: "${var.domain}-ci" namespace: "${var.domain}-ci"
labels: ${jsonencode(local.common_labels)} labels: ${jsonencode(local.common_labels)}
ownerReferences: ${jsonencode(var.install_owner)}
spec: spec:
template: template:
spec: spec:
@@ -38,10 +39,6 @@ resource "kubectl_manifest" "post_install_job_taiga" {
if ! curl -sH "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" "$API/projects"|jq -r '.[].name' |grep -E '^${trimprefix(var.instance,"org-")}$'; then if ! curl -sH "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" "$API/projects"|jq -r '.[].name' |grep -E '^${trimprefix(var.instance,"org-")}$'; then
curl -X POST -sH "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" "http://taiga-taiga.${var.namespace}.svc/api/v1/projects" -d '{ "creation_template": 1, "description": "Organisation ${trimprefix(var.instance,"org-")} project", "is_backlog_activated": true, "is_issues_activated": true, "is_kanban_activated": true, "is_private": true, "is_wiki_activated": true, "name": "${trimprefix(var.instance,"org-")}", }'; curl -X POST -sH "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" "http://taiga-taiga.${var.namespace}.svc/api/v1/projects" -d '{ "creation_template": 1, "description": "Organisation ${trimprefix(var.instance,"org-")} project", "is_backlog_activated": true, "is_issues_activated": true, "is_kanban_activated": true, "is_private": true, "is_wiki_activated": true, "name": "${trimprefix(var.instance,"org-")}", }';
fi fi
env:
- name: garbage
value: >-
${jsonencode(var.install_owner)}
envFrom: envFrom:
- secretRef: - secretRef:
name: taiga-taiga name: taiga-taiga