From 29833a7e5a71cebc83cbe365d164caf796db0988 Mon Sep 17 00:00:00 2001 From: Kochetkov S Date: Wed, 25 Nov 2026 11:54:15 +0300 Subject: [PATCH] ++ grafana vault oauth --- infrastructure/vmstack/uralkal/vmstack.yaml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/infrastructure/vmstack/uralkal/vmstack.yaml b/infrastructure/vmstack/uralkal/vmstack.yaml index 377b2f2..36093b1 100644 --- a/infrastructure/vmstack/uralkal/vmstack.yaml +++ b/infrastructure/vmstack/uralkal/vmstack.yaml @@ -168,7 +168,21 @@ spec: sidecar.istio.io/inject: "true" podAnnotations: proxy.istio.io/config: '{"holdApplicationUntilProxyStarts": true}' - envFromSecret: grafana-oauth + vault.hashicorp.com/agent-inject: "true" + vault.hashicorp.com/agent-pre-populate-only: "true" + vault.hashicorp.com/agent-init-first: "true" + vault.hashicorp.com/auth-path: auth/kubernetes + vault.hashicorp.com/role: vmstack-grafana + vault.hashicorp.com/agent-inject-secret-oauth-client-id: secrets/data/vmstack/grafana + vault.hashicorp.com/agent-inject-template-oauth-client-id: |- + {{- with secret "secrets/data/vmstack/grafana" -}} + {{ index .Data.data "client_id" }} + {{- end -}} + vault.hashicorp.com/agent-inject-secret-oauth-client-secret: secrets/data/vmstack/grafana + vault.hashicorp.com/agent-inject-template-oauth-client-secret: |- + {{- with secret "secrets/data/vmstack/grafana" -}} + {{ index .Data.data "client_secret" }} + {{- end -}} resources: requests: cpu: 50m @@ -190,6 +204,8 @@ spec: name: Zitadel allow_sign_up: true use_pkce: true + client_id: $__file{/vault/secrets/oauth-client-id} + client_secret: $__file{/vault/secrets/oauth-client-secret} scopes: openid profile email urn:zitadel:iam:org:projects:roles auth_url: https://login.sarex.local.uralkali.com/oauth/v2/authorize token_url: http://login.sarex.local.uralkali.com:8080/oauth/v2/token