diff --git a/apps/woodpecker/index.yaml b/apps/woodpecker/index.yaml index 2cb02db..1c223f6 100644 --- a/apps/woodpecker/index.yaml +++ b/apps/woodpecker/index.yaml @@ -6,50 +6,26 @@ metadata: name: woodpecker description: null options: - storage-server: + timeouts: default: - accessMode: ReadWriteOnce - size: 10Gi + default: '60' + max: '120' examples: - - accessMode: ReadWriteOnce - size: 10Gi + - default: '60' + max: '120' properties: - accessMode: - default: ReadWriteOnce - enum: - - ReadWriteOnce - - ReadOnlyMany - - ReadWriteMany + default: + default: '60' type: string - size: - default: 10Gi + max: + default: '120' type: string 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: default: your_company.com examples: - your_company.com type: string - issuer: - default: letsencrypt-prod - examples: - - letsencrypt-prod - type: string storage-agent: default: size: 10Gi @@ -70,21 +46,21 @@ options: default: 'false' type: string type: object - timeouts: - default: - default: '60' - max: '120' + domain: + default: your-company examples: - - default: '60' - max: '120' - properties: - default: - default: '60' - type: string - max: - default: '120' - type: string - type: object + - your-company + type: string + sub-domain: + default: ci + examples: + - ci + type: string + ingress-class: + default: traefik + examples: + - traefik + type: string images: default: agent: @@ -182,6 +158,30 @@ options: type: string 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: - dist: null category: apps diff --git a/apps/woodpecker/ingress.tf b/apps/woodpecker/ingress.tf deleted file mode 100644 index 0ae29d6..0000000 --- a/apps/woodpecker/ingress.tf +++ /dev/null @@ -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 -}