first commit
This commit is contained in:
43
meta/domain-ci/apps.tf
Normal file
43
meta/domain-ci/apps.tf
Normal file
@@ -0,0 +1,43 @@
|
||||
locals {
|
||||
annotations = {
|
||||
"vynil.solidite.fr/meta" = "domain-ci"
|
||||
"vynil.solidite.fr/name" = var.namespace
|
||||
"vynil.solidite.fr/domain" = var.domain-name
|
||||
"vynil.solidite.fr/issuer" = var.issuer
|
||||
"vynil.solidite.fr/ingress" = var.ingress-class
|
||||
}
|
||||
global = {
|
||||
"domain" = var.namespace
|
||||
"domain-name" = var.domain-name
|
||||
"issuer" = var.issuer
|
||||
"ingress-class" = var.ingress-class
|
||||
}
|
||||
gitea = { for k, v in var.gitea : k => v if k!="enable" }
|
||||
}
|
||||
|
||||
resource "kubernetes_namespace_v1" "ci-ns" {
|
||||
count = ( var.gitea.enable )? 1 : 0
|
||||
metadata {
|
||||
annotations = local.annotations
|
||||
labels = merge(local.common-labels, local.annotations)
|
||||
name = "${var.namespace}-ci"
|
||||
}
|
||||
}
|
||||
|
||||
resource "kubectl_manifest" "gitea" {
|
||||
count = var.gitea.enable ? 1 : 0
|
||||
depends_on = [kubernetes_namespace_v1.ci-ns]
|
||||
yaml_body = <<-EOF
|
||||
apiVersion: "vynil.solidite.fr/v1"
|
||||
kind: "Install"
|
||||
metadata:
|
||||
name: "gitea"
|
||||
namespace: "${var.namespace}-ci"
|
||||
labels: ${jsonencode(local.common-labels)}
|
||||
spec:
|
||||
distrib: "core"
|
||||
category: "apps"
|
||||
component: "gitea"
|
||||
options: ${jsonencode(merge(local.global, local.gitea))}
|
||||
EOF
|
||||
}
|
||||
46
meta/domain-ci/index.yaml
Normal file
46
meta/domain-ci/index.yaml
Normal file
@@ -0,0 +1,46 @@
|
||||
---
|
||||
apiVersion: vinyl.solidite.fr/v1beta1
|
||||
kind: Component
|
||||
category: meta
|
||||
metadata:
|
||||
name: domain-ci
|
||||
description: null
|
||||
options:
|
||||
gitea:
|
||||
default:
|
||||
enable: true
|
||||
examples:
|
||||
- enable: true
|
||||
properties:
|
||||
enable:
|
||||
default: true
|
||||
type: boolean
|
||||
type: object
|
||||
domain-name:
|
||||
default: your_company.com
|
||||
examples:
|
||||
- your_company.com
|
||||
type: string
|
||||
issuer:
|
||||
default: letsencrypt-prod
|
||||
examples:
|
||||
- letsencrypt-prod
|
||||
type: string
|
||||
domain:
|
||||
default: your-company
|
||||
examples:
|
||||
- your-company
|
||||
type: string
|
||||
ingress-class:
|
||||
default: traefik
|
||||
examples:
|
||||
- traefik
|
||||
type: string
|
||||
dependencies: []
|
||||
providers:
|
||||
kubernetes: true
|
||||
authentik: null
|
||||
kubectl: true
|
||||
postgresql: null
|
||||
restapi: null
|
||||
http: null
|
||||
Reference in New Issue
Block a user