This commit is contained in:
2024-05-31 14:24:52 +02:00
parent c0bb30d4d1
commit c3e72da58d
2 changed files with 6 additions and 4 deletions

View File

@@ -74,9 +74,9 @@ options:
type: string type: string
type: object type: object
domain: domain:
default: media default: your-company
examples: examples:
- media - your-company
type: string type: string
domain_name: domain_name:
default: your_company.com default: your_company.com

View File

@@ -4,10 +4,9 @@ resource "kubectl_manifest" "post_install_job_taiga" {
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
metadata: metadata:
name: "${var.instance}-${var.component}-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:
@@ -41,6 +40,9 @@ resource "kubectl_manifest" "post_install_job_taiga" {
if ! curl $JSON $BEAR "$API/projects"|jq -r '.[].name' |grep -E '^${trimprefix(var.instance,"org-")}$'; then if ! curl $JSON $BEAR "$API/projects"|jq -r '.[].name' |grep -E '^${trimprefix(var.instance,"org-")}$'; then
curl -X POST $JSON $BEAR "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 $JSON $BEAR "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