This commit is contained in:
2023-10-29 09:07:40 +01:00
parent 47a6fc61fa
commit ff690d420a
5 changed files with 67 additions and 35 deletions

View File

@@ -138,6 +138,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_ADMIN
value: "${var.admin-users}"
- name: WOODPECKER_HOST
value: "https://${var.sub-domain}.${var.domain-name}"
- name: WOODPECKER_HOST

View File

@@ -6,15 +6,15 @@ metadata:
name: woodpecker
description: null
options:
domain-name:
default: your_company.com
issuer:
default: letsencrypt-prod
examples:
- your_company.com
- letsencrypt-prod
type: string
domain:
default: your-company
sub-domain:
default: ci
examples:
- your-company
- ci
type: string
storage-agent:
default:
@@ -36,6 +36,31 @@ options:
default: 'false'
type: string
type: object
app-group:
default: dev
examples:
- dev
type: string
admin-users:
default: woodpecker,admin
examples:
- woodpecker,admin
type: string
domain:
default: your-company
examples:
- your-company
type: string
ingress-class:
default: traefik
examples:
- traefik
type: string
domain-name:
default: your_company.com
examples:
- your_company.com
type: string
storage-server:
default:
accessMode: ReadWriteOnce
@@ -55,11 +80,21 @@ options:
default: 10Gi
type: string
type: object
issuer:
default: letsencrypt-prod
timeouts:
default:
default: '60'
max: '120'
examples:
- letsencrypt-prod
type: string
- default: '60'
max: '120'
properties:
default:
default: '60'
type: string
max:
default: '120'
type: string
type: object
images:
default:
agent:
@@ -157,31 +192,6 @@ options:
type: string
type: object
type: object
sub-domain:
default: ci
examples:
- ci
type: string
timeouts:
default:
default: '60'
max: '120'
examples:
- default: '60'
max: '120'
properties:
default:
default: '60'
type: string
max:
default: '120'
type: string
type: object
ingress-class:
default: traefik
examples:
- traefik
type: string
dependencies:
- dist: null
category: apps

View File

@@ -1,6 +1,7 @@
locals {
dns-name = "${var.sub-domain}.${var.domain-name}"
dns-names = [local.dns-name]
icon = "/favicons/favicon-light-default.svg"
service = {
"name" = "${var.component}-server"
"port" = {
@@ -24,3 +25,15 @@ module "ingress" {
kubectl = kubectl
}
}
module "application" {
source = "/dist/modules/application"
component = var.component
instance = var.instance
app-group = var.app-group
dns-name = local.dns-name
icon = local.icon
providers = {
authentik = authentik
}
}

View File

@@ -21,6 +21,7 @@ resource "authentik_application" "prj_app" {
slug = "${var.component}-${var.instance}"
group = var.app-group
protocol_provider = var.protocol_provider
backchannel_providers = var.backchannel_providers
meta_launch_url = format("https://%s", var.dns-name)
meta_icon = format("https://%s/%s", var.dns-name, var.icon)
}

View File

@@ -12,6 +12,7 @@ variable "app-group" {
}
variable "protocol_provider" {
type = number
default = null
}
variable "dns-name" {
type = string
@@ -20,3 +21,8 @@ variable "sub-groups" {
type = list(string)
default = []
}
variable "backchannel_providers" {
type = list(number)
default = null
}