Added promtail

This commit is contained in:
Dreaded_X 2025-04-24 17:00:19 +02:00
parent 1729979af8
commit 297e152be4
Signed by: Dreaded_X
GPG Key ID: 5A0CBFE3C3377FAA
5 changed files with 64 additions and 0 deletions

View File

@ -2,3 +2,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
- ./loki.yaml - ./loki.yaml
- ./promtail.yaml

18
infra/loki/promtail.yaml Normal file
View File

@ -0,0 +1,18 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: promtail
namespace: flux-system
labels:
alert: flux-infra
spec:
interval: 15m
path: ./infra/loki/promtail
dependsOn:
- name: loki
prune: true
timeout: 2m
sourceRef:
kind: GitRepository
name: flux-system
wait: true

View File

@ -0,0 +1,18 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: promtail
spec:
chart:
spec:
chart: promtail
reconcileStrategy: ChartVersion
sourceRef:
kind: HelmRepository
name: grafana
version: 6.16.6
interval: 15m
timeout: 5m
valuesFrom:
- kind: ConfigMap
name: promtail-values

View File

@ -0,0 +1,13 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: loki
resources:
- ./helm-release.yaml
configurations:
- ../../../common/name-reference/helm-release.yaml
configMapGenerator:
- name: promtail-values
files:
- ./values.yaml

View File

@ -0,0 +1,14 @@
initContainer:
# -- Specifies whether the init container for setting inotify max user instances is to be enabled
- name: init
# -- Docker registry, image and tag for the init container image
image: docker.io/busybox:1.33
# -- Docker image pull policy for the init container image
imagePullPolicy: IfNotPresent
# -- The inotify max user instances to configure
command:
- sh
- -c
- sysctl -w fs.inotify.max_user_instances=512
securityContext:
privileged: true