1
0
Fork 0
Resources for deploying and managing my personal Kubernetes cluster
 
 
 
Go to file
Dustin f468977d91 grafana: Enable send_user_header option
I discovered today that if anonymous Grafana users have Viewer
permission, they can use the Datasource API to make arbitrary queries
to any backend, even if they cannot access the Explore page directly.
This is documented ([issue #48313][0]) as expected behavior.

I don't really mind giving anonymous access to the Victoria Metrics
datasource, but I definitely don't want anonymous users to be able to
make Loki queries and view log data.  Since Grafana Datasource
Permissions is limited to Grafana Enterprise and not available in
the open source version of Grafana, the official recommendation from
upstream is to use a separate Organization for the Loki datasource.
Unfortunately, this would preclude having dashboards that have graphs
from both data sources.  Although I don't have any of those right now, I
like the idea and may build some eventually.

Fortunately, I discovered the `send_user_header` Grafana configuration
option.  With this enabled, Grafana will send an `X-Grafana-User` header
with the username of the user on whose behalf it is making a request to
the backend.  If the user is not logged in, it does not send the header.
Thus, we can detect the presence of this header on the backend and
refuse to serve query requests if it is missing.

[0]: https://github.com/grafana/grafana/issues/48313
2024-02-22 07:10:01 -06:00
argocd step-ca: Redeploy with DCH CA R3 2024-02-22 07:10:01 -06:00
authelia authelia: Allow anonymous access to AlertManager 2024-02-16 20:41:47 -06:00
autoscaler autoscaler: Update to CA 1.26 2024-01-14 11:33:30 -06:00
cert-manager cert-manager: Remove unused secrets 2024-02-16 20:56:08 -06:00
dch-root-ca dch-root-ca: Update to DCH Root CA R3 2024-02-21 09:16:26 -06:00
dch-webhooks dch-webhooks: Disable HTTPS redirect 2024-01-22 16:55:03 -06:00
device-plugins device-plugins: Allow FUSE plugin on Jenkins nodes 2024-02-13 07:56:35 -06:00
docker-distribution docker-distribution: Deploy OCI image registry 2022-07-31 01:15:01 -05:00
dynk8s-provisioner dynk8s-provisioner: Set instance label for Argo CD 2023-10-14 07:43:37 -05:00
firefly-iii firefly-iii: Use a single Data Importer instance 2023-12-10 08:55:20 -06:00
grafana grafana: Enable send_user_header option 2024-02-22 07:10:01 -06:00
home-assistant h-a: Remove roomba_is_downstairs template sensor 2024-01-25 17:31:36 -06:00
hudctrl hudctrl: Update for v0.2.0 2022-12-18 16:26:07 -06:00
ingress home-assistant: Deploy Home Assistant 2023-07-24 17:53:58 -05:00
invoice-ninja invoice-ninja: Update PVC for restored backup 2024-02-15 09:45:57 -06:00
jenkins jenkins: Update to 2.426.2 2024-01-22 18:01:03 -06:00
keyserv keyserv: Add age key for loki0 2024-02-21 09:16:26 -06:00
kitchen kitchen: Fix weather metrics API URI 2024-02-21 08:01:35 -06:00
loki-ca loki-ca: Add cert-manager issuer for Loki CA 2024-02-22 07:10:01 -06:00
metrics metrics: Add role to allow anon access to metrics 2022-11-05 16:23:02 -05:00
ntfy ntfy: Set instance label for Argo CD 2023-10-14 07:28:05 -05:00
paperless-ngx paperless-ngx: Set instance label for Argo CD 2023-10-14 07:33:27 -05:00
photoframesvc photoframesvc: Initial commit 2023-10-14 11:25:50 -05:00
phpipam phpipam: Migrate to Sealed Secrets 2023-10-14 10:56:20 -05:00
postgresql postgresql: Fix pod secrets 2023-10-19 07:12:16 -05:00
prometheus_speedtest prom_speedtest: Add application manifest 2022-08-06 22:21:06 -05:00
rent-reminder rent-reminder: Add CronJob to send reminders 2024-01-04 08:54:54 -06:00
scanservjs scanservjs: Update to v2.27.0 2023-07-08 07:06:10 -05:00
sealed-secrets sealed-secrets: Deploy Bitnami Sealed Secrets 2023-10-13 18:34:01 -05:00
setup setup: ks: Generate iSCSI initiator name 2022-08-23 21:22:01 -05:00
sshca sshca: Set group principals for Server Admins 2024-02-02 21:02:40 -06:00
step-ca step-ca: Redeploy with DCH CA R3 2024-02-22 07:10:01 -06:00
storage home-assistant: Deploy Home Assistant 2023-07-24 17:53:58 -05:00
victoria-metrics v-m: Scrape Grafana Loki 2024-02-21 09:16:26 -06:00
websites websites: Host darkchestofwonders.us in k8s 2024-01-04 08:56:12 -06:00
xactfetch xactfetch: Additional mounts for rbw sync 2024-01-24 12:00:13 -06:00
README.md README: Add storage section 2022-07-31 01:38:46 -05:00

README.md

Dustin's Kubernetes Cluster

This repository contains resources for deploying and managing my on-premises Kubernetes cluster

Cluster Setup

The cluster primarily consists of libvirt/QEMU+KVM virtual machines. The Control Plane nodes are VMs, as are the x86_64 worker nodes. Eventually, I would like to add Raspberry Pi or Pine64 machines as aarch64 nodes.

All machines run Fedora, using only Fedora builds of the Kubernetes components (kubeadm, kubectl, and kubeadm).

See Cluster Setup for details.

Jenkins Agents

One of the main use cases for the Kubernetes cluster is to provide dynamic agents for Jenkins. Using the Kubernetes Plugin, Jenkins will automatically launch worker nodes as Kubernetes pods.

See Jenkins Kubernetes Integration for details.

Persistent Storage

Persistent storage for pods is provided by Longhorn. Longhorn runs within the cluster and provisions storage on worker nodes to make available to pods over iSCSI.

See Persistent Storage Using Longorn for details.