Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
128712c4c9 | ||
|
|
ed040bc606 |
@@ -120,6 +120,40 @@ kubectl exec -n jenkins deploy/jenkins -c jenkins -- cat /run/secrets/additional
|
||||
is set inside its own database on first boot, so it cannot be swapped via a
|
||||
`kubectl patch` the way ArgoCD's can.
|
||||
|
||||
**Grafana → actual-http-api datasource** (Infinity plugin, queries
|
||||
`homelab-docker-compose-prod/actual-http-api`'s ActualQL `run-query` endpoint
|
||||
directly — see `homelab-services` README for why the Prometheus exporter
|
||||
alone can't answer arbitrary group-by/amount questions). The chart install
|
||||
just gets the plugin onto the pod; the datasource itself is added by hand in
|
||||
the Grafana UI (not provisioned/GitOps) so the API key never needs its own
|
||||
K8s Secret:
|
||||
|
||||
1. Grafana → **Connections → Data sources → Add data source** → search
|
||||
**Infinity** → select it.
|
||||
2. URL: `http://192.168.1.41:8003`.
|
||||
3. **Auth** → enable **Custom HTTP Headers** → add header
|
||||
`x-api-key` = `<actual-http-api API_KEY, same value as its compose
|
||||
file>`. Grafana stores this encrypted in its own DB (uses
|
||||
`kube-prometheus-stack-grafana`'s secret key), not in git.
|
||||
4. **Save & test**.
|
||||
|
||||
Datasource then shows up in Grafana as whatever name you gave it — build a panel
|
||||
with method `POST`, URL path `/budgets/<sync-id>/run-query`, and an
|
||||
`ActualQLquery` JSON body, e.g. sum of $ per category:
|
||||
|
||||
```json
|
||||
{
|
||||
"ActualQLquery": {
|
||||
"table": "transactions",
|
||||
"groupBy": ["category"],
|
||||
"select": ["category", { "total": { "$sum": "amount" } }]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Keep the panel's refresh interval long (≥1m) — each call is a real login
|
||||
against `actual_server`, same rate-limit risk hit by the exporter earlier.
|
||||
|
||||
**Headlamp login token** (ServiceAccount created by `headlamp/rbac.yaml`):
|
||||
|
||||
```bash
|
||||
|
||||
@@ -25,10 +25,8 @@ spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: external-secrets
|
||||
# Leaf app — manual sync only; root `platform` app-of-apps stays automated.
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- ServerSideApply=true
|
||||
|
||||
@@ -25,10 +25,8 @@ spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: harbor
|
||||
# Leaf app — manual sync only; root `platform` app-of-apps stays automated.
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- SkipDryRunOnMissingResource=true
|
||||
|
||||
@@ -25,10 +25,8 @@ spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: headlamp
|
||||
# Leaf app — manual sync only; root `platform` app-of-apps stays automated.
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- SkipDryRunOnMissingResource=true
|
||||
|
||||
@@ -25,10 +25,8 @@ spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: jenkins
|
||||
# Leaf app — manual sync only; root `platform` app-of-apps stays automated.
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- SkipDryRunOnMissingResource=true
|
||||
|
||||
@@ -36,10 +36,8 @@ spec:
|
||||
jsonPointers:
|
||||
- /spec/rules/0/backendRefs/0/group
|
||||
- /spec/rules/0/backendRefs/0/weight
|
||||
# Leaf app — manual sync only; root `platform` app-of-apps stays automated.
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- ServerSideApply=true
|
||||
|
||||
@@ -3,6 +3,13 @@ grafana:
|
||||
enabled: true
|
||||
storageClassName: nfs-delete
|
||||
size: 5Gi
|
||||
# Installs the Infinity datasource plugin so Grafana can query a plain
|
||||
# REST API (actual-http-api) directly — see README for wiring it up.
|
||||
# The datasource itself (URL + x-api-key) is added by hand in the Grafana
|
||||
# UI, not provisioned here — avoids a second hand-created Secret just for
|
||||
# this one credential.
|
||||
plugins:
|
||||
- yesoreyeram-infinity-datasource
|
||||
|
||||
prometheus:
|
||||
prometheusSpec:
|
||||
|
||||
@@ -25,10 +25,8 @@ spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: sonarqube
|
||||
# Leaf app — manual sync only; root `platform` app-of-apps stays automated.
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- SkipDryRunOnMissingResource=true
|
||||
|
||||
@@ -25,10 +25,8 @@ spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: vault
|
||||
# Leaf app — manual sync only; root `platform` app-of-apps stays automated.
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- SkipDryRunOnMissingResource=true
|
||||
|
||||
Reference in New Issue
Block a user