fix
This commit is contained in:
@@ -21,6 +21,12 @@ resource "kubectl_manifest" "config" {
|
|||||||
provisioning = /etc/grafana/provisioning
|
provisioning = /etc/grafana/provisioning
|
||||||
[server]
|
[server]
|
||||||
domain = ''
|
domain = ''
|
||||||
|
root_url = 'https://${local.dns-name}/'
|
||||||
|
[auth.generic_oauth]
|
||||||
|
enabled = true
|
||||||
|
client_id = '${module.oauth2.client_id}'
|
||||||
|
client_secret = '${module.oauth2.client_secret}'
|
||||||
|
auth_url = '${module.oauth2.sso_configuration_url}'
|
||||||
|
api_url = '${module.oauth2.sso_userinfo}'
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,41 +6,16 @@ metadata:
|
|||||||
name: grafana
|
name: grafana
|
||||||
description: null
|
description: null
|
||||||
options:
|
options:
|
||||||
admin_name:
|
|
||||||
default: grafana_admin
|
|
||||||
examples:
|
|
||||||
- grafana_admin
|
|
||||||
type: string
|
|
||||||
app-group:
|
app-group:
|
||||||
default: monitor
|
default: monitor
|
||||||
examples:
|
examples:
|
||||||
- monitor
|
- monitor
|
||||||
type: string
|
type: string
|
||||||
domain:
|
|
||||||
default: your-company
|
|
||||||
examples:
|
|
||||||
- your-company
|
|
||||||
type: string
|
|
||||||
sub-domain:
|
sub-domain:
|
||||||
default: grafana
|
default: grafana
|
||||||
examples:
|
examples:
|
||||||
- grafana
|
- grafana
|
||||||
type: string
|
type: string
|
||||||
domain-name:
|
|
||||||
default: your_company.com
|
|
||||||
examples:
|
|
||||||
- your_company.com
|
|
||||||
type: string
|
|
||||||
issuer:
|
|
||||||
default: letsencrypt-prod
|
|
||||||
examples:
|
|
||||||
- letsencrypt-prod
|
|
||||||
type: string
|
|
||||||
ingress-class:
|
|
||||||
default: traefik
|
|
||||||
examples:
|
|
||||||
- traefik
|
|
||||||
type: string
|
|
||||||
images:
|
images:
|
||||||
default:
|
default:
|
||||||
busybox:
|
busybox:
|
||||||
@@ -138,6 +113,11 @@ options:
|
|||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
type: object
|
type: object
|
||||||
|
domain:
|
||||||
|
default: your-company
|
||||||
|
examples:
|
||||||
|
- your-company
|
||||||
|
type: string
|
||||||
volume:
|
volume:
|
||||||
default:
|
default:
|
||||||
accessMode: ReadWriteOnce
|
accessMode: ReadWriteOnce
|
||||||
@@ -157,6 +137,26 @@ options:
|
|||||||
default: 10Gi
|
default: 10Gi
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
|
domain-name:
|
||||||
|
default: your_company.com
|
||||||
|
examples:
|
||||||
|
- your_company.com
|
||||||
|
type: string
|
||||||
|
admin_name:
|
||||||
|
default: grafana_admin
|
||||||
|
examples:
|
||||||
|
- grafana_admin
|
||||||
|
type: string
|
||||||
|
ingress-class:
|
||||||
|
default: traefik
|
||||||
|
examples:
|
||||||
|
- traefik
|
||||||
|
type: string
|
||||||
|
issuer:
|
||||||
|
default: letsencrypt-prod
|
||||||
|
examples:
|
||||||
|
- letsencrypt-prod
|
||||||
|
type: string
|
||||||
dependencies: []
|
dependencies: []
|
||||||
providers:
|
providers:
|
||||||
kubernetes: true
|
kubernetes: true
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ locals {
|
|||||||
dns-name = "${var.sub-domain}.${var.domain-name}"
|
dns-name = "${var.sub-domain}.${var.domain-name}"
|
||||||
dns-names = [local.dns-name]
|
dns-names = [local.dns-name]
|
||||||
app-name = var.component == var.instance ? var.instance : format("%s-%s", var.component, var.instance)
|
app-name = var.component == var.instance ? var.instance : format("%s-%s", var.component, var.instance)
|
||||||
icon = "logo192.png"
|
icon = "public/img/grafana_icon.svg"
|
||||||
request_headers = {
|
request_headers = {
|
||||||
"Content-Type" = "application/json"
|
"Content-Type" = "application/json"
|
||||||
Authorization = "Bearer ${data.kubernetes_secret_v1.authentik.data["AUTHENTIK_BOOTSTRAP_TOKEN"]}"
|
Authorization = "Bearer ${data.kubernetes_secret_v1.authentik.data["AUTHENTIK_BOOTSTRAP_TOKEN"]}"
|
||||||
@@ -16,27 +16,27 @@ locals {
|
|||||||
}
|
}
|
||||||
|
|
||||||
module "ingress" {
|
module "ingress" {
|
||||||
source = "/dist/modules/ingress"
|
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//ingress"
|
||||||
component = ""
|
component = ""
|
||||||
instance = var.instance
|
instance = var.instance
|
||||||
namespace = var.namespace
|
namespace = var.namespace
|
||||||
issuer = var.issuer
|
issuer = var.issuer
|
||||||
ingress-class = var.ingress-class
|
ingress_class = var.ingress-class
|
||||||
labels = local.common-labels
|
labels = local.common-labels
|
||||||
dns-names = local.dns-names
|
dns_names = local.dns-names
|
||||||
middlewares = []
|
middlewares = []
|
||||||
service = local.service
|
services = [local.service]
|
||||||
providers = {
|
providers = {
|
||||||
kubectl = kubectl
|
kubectl = kubectl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* module "application" {
|
module "application" {
|
||||||
source = "/dist/modules/application"
|
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//application"
|
||||||
component = var.component
|
component = var.component
|
||||||
instance = var.instance
|
instance = var.instance
|
||||||
app-group = var.app-group
|
app_group = var.app-group
|
||||||
dns-name = local.dns-name
|
dns_name = local.dns-name
|
||||||
icon = local.icon
|
icon = local.icon
|
||||||
protocol_provider = module.oauth2.provider-id
|
protocol_provider = module.oauth2.provider-id
|
||||||
providers = {
|
providers = {
|
||||||
@@ -45,13 +45,13 @@ module "ingress" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
module "oauth2" {
|
module "oauth2" {
|
||||||
source = "/dist/modules/oauth2"
|
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//oauth2"
|
||||||
component = var.component
|
component = var.component
|
||||||
instance = var.instance
|
instance = var.instance
|
||||||
namespace = var.namespace
|
namespace = var.namespace
|
||||||
labels = local.common-labels
|
labels = local.common-labels
|
||||||
dns-name = local.dns-name
|
dns_name = local.dns-name
|
||||||
redirect-path = ""
|
redirect_path = "login/generic_oauth"
|
||||||
providers = {
|
providers = {
|
||||||
kubernetes = kubernetes
|
kubernetes = kubernetes
|
||||||
kubectl = kubectl
|
kubectl = kubectl
|
||||||
@@ -68,4 +68,3 @@ provider "restapi" {
|
|||||||
write_returns_object = true
|
write_returns_object = true
|
||||||
id_attribute = "name"
|
id_attribute = "name"
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
Reference in New Issue
Block a user