This commit is contained in:
2024-01-24 16:24:54 +01:00
parent c490eac799
commit a06c8a4608
3 changed files with 32 additions and 24 deletions

View File

@@ -20,19 +20,26 @@ provisioning = /etc/grafana/provisioning
[server] [server]
domain = '' domain = ''
root_url = 'https://${local.dns-name}/' root_url = 'https://${local.dns-name}/'
[users]
auto_assign_org = true
auto_assign_org_id = 0
[auth] [auth]
oauth_allow_insecure_email_lookup = true oauth_allow_insecure_email_lookup = true
signout_redirect_url = '${module.oauth2.sso_signout_url}'
[auth.anonymous] [auth.anonymous]
enabled = true enabled = true
org_name = Main Org. org_name = Main Org.
org_role = Viewer org_role = Viewer
[auth.generic_oauth] [auth.generic_oauth]
enabled = true enabled = true
scopes = openid email nickname name = vynil
scopes = openid profile email
client_id = '${module.oauth2.client_id}' client_id = '${module.oauth2.client_id}'
client_secret = '${module.oauth2.client_secret}' client_secret = '${module.oauth2.client_secret}'
auth_url = '${module.oauth2.sso_authorize}' auth_url = '${module.oauth2.sso_authorize_url}'
api_url = '${module.oauth2.sso_userinfo}' api_url = '${module.oauth2.sso_userinfo_url}'
token_url = '${module.oauth2.sso_token_url}'
role_attribute_path = contains(groups, '${module.application.main_group}-admin') && 'Admin' || contains(groups, '${module.application.main_group}') && 'Editor' || 'Viewer'
EOF EOF
} }
} }

View File

@@ -6,16 +6,21 @@ metadata:
name: grafana name: grafana
description: null description: null
options: options:
sub-domain:
default: grafana
examples:
- grafana
type: string
ingress-class: ingress-class:
default: traefik default: traefik
examples: examples:
- traefik - traefik
type: string type: string
app-group:
default: monitor
examples:
- monitor
type: string
sub-domain:
default: grafana
examples:
- grafana
type: string
images: images:
default: default:
busybox: busybox:
@@ -118,10 +123,15 @@ options:
examples: examples:
- grafana_admin - grafana_admin
type: string type: string
domain-name: domain:
default: your_company.com default: your-company
examples: examples:
- your_company.com - your-company
type: string
issuer:
default: letsencrypt-prod
examples:
- letsencrypt-prod
type: string type: string
volume: volume:
default: default:
@@ -142,20 +152,10 @@ options:
default: 10Gi default: 10Gi
type: string type: string
type: object type: object
issuer: domain-name:
default: letsencrypt-prod default: your_company.com
examples: examples:
- letsencrypt-prod - your_company.com
type: string
domain:
default: your-company
examples:
- your-company
type: string
app-group:
default: monitor
examples:
- monitor
type: string type: string
dependencies: [] dependencies: []
providers: providers:

View File

@@ -38,6 +38,7 @@ module "ingress" {
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
sub_groups = ["admin"]
protocol_provider = module.oauth2.provider-id protocol_provider = module.oauth2.provider-id
providers = { providers = {
authentik = authentik authentik = authentik