fix
This commit is contained in:
@@ -139,6 +139,8 @@ data "kustomization_overlay" "data" {
|
||||
image: "${var.images.server.registry}/${var.images.server.repository}:${var.images.server.tag}"
|
||||
imagePullPolicy: "${var.images.server.pullPolicy}"
|
||||
env:
|
||||
- name: WOODPECKER_HOST
|
||||
value: "https://${var.sub-domain}.${var.domain-name}"
|
||||
- name: WOODPECKER_HOST
|
||||
value: "https://${var.sub-domain}.${var.domain-name}"
|
||||
envFrom:
|
||||
|
||||
@@ -26,11 +26,6 @@ options:
|
||||
default: 'false'
|
||||
type: string
|
||||
type: object
|
||||
ingress-class:
|
||||
default: traefik
|
||||
examples:
|
||||
- traefik
|
||||
type: string
|
||||
timeouts:
|
||||
default:
|
||||
default: '60'
|
||||
@@ -51,21 +46,16 @@ options:
|
||||
examples:
|
||||
- your-company
|
||||
type: string
|
||||
domain-name:
|
||||
default: your_company.com
|
||||
issuer:
|
||||
default: letsencrypt-prod
|
||||
examples:
|
||||
- your_company.com
|
||||
- letsencrypt-prod
|
||||
type: string
|
||||
sub-domain:
|
||||
default: ci
|
||||
examples:
|
||||
- ci
|
||||
type: string
|
||||
issuer:
|
||||
default: letsencrypt-prod
|
||||
examples:
|
||||
- letsencrypt-prod
|
||||
type: string
|
||||
storage-server:
|
||||
default:
|
||||
accessMode: ReadWriteOnce
|
||||
@@ -85,6 +75,16 @@ options:
|
||||
default: 10Gi
|
||||
type: string
|
||||
type: object
|
||||
domain-name:
|
||||
default: your_company.com
|
||||
examples:
|
||||
- your_company.com
|
||||
type: string
|
||||
ingress-class:
|
||||
default: traefik
|
||||
examples:
|
||||
- traefik
|
||||
type: string
|
||||
images:
|
||||
default:
|
||||
agent:
|
||||
@@ -182,12 +182,19 @@ options:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
dependencies: []
|
||||
dependencies:
|
||||
- dist: null
|
||||
category: apps
|
||||
component: gitea
|
||||
- dist: null
|
||||
category: core
|
||||
component: secret-generator
|
||||
providers:
|
||||
kubernetes: true
|
||||
authentik: true
|
||||
kubectl: null
|
||||
authentik: null
|
||||
kubectl: true
|
||||
postgresql: null
|
||||
restapi: null
|
||||
http: null
|
||||
gitea: true
|
||||
tfaddtype: null
|
||||
|
||||
26
apps/woodpecker/presentation.tf
Normal file
26
apps/woodpecker/presentation.tf
Normal file
@@ -0,0 +1,26 @@
|
||||
locals {
|
||||
dns-name = "${var.sub-domain}.${var.domain-name}"
|
||||
dns-names = [local.dns-name]
|
||||
service = {
|
||||
"name" = "${var.component}-server"
|
||||
"port" = {
|
||||
"number" = 80
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module "ingress" {
|
||||
source = "/dist/modules/ingress"
|
||||
component = ""
|
||||
instance = var.instance
|
||||
namespace = var.namespace
|
||||
issuer = var.issuer
|
||||
ingress-class = var.ingress-class
|
||||
labels = local.common-labels
|
||||
dns-names = local.dns-names
|
||||
middlewares = []
|
||||
service = local.service
|
||||
providers = {
|
||||
kubectl = kubectl
|
||||
}
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
|
||||
terraform {
|
||||
required_providers {
|
||||
gitea = {
|
||||
source = "Lerentis/gitea"
|
||||
version = "~> 0.16.0"
|
||||
}
|
||||
kustomization = {
|
||||
source = "kbst/kustomization"
|
||||
version = "~> 0.9.2"
|
||||
}
|
||||
kubernetes = {
|
||||
source = "hashicorp/kubernetes"
|
||||
version = "~> 2.20.0"
|
||||
}
|
||||
kubectl = {
|
||||
source = "gavinbunney/kubectl"
|
||||
version = "~> 1.14.0"
|
||||
}
|
||||
authentik = {
|
||||
source = "goauthentik/authentik"
|
||||
version = "~> 2023.5.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "gitea" {
|
||||
base_url = "http://gitea-http.${var.domain}-ci.svc:3000/"
|
||||
username = data.kubernetes_secret_v1.gitea.data["username"]
|
||||
password = data.kubernetes_secret_v1.gitea.data["password"]
|
||||
}
|
||||
provider "kustomization" {
|
||||
kubeconfig_incluster = true
|
||||
}
|
||||
provider "kubernetes" {
|
||||
host = "https://kubernetes.default.svc"
|
||||
token = "${file("/run/secrets/kubernetes.io/serviceaccount/token")}"
|
||||
cluster_ca_certificate = "${file("/run/secrets/kubernetes.io/serviceaccount/ca.crt")}"
|
||||
}
|
||||
provider "kubectl" {
|
||||
host = "https://kubernetes.default.svc"
|
||||
token = "${file("/run/secrets/kubernetes.io/serviceaccount/token")}"
|
||||
cluster_ca_certificate = "${file("/run/secrets/kubernetes.io/serviceaccount/ca.crt")}"
|
||||
load_config_file = false
|
||||
}
|
||||
provider "authentik" {
|
||||
url = "http://authentik.${var.domain}-auth.svc"
|
||||
token = data.kubernetes_secret_v1.authentik.data["AUTHENTIK_BOOTSTRAP_TOKEN"]
|
||||
}
|
||||
Reference in New Issue
Block a user