Skip to content

Commit

Permalink
fix(prometheus): extend startup timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Maksim Shakavin committed Dec 27, 2024
1 parent 657c84a commit f4b9772
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions infrastructure/terraform/authentik/applications.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module "oauth2-audiobookshelf" {
authorization_flow = resource.authentik_flow.provider-authorization-implicit-consent.uuid
client_id = module.secret_audiobookshelf.fields["OIDC_CLIENT_ID"]
client_secret = module.secret_audiobookshelf.fields["OIDC_CLIENT_SECRET"]
additional_property_mappings = formatlist(authentik_scope_mapping.audiobookshelf.id)
additional_property_mappings = formatlist(authentik_property_mapping_provider_scope.audiobookshelf.id)
redirect_uris = ["https://audiobooks.exelent.click/auth/openid/callback", "audiobookshelf://oauth"]
}

Expand All @@ -53,8 +53,8 @@ module "oauth2-mealie" {
newtab = true
group = "Selfhosted"
auth_groups = [authentik_group.users.id]
client_type = "public"
authorization_flow = resource.authentik_flow.provider-authorization-implicit-consent.uuid
client_id = module.secret_mealie.fields["OIDC_CLIENT_ID"]
client_secret = module.secret_mealie.fields["OIDC_CLIENT_SECRET"]
redirect_uris = ["https://mealie.exelent.click/login"]
}
2 changes: 1 addition & 1 deletion infrastructure/terraform/authentik/customization.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource "authentik_scope_mapping" "audiobookshelf" {
resource "authentik_property_mapping_provider_scope" "audiobookshelf" {
name = "OAuth Mapping: OpenID 'audiobookshelf'"
scope_name = "groups"
expression = <<EOF
Expand Down
4 changes: 2 additions & 2 deletions infrastructure/terraform/authentik/oauth2_application/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ data "authentik_certificate_key_pair" "generated" {
name = "authentik Self-signed Certificate"
}

data "authentik_scope_mapping" "scopes" {
data "authentik_property_mapping_provider_scope" "scopes" {
managed_list = [
"goauthentik.io/providers/oauth2/scope-email",
"goauthentik.io/providers/oauth2/scope-openid",
Expand All @@ -30,7 +30,7 @@ resource "authentik_provider_oauth2" "oauth2-application" {
authorization_flow = var.authorization_flow
signing_key = data.authentik_certificate_key_pair.generated.id
client_type = var.client_type
property_mappings = concat(data.authentik_scope_mapping.scopes.ids, var.additional_property_mappings)
property_mappings = concat(data.authentik_property_mapping_provider_scope.scopes.ids, var.additional_property_mappings)
redirect_uris = var.redirect_uris
}

Expand Down
1 change: 1 addition & 0 deletions kubernetes/apps/default/mealie/app/externalsecret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ spec:
OIDC_AUTH_ENABLED: "True"
OIDC_CONFIGURATION_URL: "https://sso.exelent.click/application/o/mealie/.well-known/openid-configuration"
OIDC_CLIENT_ID: "{{ .OIDC_CLIENT_ID }}"
OIDC_CLIENT_SECRET: "{{ .OIDC_CLIENT_SECRET }}"
OIDC_ADMIN_GROUP: Infrastructure
OIDC_AUTO_REDIRECT: "True"
OIDC_PROVIDER_NAME: Authentik
Expand Down
1 change: 0 additions & 1 deletion kubernetes/apps/observability/grafana/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ spec:
url: http://thanos-query-frontend.observability.svc.cluster.local:10902
jsonData:
prometheusType: Thanos
timeInterval: 1m
- name: Loki
type: loki
uid: loki
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,16 @@ spec:
thanosServiceMonitor:
enabled: true
prometheusSpec:
image:
registry: quay.io
repository: prometheus/prometheus
tag: v3.0.1
maximumStartupDurationSeconds: 1000
podMetadata:
annotations:
secret.reloader.stakater.com/reload: &secret thanos-objstore-config
replicas: 2
replicaExternalLabelName: __replica__
scrapeInterval: 1m # Must match interval in Grafana Helm chart
ruleSelectorNilUsesHelmValues: false
serviceMonitorSelectorNilUsesHelmValues: false
podMonitorSelectorNilUsesHelmValues: false
Expand Down

0 comments on commit f4b9772

Please sign in to comment.