adding loki and fixing version
This commit is contained in:
12
README.md
12
README.md
@@ -27,7 +27,7 @@ Also, the repository name is a reference to my local TLD which is `.haven` :)
|
|||||||
- AdGuardHome-2 (2nd instance)
|
- AdGuardHome-2 (2nd instance)
|
||||||
- AdGuard-Sync
|
- AdGuard-Sync
|
||||||
- infra
|
- infra
|
||||||
- Haven Notify (my own internal service)
|
- [Haven Notify](https://git.ivanch.me/ivanch/server-scripts/src/branch/main/haven-notify)
|
||||||
- Beszel
|
- Beszel
|
||||||
- Beszel Agent (running as DaemonSet)
|
- Beszel Agent (running as DaemonSet)
|
||||||
- Code Config (vscode for internal config editing)
|
- Code Config (vscode for internal config editing)
|
||||||
@@ -35,6 +35,13 @@ Also, the repository name is a reference to my local TLD which is `.haven` :)
|
|||||||
- dev
|
- dev
|
||||||
- Gitea Runner (x64)
|
- Gitea Runner (x64)
|
||||||
- Gitea Runner (arm64)
|
- Gitea Runner (arm64)
|
||||||
|
- monitoring
|
||||||
|
- Grafana
|
||||||
|
- Prometheus
|
||||||
|
- Node Exporter
|
||||||
|
- Kube State Metrics
|
||||||
|
- Loki
|
||||||
|
- Alloy
|
||||||
|
|
||||||
#### Miscellaneous namespaces
|
#### Miscellaneous namespaces
|
||||||
|
|
||||||
@@ -50,3 +57,6 @@ Also, the repository name is a reference to my local TLD which is `.haven` :)
|
|||||||
- Move uptimekuma to `infra` namespace
|
- Move uptimekuma to `infra` namespace
|
||||||
- Add links to each application docs
|
- Add links to each application docs
|
||||||
- Add links to server scripts
|
- Add links to server scripts
|
||||||
|
- Move alloy to `monitoring` namespace
|
||||||
|
- Change `loki`, `grafana`, and `prometheus` to Helm chart installation
|
||||||
|
- Change loki and prometheus to use PVCs
|
||||||
@@ -15,9 +15,18 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: beszel
|
app: beszel
|
||||||
spec:
|
spec:
|
||||||
|
affinity:
|
||||||
|
nodeAffinity:
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: kubernetes.io/arch
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- amd64
|
||||||
containers:
|
containers:
|
||||||
- name: beszel
|
- name: beszel
|
||||||
image: ghcr.io/henrygd/beszel/beszel:14.1
|
image: ghcr.io/henrygd/beszel/beszel:0.14.1
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8090
|
- containerPort: 8090
|
||||||
|
|||||||
101
monitoring/loki.yaml
Normal file
101
monitoring/loki.yaml
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: loki
|
||||||
|
namespace: monitoring
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: loki
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: loki
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: loki
|
||||||
|
image: grafana/loki:3
|
||||||
|
args: ["-config.file=/etc/loki/config/config.yaml"]
|
||||||
|
ports:
|
||||||
|
- containerPort: 3100
|
||||||
|
volumeMounts:
|
||||||
|
- name: config
|
||||||
|
mountPath: /etc/loki/config
|
||||||
|
- name: loki-storage
|
||||||
|
mountPath: /tmp/loki
|
||||||
|
volumes:
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: loki-config
|
||||||
|
- name: loki-storage
|
||||||
|
emptyDir:
|
||||||
|
medium: Memory
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: loki-config
|
||||||
|
namespace: monitoring
|
||||||
|
data:
|
||||||
|
config.yaml: |
|
||||||
|
auth_enabled: true
|
||||||
|
server:
|
||||||
|
http_listen_port: 3100
|
||||||
|
|
||||||
|
common:
|
||||||
|
ring:
|
||||||
|
instance_addr: 127.0.0.1
|
||||||
|
kvstore:
|
||||||
|
store: inmemory
|
||||||
|
replication_factor: 1
|
||||||
|
path_prefix: /tmp/loki
|
||||||
|
querier:
|
||||||
|
multi_tenant_queries_enabled: true
|
||||||
|
|
||||||
|
schema_config:
|
||||||
|
configs:
|
||||||
|
- from: "2024-01-01"
|
||||||
|
store: tsdb
|
||||||
|
object_store: filesystem
|
||||||
|
schema: v13
|
||||||
|
index:
|
||||||
|
prefix: index_
|
||||||
|
period: 24h
|
||||||
|
|
||||||
|
storage_config:
|
||||||
|
tsdb_shipper:
|
||||||
|
active_index_directory: /tmp/loki/index
|
||||||
|
cache_location: /tmp/loki/cache
|
||||||
|
filesystem:
|
||||||
|
directory: /tmp/loki/chunks
|
||||||
|
|
||||||
|
limits_config:
|
||||||
|
allow_structured_metadata: true
|
||||||
|
retention_period: 0
|
||||||
|
|
||||||
|
ingester:
|
||||||
|
lifecycler:
|
||||||
|
ring:
|
||||||
|
kvstore:
|
||||||
|
store: inmemory
|
||||||
|
replication_factor: 1
|
||||||
|
chunk_idle_period: 1m
|
||||||
|
max_chunk_age: 5m
|
||||||
|
chunk_target_size: 1536000
|
||||||
|
|
||||||
|
compactor:
|
||||||
|
retention_enabled: false
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: loki
|
||||||
|
namespace: monitoring
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 3100
|
||||||
|
targetPort: 3100
|
||||||
|
name: http
|
||||||
|
selector:
|
||||||
|
app: loki
|
||||||
Reference in New Issue
Block a user