diff --git a/infra/k8s/gitlab/grafana-values.yaml b/infra/k8s/gitlab/grafana-values.yaml index 49a0e7401..2467d91d6 100644 --- a/infra/k8s/gitlab/grafana-values.yaml +++ b/infra/k8s/gitlab/grafana-values.yaml @@ -21,15 +21,24 @@ resources: memory: 256Mi persistence: - enabled: true - size: 2Gi + enabled: false adminUser: admin adminPassword: Welcome01 +envFromSecrets: + - name: db-credentials + grafana.ini: server: root_url: https://grafana.fxhnt.ai + database: + type: postgres + host: postgres:5432 + name: grafana + user: foxhunt + password: $__env{password} + ssl_mode: disable datasources: datasources.yaml: diff --git a/infra/k8s/network-policies/infrastructure.yaml b/infra/k8s/network-policies/infrastructure.yaml index 4eb0a32e2..3f2f2466b 100644 --- a/infra/k8s/network-policies/infrastructure.yaml +++ b/infra/k8s/network-policies/infrastructure.yaml @@ -1,4 +1,4 @@ -# Postgres: accepts connections from foxhunt app pods + GitLab (Helm release) +# Postgres: accepts connections from foxhunt app pods, GitLab, and Grafana apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: @@ -20,6 +20,9 @@ spec: - podSelector: matchLabels: release: gitlab + - podSelector: + matchLabels: + app.kubernetes.io/name: grafana ports: - protocol: TCP port: 5432