fix
This commit is contained in:
@@ -61,10 +61,10 @@ resource "authentik_policy_binding" "dolibarr_ldap_access_vynil" {
|
||||
resource "authentik_application" "dolibarr_application_saml" {
|
||||
name = "${var.instance}"
|
||||
slug = "${var.component}-${var.instance}"
|
||||
group = var.app_group
|
||||
group = var.app-group
|
||||
protocol_provider = authentik_provider_saml.dolibarr.id
|
||||
meta_launch_url = format("https://%s.%s", var.sub_domain, var.domain_name)
|
||||
meta_icon = format("https://%s.%s/%s", var.sub_domain, var.domain_name, "theme/dolibarr_256x256_color.png")
|
||||
meta_launch_url = format("https://%s.%s", var.sub-domain, var.domain-name)
|
||||
meta_icon = format("https://%s.%s/%s", var.sub-domain, var.domain-name, "theme/dolibarr_256x256_color.png")
|
||||
}
|
||||
|
||||
resource "authentik_policy_binding" "dolibarr_saml_access_users" {
|
||||
|
||||
@@ -167,7 +167,7 @@ resource "kubectl_manifest" "config" {
|
||||
DOLI_ADMIN_LOGIN: "admin_${var.instance}"
|
||||
DOLI_MODULES: "modSociete,modBlockedLog,modSamlConnector,modLdap"
|
||||
DOLI_AUTH: "dolibarr"
|
||||
DOLI_URL_ROOT: "https://${var.sub_domain}.${var.domain_name}"
|
||||
DOLI_URL_ROOT: "https://${var.sub-domain}.${var.domain-name}"
|
||||
DOLI_LDAP_PORT: "389"
|
||||
DOLI_LDAP_VERSION: "3"
|
||||
DOLI_LDAP_SERVERTYPE: "openldap"
|
||||
|
||||
@@ -6,203 +6,23 @@ metadata:
|
||||
name: dolibarr
|
||||
description: null
|
||||
options:
|
||||
parameters:
|
||||
default:
|
||||
MAIN_LANG_DEFAULT: auto
|
||||
examples:
|
||||
- MAIN_LANG_DEFAULT: auto
|
||||
properties:
|
||||
MAIN_LANG_DEFAULT:
|
||||
default: auto
|
||||
type: string
|
||||
type: object
|
||||
modules:
|
||||
default:
|
||||
- societe
|
||||
examples:
|
||||
- - societe
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
images:
|
||||
default:
|
||||
dolibarr:
|
||||
pullPolicy: IfNotPresent
|
||||
registry: docker.io
|
||||
repository: sebt3/dolibarr
|
||||
tag: 18.0.2
|
||||
nginx:
|
||||
pullPolicy: IfNotPresent
|
||||
registry: docker.io
|
||||
repository: nginx
|
||||
tag: alpine
|
||||
examples:
|
||||
- dolibarr:
|
||||
pullPolicy: IfNotPresent
|
||||
registry: docker.io
|
||||
repository: sebt3/dolibarr
|
||||
tag: 18.0.2
|
||||
nginx:
|
||||
pullPolicy: IfNotPresent
|
||||
registry: docker.io
|
||||
repository: nginx
|
||||
tag: alpine
|
||||
properties:
|
||||
dolibarr:
|
||||
default:
|
||||
pullPolicy: IfNotPresent
|
||||
registry: docker.io
|
||||
repository: sebt3/dolibarr
|
||||
tag: 18.0.2
|
||||
properties:
|
||||
pullPolicy:
|
||||
default: IfNotPresent
|
||||
type: string
|
||||
registry:
|
||||
default: docker.io
|
||||
type: string
|
||||
repository:
|
||||
default: sebt3/dolibarr
|
||||
type: string
|
||||
tag:
|
||||
default: 18.0.2
|
||||
type: string
|
||||
type: object
|
||||
nginx:
|
||||
default:
|
||||
pullPolicy: IfNotPresent
|
||||
registry: docker.io
|
||||
repository: nginx
|
||||
tag: alpine
|
||||
properties:
|
||||
pullPolicy:
|
||||
default: IfNotPresent
|
||||
type: string
|
||||
registry:
|
||||
default: docker.io
|
||||
type: string
|
||||
repository:
|
||||
default: nginx
|
||||
type: string
|
||||
tag:
|
||||
default: alpine
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
sub_domain:
|
||||
default: erp
|
||||
examples:
|
||||
- erp
|
||||
type: string
|
||||
resources:
|
||||
default:
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 256Mi
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 100Mi
|
||||
examples:
|
||||
- limits:
|
||||
cpu: 200m
|
||||
memory: 256Mi
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 100Mi
|
||||
properties:
|
||||
limits:
|
||||
default:
|
||||
cpu: 200m
|
||||
memory: 256Mi
|
||||
properties:
|
||||
cpu:
|
||||
default: 200m
|
||||
type: string
|
||||
memory:
|
||||
default: 256Mi
|
||||
type: string
|
||||
type: object
|
||||
requests:
|
||||
default:
|
||||
cpu: 50m
|
||||
memory: 100Mi
|
||||
properties:
|
||||
cpu:
|
||||
default: 50m
|
||||
type: string
|
||||
memory:
|
||||
default: 100Mi
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
postgres:
|
||||
default:
|
||||
replicas: 1
|
||||
storage: 5Gi
|
||||
version: '14'
|
||||
examples:
|
||||
- replicas: 1
|
||||
storage: 5Gi
|
||||
version: '14'
|
||||
properties:
|
||||
replicas:
|
||||
default: 1
|
||||
type: integer
|
||||
storage:
|
||||
default: 5Gi
|
||||
type: string
|
||||
version:
|
||||
default: '14'
|
||||
type: string
|
||||
type: object
|
||||
domain_name:
|
||||
default: your_company.com
|
||||
examples:
|
||||
- your_company.com
|
||||
type: string
|
||||
issuer:
|
||||
default: letsencrypt-prod
|
||||
examples:
|
||||
- letsencrypt-prod
|
||||
type: string
|
||||
redis:
|
||||
default:
|
||||
exporter:
|
||||
enabled: true
|
||||
image: quay.io/opstree/redis-exporter:v1.44.0
|
||||
image: quay.io/opstree/redis:v7.0.12
|
||||
storage: 2Gi
|
||||
examples:
|
||||
- exporter:
|
||||
enabled: true
|
||||
image: quay.io/opstree/redis-exporter:v1.44.0
|
||||
image: quay.io/opstree/redis:v7.0.12
|
||||
storage: 2Gi
|
||||
properties:
|
||||
exporter:
|
||||
default:
|
||||
enabled: true
|
||||
image: quay.io/opstree/redis-exporter:v1.44.0
|
||||
properties:
|
||||
enabled:
|
||||
default: true
|
||||
type: boolean
|
||||
image:
|
||||
default: quay.io/opstree/redis-exporter:v1.44.0
|
||||
type: string
|
||||
type: object
|
||||
image:
|
||||
default: quay.io/opstree/redis:v7.0.12
|
||||
type: string
|
||||
storage:
|
||||
default: 2Gi
|
||||
type: string
|
||||
type: object
|
||||
app_group:
|
||||
default: ''
|
||||
examples:
|
||||
- ''
|
||||
type: string
|
||||
backups:
|
||||
default:
|
||||
enable: false
|
||||
@@ -309,63 +129,6 @@ options:
|
||||
default: false
|
||||
type: boolean
|
||||
type: object
|
||||
domain:
|
||||
default: your-company
|
||||
examples:
|
||||
- your-company
|
||||
type: string
|
||||
storage:
|
||||
default:
|
||||
accessMode: ReadWriteOnce
|
||||
size: 10Gi
|
||||
type: Filesystem
|
||||
examples:
|
||||
- accessMode: ReadWriteOnce
|
||||
size: 10Gi
|
||||
type: Filesystem
|
||||
properties:
|
||||
accessMode:
|
||||
default: ReadWriteOnce
|
||||
enum:
|
||||
- ReadWriteOnce
|
||||
- ReadOnlyMany
|
||||
- ReadWriteMany
|
||||
type: string
|
||||
size:
|
||||
default: 10Gi
|
||||
type: string
|
||||
type:
|
||||
default: Filesystem
|
||||
enum:
|
||||
- Filesystem
|
||||
- block
|
||||
type: string
|
||||
type: object
|
||||
ingress_class:
|
||||
default: traefik
|
||||
examples:
|
||||
- traefik
|
||||
type: string
|
||||
log-level:
|
||||
default: 5
|
||||
examples:
|
||||
- 5
|
||||
type: integer
|
||||
user-groups:
|
||||
default:
|
||||
- admin: true
|
||||
name: dolibarr-admin
|
||||
examples:
|
||||
- - admin: true
|
||||
name: dolibarr-admin
|
||||
items:
|
||||
properties:
|
||||
admin:
|
||||
type: boolean
|
||||
name:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
hpa:
|
||||
default:
|
||||
avg-cpu: 50
|
||||
@@ -386,6 +149,335 @@ options:
|
||||
default: 1
|
||||
type: integer
|
||||
type: object
|
||||
resources:
|
||||
default:
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 256Mi
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 100Mi
|
||||
examples:
|
||||
- limits:
|
||||
cpu: 200m
|
||||
memory: 256Mi
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 100Mi
|
||||
properties:
|
||||
limits:
|
||||
default:
|
||||
cpu: 200m
|
||||
memory: 256Mi
|
||||
properties:
|
||||
cpu:
|
||||
default: 200m
|
||||
type: string
|
||||
memory:
|
||||
default: 256Mi
|
||||
type: string
|
||||
type: object
|
||||
requests:
|
||||
default:
|
||||
cpu: 50m
|
||||
memory: 100Mi
|
||||
properties:
|
||||
cpu:
|
||||
default: 50m
|
||||
type: string
|
||||
memory:
|
||||
default: 100Mi
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
app-group:
|
||||
default: ''
|
||||
examples:
|
||||
- ''
|
||||
type: string
|
||||
storage:
|
||||
default:
|
||||
postgres:
|
||||
size: 5Gi
|
||||
redis:
|
||||
size: 2Gi
|
||||
volume:
|
||||
accessMode: ReadWriteOnce
|
||||
size: 1Gi
|
||||
type: Filesystem
|
||||
description: Configure this app storage
|
||||
examples:
|
||||
- postgres:
|
||||
size: 5Gi
|
||||
redis:
|
||||
size: 2Gi
|
||||
volume:
|
||||
accessMode: ReadWriteOnce
|
||||
size: 1Gi
|
||||
type: Filesystem
|
||||
properties:
|
||||
postgres:
|
||||
default:
|
||||
size: 5Gi
|
||||
properties:
|
||||
size:
|
||||
default: 5Gi
|
||||
type: string
|
||||
type: object
|
||||
redis:
|
||||
default:
|
||||
size: 2Gi
|
||||
properties:
|
||||
size:
|
||||
default: 2Gi
|
||||
type: string
|
||||
type: object
|
||||
volume:
|
||||
default:
|
||||
accessMode: ReadWriteOnce
|
||||
size: 1Gi
|
||||
type: Filesystem
|
||||
properties:
|
||||
accessMode:
|
||||
default: ReadWriteOnce
|
||||
enum:
|
||||
- ReadWriteOnce
|
||||
- ReadOnlyMany
|
||||
- ReadWriteMany
|
||||
type: string
|
||||
size:
|
||||
default: 1Gi
|
||||
type: string
|
||||
type:
|
||||
default: Filesystem
|
||||
enum:
|
||||
- Filesystem
|
||||
- Block
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
ingress-class:
|
||||
default: traefik
|
||||
examples:
|
||||
- traefik
|
||||
type: string
|
||||
postgres:
|
||||
default:
|
||||
replicas: 1
|
||||
examples:
|
||||
- replicas: 1
|
||||
properties:
|
||||
replicas:
|
||||
default: 1
|
||||
type: integer
|
||||
type: object
|
||||
log-level:
|
||||
default: 5
|
||||
examples:
|
||||
- 5
|
||||
type: integer
|
||||
user-groups:
|
||||
default:
|
||||
- admin: true
|
||||
name: dolibarr-admin
|
||||
examples:
|
||||
- - admin: true
|
||||
name: dolibarr-admin
|
||||
items:
|
||||
properties:
|
||||
admin:
|
||||
type: boolean
|
||||
name:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
parameters:
|
||||
default:
|
||||
MAIN_LANG_DEFAULT: auto
|
||||
examples:
|
||||
- MAIN_LANG_DEFAULT: auto
|
||||
properties:
|
||||
MAIN_LANG_DEFAULT:
|
||||
default: auto
|
||||
type: string
|
||||
type: object
|
||||
images:
|
||||
default:
|
||||
dolibarr:
|
||||
pullPolicy: IfNotPresent
|
||||
registry: docker.io
|
||||
repository: sebt3/dolibarr
|
||||
tag: 18.0.2
|
||||
nginx:
|
||||
pullPolicy: IfNotPresent
|
||||
registry: docker.io
|
||||
repository: nginx
|
||||
tag: alpine
|
||||
postgresql:
|
||||
registry: ghcr.io
|
||||
repository: cloudnative-pg/postgresql
|
||||
tag: 15.3
|
||||
redis:
|
||||
pullPolicy: IfNotPresent
|
||||
registry: quay.io
|
||||
repository: opstree/redis
|
||||
tag: v7.0.12
|
||||
redis_exporter:
|
||||
pullPolicy: IfNotPresent
|
||||
registry: quay.io
|
||||
repository: opstree/redis-exporter
|
||||
tag: v1.44.0
|
||||
examples:
|
||||
- dolibarr:
|
||||
pullPolicy: IfNotPresent
|
||||
registry: docker.io
|
||||
repository: sebt3/dolibarr
|
||||
tag: 18.0.2
|
||||
nginx:
|
||||
pullPolicy: IfNotPresent
|
||||
registry: docker.io
|
||||
repository: nginx
|
||||
tag: alpine
|
||||
postgresql:
|
||||
registry: ghcr.io
|
||||
repository: cloudnative-pg/postgresql
|
||||
tag: 15.3
|
||||
redis:
|
||||
pullPolicy: IfNotPresent
|
||||
registry: quay.io
|
||||
repository: opstree/redis
|
||||
tag: v7.0.12
|
||||
redis_exporter:
|
||||
pullPolicy: IfNotPresent
|
||||
registry: quay.io
|
||||
repository: opstree/redis-exporter
|
||||
tag: v1.44.0
|
||||
properties:
|
||||
dolibarr:
|
||||
default:
|
||||
pullPolicy: IfNotPresent
|
||||
registry: docker.io
|
||||
repository: sebt3/dolibarr
|
||||
tag: 18.0.2
|
||||
properties:
|
||||
pullPolicy:
|
||||
default: IfNotPresent
|
||||
type: string
|
||||
registry:
|
||||
default: docker.io
|
||||
type: string
|
||||
repository:
|
||||
default: sebt3/dolibarr
|
||||
type: string
|
||||
tag:
|
||||
default: 18.0.2
|
||||
type: string
|
||||
type: object
|
||||
nginx:
|
||||
default:
|
||||
pullPolicy: IfNotPresent
|
||||
registry: docker.io
|
||||
repository: nginx
|
||||
tag: alpine
|
||||
properties:
|
||||
pullPolicy:
|
||||
default: IfNotPresent
|
||||
type: string
|
||||
registry:
|
||||
default: docker.io
|
||||
type: string
|
||||
repository:
|
||||
default: nginx
|
||||
type: string
|
||||
tag:
|
||||
default: alpine
|
||||
type: string
|
||||
type: object
|
||||
postgresql:
|
||||
default:
|
||||
registry: ghcr.io
|
||||
repository: cloudnative-pg/postgresql
|
||||
tag: 15.3
|
||||
properties:
|
||||
registry:
|
||||
default: ghcr.io
|
||||
type: string
|
||||
repository:
|
||||
default: cloudnative-pg/postgresql
|
||||
type: string
|
||||
tag:
|
||||
default: 15.3
|
||||
type: number
|
||||
type: object
|
||||
redis:
|
||||
default:
|
||||
pullPolicy: IfNotPresent
|
||||
registry: quay.io
|
||||
repository: opstree/redis
|
||||
tag: v7.0.12
|
||||
properties:
|
||||
pullPolicy:
|
||||
default: IfNotPresent
|
||||
type: string
|
||||
registry:
|
||||
default: quay.io
|
||||
type: string
|
||||
repository:
|
||||
default: opstree/redis
|
||||
type: string
|
||||
tag:
|
||||
default: v7.0.12
|
||||
type: string
|
||||
type: object
|
||||
redis_exporter:
|
||||
default:
|
||||
pullPolicy: IfNotPresent
|
||||
registry: quay.io
|
||||
repository: opstree/redis-exporter
|
||||
tag: v1.44.0
|
||||
properties:
|
||||
pullPolicy:
|
||||
default: IfNotPresent
|
||||
type: string
|
||||
registry:
|
||||
default: quay.io
|
||||
type: string
|
||||
repository:
|
||||
default: opstree/redis-exporter
|
||||
type: string
|
||||
tag:
|
||||
default: v1.44.0
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
domain:
|
||||
default: your-company
|
||||
examples:
|
||||
- your-company
|
||||
type: string
|
||||
issuer:
|
||||
default: letsencrypt-prod
|
||||
examples:
|
||||
- letsencrypt-prod
|
||||
type: string
|
||||
sub-domain:
|
||||
default: erp
|
||||
examples:
|
||||
- erp
|
||||
type: string
|
||||
domain-name:
|
||||
default: your_company.com
|
||||
examples:
|
||||
- your_company.com
|
||||
type: string
|
||||
modules:
|
||||
default:
|
||||
- societe
|
||||
examples:
|
||||
- - societe
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
dependencies:
|
||||
- dist: null
|
||||
category: share
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
locals {
|
||||
dns_names = ["${var.sub_domain}.${var.domain_name}"]
|
||||
dns_names = ["${var.sub-domain}.${var.domain-name}"]
|
||||
middlewares = ["${var.instance}-https"]
|
||||
service = {
|
||||
"name" = "${var.instance}"
|
||||
@@ -66,7 +66,7 @@ resource "kubectl_manifest" "prj_ingress" {
|
||||
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}"
|
||||
ingressClassName: "${var.ingress-class}"
|
||||
rules: ${jsonencode(local.rules)}
|
||||
tls:
|
||||
- hosts: ${jsonencode(local.dns_names)}
|
||||
|
||||
@@ -5,7 +5,7 @@ data "kubernetes_secret_v1" "authentik" {
|
||||
}
|
||||
}
|
||||
locals {
|
||||
base-dn = format("dc=%s", join(",dc=", split(".", format("%s.%s", var.sub_domain, var.domain_name))))
|
||||
base-dn = format("dc=%s", join(",dc=", split(".", format("%s.%s", var.sub-domain, var.domain-name))))
|
||||
base-group-dn = format("ou=groups,%s", local.base-dn)
|
||||
base-user-dn = format("ou=users,%s", local.base-dn)
|
||||
authentik_url = "http://authentik.${var.domain}-auth.svc"
|
||||
|
||||
@@ -17,8 +17,9 @@ resource "kubectl_manifest" "prj_pg" {
|
||||
"k8up.io/file-extension": ".sql"
|
||||
spec:
|
||||
instances: ${var.postgres.replicas}
|
||||
imageName: "${var.images.postgresql.registry}/${var.images.postgresql.repository}:${var.images.postgresql.tag}"
|
||||
storage:
|
||||
size: "${var.postgres.storage}"
|
||||
size: "${var.storage.postgres.size}"
|
||||
bootstrap:
|
||||
initdb:
|
||||
database: "${var.component}"
|
||||
|
||||
@@ -14,7 +14,7 @@ resource "kubectl_manifest" "dolibarr_redis" {
|
||||
spec:
|
||||
kubernetesConfig:
|
||||
image: "${var.images.redis.registry}/${var.images.redis.repository}:${var.images.redis.tag}"
|
||||
imagePullPolicy: "IfNotPresent"
|
||||
imagePullPolicy: "${var.images.redis.pullPolicy}"
|
||||
storage:
|
||||
volumeClaimTemplate:
|
||||
spec:
|
||||
|
||||
@@ -47,7 +47,7 @@ resource "authentik_provider_saml" "dolibarr" {
|
||||
name = "dolibarr-${var.instance}-saml"
|
||||
authentication_flow = data.authentik_flow.default-authentication-flow.id
|
||||
authorization_flow = data.authentik_flow.default-authorization-flow.id
|
||||
acs_url = "https://${var.sub_domain}.${var.domain_name}/custom/samlconnector/acs.php?entity=1&fk_idp=0"
|
||||
acs_url = "https://${var.sub-domain}.${var.domain-name}/custom/samlconnector/acs.php?entity=1&fk_idp=0"
|
||||
property_mappings = data.authentik_property_mapping_saml.saml_maps.ids
|
||||
name_id_mapping = data.authentik_property_mapping_saml.saml_name.id
|
||||
signing_kp = data.authentik_certificate_key_pair.generated.id
|
||||
|
||||
Reference in New Issue
Block a user