fix
This commit is contained in:
@@ -6,50 +6,26 @@ metadata:
|
|||||||
name: woodpecker
|
name: woodpecker
|
||||||
description: null
|
description: null
|
||||||
options:
|
options:
|
||||||
storage-server:
|
timeouts:
|
||||||
default:
|
default:
|
||||||
accessMode: ReadWriteOnce
|
default: '60'
|
||||||
size: 10Gi
|
max: '120'
|
||||||
examples:
|
examples:
|
||||||
- accessMode: ReadWriteOnce
|
- default: '60'
|
||||||
size: 10Gi
|
max: '120'
|
||||||
properties:
|
properties:
|
||||||
accessMode:
|
default:
|
||||||
default: ReadWriteOnce
|
default: '60'
|
||||||
enum:
|
|
||||||
- ReadWriteOnce
|
|
||||||
- ReadOnlyMany
|
|
||||||
- ReadWriteMany
|
|
||||||
type: string
|
type: string
|
||||||
size:
|
max:
|
||||||
default: 10Gi
|
default: '120'
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
ingress-class:
|
|
||||||
default: traefik
|
|
||||||
examples:
|
|
||||||
- traefik
|
|
||||||
type: string
|
|
||||||
sub-domain:
|
|
||||||
default: ci
|
|
||||||
examples:
|
|
||||||
- ci
|
|
||||||
type: string
|
|
||||||
domain:
|
|
||||||
default: your-company
|
|
||||||
examples:
|
|
||||||
- your-company
|
|
||||||
type: string
|
|
||||||
domain-name:
|
domain-name:
|
||||||
default: your_company.com
|
default: your_company.com
|
||||||
examples:
|
examples:
|
||||||
- your_company.com
|
- your_company.com
|
||||||
type: string
|
type: string
|
||||||
issuer:
|
|
||||||
default: letsencrypt-prod
|
|
||||||
examples:
|
|
||||||
- letsencrypt-prod
|
|
||||||
type: string
|
|
||||||
storage-agent:
|
storage-agent:
|
||||||
default:
|
default:
|
||||||
size: 10Gi
|
size: 10Gi
|
||||||
@@ -70,21 +46,21 @@ options:
|
|||||||
default: 'false'
|
default: 'false'
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
timeouts:
|
domain:
|
||||||
default:
|
default: your-company
|
||||||
default: '60'
|
|
||||||
max: '120'
|
|
||||||
examples:
|
examples:
|
||||||
- default: '60'
|
- your-company
|
||||||
max: '120'
|
type: string
|
||||||
properties:
|
sub-domain:
|
||||||
default:
|
default: ci
|
||||||
default: '60'
|
examples:
|
||||||
type: string
|
- ci
|
||||||
max:
|
type: string
|
||||||
default: '120'
|
ingress-class:
|
||||||
type: string
|
default: traefik
|
||||||
type: object
|
examples:
|
||||||
|
- traefik
|
||||||
|
type: string
|
||||||
images:
|
images:
|
||||||
default:
|
default:
|
||||||
agent:
|
agent:
|
||||||
@@ -182,6 +158,30 @@ options:
|
|||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
type: object
|
type: object
|
||||||
|
issuer:
|
||||||
|
default: letsencrypt-prod
|
||||||
|
examples:
|
||||||
|
- letsencrypt-prod
|
||||||
|
type: string
|
||||||
|
storage-server:
|
||||||
|
default:
|
||||||
|
accessMode: ReadWriteOnce
|
||||||
|
size: 10Gi
|
||||||
|
examples:
|
||||||
|
- accessMode: ReadWriteOnce
|
||||||
|
size: 10Gi
|
||||||
|
properties:
|
||||||
|
accessMode:
|
||||||
|
default: ReadWriteOnce
|
||||||
|
enum:
|
||||||
|
- ReadWriteOnce
|
||||||
|
- ReadOnlyMany
|
||||||
|
- ReadWriteMany
|
||||||
|
type: string
|
||||||
|
size:
|
||||||
|
default: 10Gi
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
dependencies:
|
dependencies:
|
||||||
- dist: null
|
- dist: null
|
||||||
category: apps
|
category: apps
|
||||||
|
|||||||
@@ -1,75 +0,0 @@
|
|||||||
locals {
|
|
||||||
dns-names = ["${var.sub-domain}.${var.domain-name}"]
|
|
||||||
middlewares = ["${var.instance}-https"]
|
|
||||||
service = {
|
|
||||||
"name" = "${var.component}-server"
|
|
||||||
"port" = {
|
|
||||||
"number" = 80
|
|
||||||
}
|
|
||||||
}
|
|
||||||
rules = [ for v in local.dns-names : {
|
|
||||||
"host" = "${v}"
|
|
||||||
"http" = {
|
|
||||||
"paths" = [{
|
|
||||||
"backend" = {
|
|
||||||
"service" = local.service
|
|
||||||
}
|
|
||||||
"path" = "/"
|
|
||||||
"pathType" = "Prefix"
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "kubectl_manifest" "prj_certificate" {
|
|
||||||
yaml_body = <<-EOF
|
|
||||||
apiVersion: "cert-manager.io/v1"
|
|
||||||
kind: "Certificate"
|
|
||||||
metadata:
|
|
||||||
name: "${var.instance}"
|
|
||||||
namespace: "${var.namespace}"
|
|
||||||
labels: ${jsonencode(local.common-labels)}
|
|
||||||
spec:
|
|
||||||
secretName: "${var.instance}-cert"
|
|
||||||
dnsNames: ${jsonencode(local.dns-names)}
|
|
||||||
issuerRef:
|
|
||||||
name: "${var.issuer}"
|
|
||||||
kind: "ClusterIssuer"
|
|
||||||
group: "cert-manager.io"
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "kubectl_manifest" "prj_https_redirect" {
|
|
||||||
yaml_body = <<-EOF
|
|
||||||
apiVersion: "traefik.containo.us/v1alpha1"
|
|
||||||
kind: "Middleware"
|
|
||||||
metadata:
|
|
||||||
name: "${var.instance}-https"
|
|
||||||
namespace: "${var.namespace}"
|
|
||||||
labels: ${jsonencode(local.common-labels)}
|
|
||||||
spec:
|
|
||||||
redirectScheme:
|
|
||||||
scheme: "https"
|
|
||||||
permanent: true
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "kubectl_manifest" "prj_ingress" {
|
|
||||||
force_conflicts = true
|
|
||||||
yaml_body = <<-EOF
|
|
||||||
apiVersion: "networking.k8s.io/v1"
|
|
||||||
kind: "Ingress"
|
|
||||||
metadata:
|
|
||||||
name: "${var.instance}"
|
|
||||||
namespace: "${var.namespace}"
|
|
||||||
labels: ${jsonencode(local.common-labels)}
|
|
||||||
annotations:
|
|
||||||
"traefik.ingress.kubernetes.io/router.middlewares": "${join(",", [for m in local.middlewares : format("%s-%s@kubernetescrd", var.namespace, m)])}"
|
|
||||||
spec:
|
|
||||||
ingressClassName: "${var.ingress-class}"
|
|
||||||
rules: ${jsonencode(local.rules)}
|
|
||||||
tls:
|
|
||||||
- hosts: ${jsonencode(local.dns-names)}
|
|
||||||
secretName: "${var.instance}-cert"
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user