This commit is contained in:
2024-01-19 16:53:25 +01:00
parent 88a73e2a2d
commit e147cf9296
4 changed files with 307 additions and 276 deletions

View File

@@ -170,7 +170,7 @@ resource "kubectl_manifest" "okd" {
}
resource "kubectl_manifest" "gramo" {
count = var.apps.okd.enable ? 1 : 0
count = var.apps.gramo.enable ? 1 : 0
depends_on = [kubernetes_namespace_v1.apps-ns]
yaml_body = <<-EOF
apiVersion: "vynil.solidite.fr/v1"

View File

@@ -6,11 +6,230 @@ metadata:
name: domain-devspaces
description: null
options:
storage-classes:
default:
BlockReadWriteMany: ''
BlockReadWriteOnce: ''
FilesystemReadWriteMany: ''
FilesystemReadWriteOnce: ''
examples:
- BlockReadWriteMany: ''
BlockReadWriteOnce: ''
FilesystemReadWriteMany: ''
FilesystemReadWriteOnce: ''
properties:
BlockReadWriteMany:
default: ''
type: string
BlockReadWriteOnce:
default: ''
type: string
FilesystemReadWriteMany:
default: ''
type: string
FilesystemReadWriteOnce:
default: ''
type: string
type: object
images:
default:
codeserver:
pullPolicy: IfNotPresent
registry: docker.io
repository: sebt3/code-server
tag: 4.18
examples:
- codeserver:
pullPolicy: IfNotPresent
registry: docker.io
repository: sebt3/code-server
tag: 4.18
properties:
codeserver:
default:
pullPolicy: IfNotPresent
registry: docker.io
repository: sebt3/code-server
tag: 4.18
properties:
pullPolicy:
default: IfNotPresent
enum:
- Always
- Never
- IfNotPresent
type: string
registry:
default: docker.io
type: string
repository:
default: sebt3/code-server
type: string
tag:
default: 4.18
type: number
type: object
type: object
app-group:
default: dev
examples:
- dev
type: string
external-mongos:
default: []
examples:
- []
items:
properties:
dbname:
default: ''
type: string
name:
default: ''
type: string
namespace:
default: ''
type: string
secret:
properties:
key:
default: ''
type: string
name:
default: ''
type: string
type: object
username:
default: ''
type: string
type: object
type: array
stations-sub-domain:
default: code
examples:
- code
type: string
issuer:
default: letsencrypt-prod
examples:
- letsencrypt-prod
type: string
distributions:
default:
core: core
domain: domain
examples:
- core: core
domain: domain
properties:
core:
default: core
type: string
domain:
default: domain
type: string
type: object
domain-name:
default: your_company.com
examples:
- your_company.com
type: string
stations:
default: []
examples:
- []
items:
properties:
name:
default: ''
type: string
organisations:
default: []
items:
type: string
type: array
type: object
type: array
external-marias:
default: []
examples:
- []
items:
properties:
name:
default: ''
type: string
namespace:
default: ''
type: string
secret:
properties:
key:
default: ''
type: string
name:
default: ''
type: string
type: object
username:
default: ''
type: string
type: object
type: array
haveGitea:
default: false
examples:
- false
type: boolean
external-redis:
default: []
examples:
- []
items:
properties:
name:
default: ''
type: string
namespace:
default: ''
type: string
type: object
type: array
backups:
default:
enable: false
endpoint: ''
key-id-key: s3-id
secret-key: s3-secret
secret-name: backup-settings
examples:
- enable: false
endpoint: ''
key-id-key: s3-id
secret-key: s3-secret
secret-name: backup-settings
properties:
enable:
default: false
type: boolean
endpoint:
default: ''
type: string
key-id-key:
default: s3-id
type: string
secret-key:
default: s3-secret
type: string
secret-name:
default: backup-settings
type: string
type: object
ingress-class:
default: traefik
examples:
- traefik
type: string
organisations:
default: []
examples:
@@ -52,81 +271,6 @@ options:
type: array
type: object
type: array
external-marias:
default: []
examples:
- []
items:
properties:
name:
default: ''
type: string
namespace:
default: ''
type: string
secret:
properties:
key:
default: ''
type: string
name:
default: ''
type: string
type: object
username:
default: ''
type: string
type: object
type: array
haveGitea:
default: false
examples:
- false
type: boolean
app-group:
default: dev
examples:
- dev
type: string
images:
default:
codeserver:
pullPolicy: IfNotPresent
registry: docker.io
repository: sebt3/code-server
tag: 4.18
examples:
- codeserver:
pullPolicy: IfNotPresent
registry: docker.io
repository: sebt3/code-server
tag: 4.18
properties:
codeserver:
default:
pullPolicy: IfNotPresent
registry: docker.io
repository: sebt3/code-server
tag: 4.18
properties:
pullPolicy:
default: IfNotPresent
enum:
- Always
- Never
- IfNotPresent
type: string
registry:
default: docker.io
type: string
repository:
default: sebt3/code-server
type: string
tag:
default: 4.18
type: number
type: object
type: object
apps:
default:
dbgate:
@@ -198,150 +342,6 @@ options:
type: boolean
type: object
type: object
backups:
default:
enable: false
endpoint: ''
key-id-key: s3-id
secret-key: s3-secret
secret-name: backup-settings
examples:
- enable: false
endpoint: ''
key-id-key: s3-id
secret-key: s3-secret
secret-name: backup-settings
properties:
enable:
default: false
type: boolean
endpoint:
default: ''
type: string
key-id-key:
default: s3-id
type: string
secret-key:
default: s3-secret
type: string
secret-name:
default: backup-settings
type: string
type: object
stations:
default: []
examples:
- []
items:
properties:
name:
default: ''
type: string
organisations:
default: []
items:
type: string
type: array
type: object
type: array
external-mongos:
default: []
examples:
- []
items:
properties:
dbname:
default: ''
type: string
name:
default: ''
type: string
namespace:
default: ''
type: string
secret:
properties:
key:
default: ''
type: string
name:
default: ''
type: string
type: object
username:
default: ''
type: string
type: object
type: array
external-redis:
default: []
examples:
- []
items:
properties:
name:
default: ''
type: string
namespace:
default: ''
type: string
type: object
type: array
distributions:
default:
core: core
domain: domain
examples:
- core: core
domain: domain
properties:
core:
default: core
type: string
domain:
default: domain
type: string
type: object
domain:
default: your-company
examples:
- your-company
type: string
stations-sub-domain:
default: code
examples:
- code
type: string
domain-name:
default: your_company.com
examples:
- your_company.com
type: string
storage-classes:
default:
BlockReadWriteMany: ''
BlockReadWriteOnce: ''
FilesystemReadWriteMany: ''
FilesystemReadWriteOnce: ''
examples:
- BlockReadWriteMany: ''
BlockReadWriteOnce: ''
FilesystemReadWriteMany: ''
FilesystemReadWriteOnce: ''
properties:
BlockReadWriteMany:
default: ''
type: string
BlockReadWriteOnce:
default: ''
type: string
FilesystemReadWriteMany:
default: ''
type: string
FilesystemReadWriteOnce:
default: ''
type: string
type: object
external-pgs:
default: []
examples:
@@ -371,10 +371,10 @@ options:
type: string
type: object
type: array
ingress-class:
default: traefik
domain:
default: your-company
examples:
- traefik
- your-company
type: string
dependencies: []
providers:

View File

@@ -18,6 +18,7 @@ locals {
dns = { for k, v in var.dns : k => v if k!="enable" }
api = { for k, v in var.api : k => v if k!="enable" }
okd = merge({"cluster-admin" = true}, { for k, v in var.okd : k => v if k!="enable" })
gramo = merge({"cluster-admin" = true}, { for k, v in var.gramo : k => v if k!="enable" })
}
resource "kubernetes_namespace_v1" "infra-ns" {
@@ -98,3 +99,21 @@ resource "kubectl_manifest" "okd" {
options: ${jsonencode(merge(local.global, local.okd))}
EOF
}
resource "kubectl_manifest" "gramo" {
count = var.gramo.enable ? 1 : 0
depends_on = [kubernetes_namespace_v1.infra-ns]
yaml_body = <<-EOF
apiVersion: "vynil.solidite.fr/v1"
kind: "Install"
metadata:
name: "infra-gramo"
namespace: "${kubernetes_namespace_v1.infra-ns[0].metadata[0].name}"
labels: ${jsonencode(local.common-labels)}
spec:
distrib: "${var.distributions.domain}"
category: "apps"
component: "gramo"
options: ${jsonencode(merge(local.global, local.gramo))}
EOF
}

View File

@@ -6,6 +6,33 @@ metadata:
name: domain-infra
description: null
options:
dns:
default:
enable: false
examples:
- enable: false
properties:
enable:
default: false
type: boolean
type: object
x-vynil-category: share
x-vynil-package: dns
domain:
default: your-company
examples:
- your-company
type: string
issuer:
default: letsencrypt-prod
examples:
- letsencrypt-prod
type: string
ingress-class:
default: traefik
examples:
- traefik
type: string
backups:
default:
enable: false
@@ -36,6 +63,41 @@ options:
default: backup-settings
type: string
type: object
domain-name:
default: your_company.com
examples:
- your_company.com
type: string
storage-classes:
default:
BlockReadWriteMany: ''
BlockReadWriteOnce: ''
FilesystemReadWriteMany: ''
FilesystemReadWriteOnce: ''
examples:
- BlockReadWriteMany: ''
BlockReadWriteOnce: ''
FilesystemReadWriteMany: ''
FilesystemReadWriteOnce: ''
properties:
BlockReadWriteMany:
default: ''
type: string
BlockReadWriteOnce:
default: ''
type: string
FilesystemReadWriteMany:
default: ''
type: string
FilesystemReadWriteOnce:
default: ''
type: string
type: object
app-group:
default: infra
examples:
- infra
type: string
okd:
default:
enable: false
@@ -90,17 +152,7 @@ options:
type: object
x-vynil-category: apps
x-vynil-package: traefix-ui
ingress-class:
default: traefik
examples:
- traefik
type: string
domain:
default: your-company
examples:
- your-company
type: string
dns:
gramo:
default:
enable: false
examples:
@@ -110,48 +162,8 @@ options:
default: false
type: boolean
type: object
x-vynil-category: share
x-vynil-package: dns
issuer:
default: letsencrypt-prod
examples:
- letsencrypt-prod
type: string
app-group:
default: infra
examples:
- infra
type: string
storage-classes:
default:
BlockReadWriteMany: ''
BlockReadWriteOnce: ''
FilesystemReadWriteMany: ''
FilesystemReadWriteOnce: ''
examples:
- BlockReadWriteMany: ''
BlockReadWriteOnce: ''
FilesystemReadWriteMany: ''
FilesystemReadWriteOnce: ''
properties:
BlockReadWriteMany:
default: ''
type: string
BlockReadWriteOnce:
default: ''
type: string
FilesystemReadWriteMany:
default: ''
type: string
FilesystemReadWriteOnce:
default: ''
type: string
type: object
domain-name:
default: your_company.com
examples:
- your_company.com
type: string
x-vynil-category: apps
x-vynil-package: gramo
dependencies: []
providers:
kubernetes: true