This commit is contained in:
2023-10-01 09:45:28 +02:00
parent a374fe5e66
commit f15202de63
13 changed files with 785 additions and 57 deletions

View File

@@ -0,0 +1,22 @@
locals {
common-labels = {
"vynil.solidite.fr/owner-name" = var.instance
"vynil.solidite.fr/owner-namespace" = var.namespace
"vynil.solidite.fr/owner-category" = var.category
"vynil.solidite.fr/owner-component" = var.component
"app.kubernetes.io/managed-by" = "vynil"
"app.kubernetes.io/name" = var.component
"app.kubernetes.io/instance" = var.instance
}
}
data "kubernetes_secret_v1" "authentik" {
metadata {
name = "authentik"
namespace = var.namespace
}
}
data "kustomization_overlay" "data" {
resources = []
}

View File

@@ -0,0 +1,16 @@
resource "authentik_group" "employes" {
name = "employes"
attributes = jsonencode(merge([for app in var.employes.apps: {"${app}" = true}]))
}
resource "authentik_group" "fournisseurs" {
count = var.fournisseurs.enable ? 1 : 0
name = "fournisseurs"
attributes = jsonencode(merge([for app in var.fournisseurs.apps: {"${app}" = true}]))
}
resource "authentik_group" "clients" {
count = var.clients.enable ? 1 : 0
name = "clients"
attributes = jsonencode(merge([for app in var.clients.apps: {"${app}" = true}]))
}

View File

@@ -0,0 +1,49 @@
---
apiVersion: vinyl.solidite.fr/v1beta1
kind: Component
category: share
metadata:
name: accounts-management
description: null
options:
domain:
default: your-company
examples:
- your-company
type: string
employes:
properties:
apps:
items:
type: string
type: array
fournisseurs:
properties:
apps:
items:
type: string
type: array
enable:
default: false
type: boolean
clients:
properties:
apps:
items:
type: string
type: array
enable:
default: false
type: boolean
dependencies:
- dist: null
category: share
component: authentik
providers:
kubernetes: true
authentik: true
kubectl: true
postgresql: null
restapi: null
http: true
tfaddtype: null