Added loki
This commit is contained in:
parent
53ce8d4343
commit
23690f01db
|
@ -21,7 +21,9 @@ repos:
|
|||
hooks:
|
||||
- id: kubeconform
|
||||
|
||||
- repo: https://github.com/tarioch/flux-check-hook
|
||||
rev: v0.8.0
|
||||
hooks:
|
||||
- id: check-flux-helm-values
|
||||
# Linting does not work with external values.yaml
|
||||
# TODO: Include url to schema in values.yaml and validate based on that?
|
||||
# - repo: https://github.com/tarioch/flux-check-hook
|
||||
# rev: v0.8.0
|
||||
# hooks:
|
||||
# - id: check-flux-helm-values
|
||||
|
|
|
@ -13,6 +13,7 @@ resources:
|
|||
- ./../../../infra/kube-vip
|
||||
- ./../../../infra/kyverno
|
||||
- ./../../../infra/lldap
|
||||
- ./../../../infra/loki
|
||||
- ./../../../infra/node-feature-discovery
|
||||
- ./../../../infra/rook-ceph
|
||||
- ./../../../infra/topolvm
|
||||
|
|
4
infra/loki/kustomization.yaml
Normal file
4
infra/loki/kustomization.yaml
Normal file
|
@ -0,0 +1,4 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./loki.yaml
|
18
infra/loki/loki.yaml
Normal file
18
infra/loki/loki.yaml
Normal file
|
@ -0,0 +1,18 @@
|
|||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: loki
|
||||
namespace: flux-system
|
||||
labels:
|
||||
alert: flux-infra
|
||||
spec:
|
||||
interval: 15m
|
||||
path: ./infra/loki/loki
|
||||
dependsOn:
|
||||
- name: rook-ceph
|
||||
prune: true
|
||||
timeout: 2m
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: flux-system
|
||||
wait: true
|
18
infra/loki/loki/helm-release.yaml
Normal file
18
infra/loki/loki/helm-release.yaml
Normal file
|
@ -0,0 +1,18 @@
|
|||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: loki
|
||||
spec:
|
||||
chart:
|
||||
spec:
|
||||
chart: loki
|
||||
reconcileStrategy: ChartVersion
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: grafana
|
||||
version: 6.29.0
|
||||
interval: 15m
|
||||
timeout: 5m
|
||||
valuesFrom:
|
||||
- kind: ConfigMap
|
||||
name: loki-values
|
7
infra/loki/loki/helm-repository.yaml
Normal file
7
infra/loki/loki/helm-repository.yaml
Normal file
|
@ -0,0 +1,7 @@
|
|||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: HelmRepository
|
||||
metadata:
|
||||
name: grafana
|
||||
spec:
|
||||
interval: 15m
|
||||
url: https://grafana.github.io/helm-charts
|
16
infra/loki/loki/kustomization.yaml
Normal file
16
infra/loki/loki/kustomization.yaml
Normal file
|
@ -0,0 +1,16 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: loki
|
||||
resources:
|
||||
- ./namespace.yaml
|
||||
- ./object-bucket-claim.yaml
|
||||
- ./helm-repository.yaml
|
||||
- ./helm-release.yaml
|
||||
|
||||
configurations:
|
||||
- ../../../common/name-reference/helm-release.yaml
|
||||
|
||||
configMapGenerator:
|
||||
- name: loki-values
|
||||
files:
|
||||
- ./values.yaml
|
4
infra/loki/loki/namespace.yaml
Normal file
4
infra/loki/loki/namespace.yaml
Normal file
|
@ -0,0 +1,4 @@
|
|||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: loki
|
7
infra/loki/loki/object-bucket-claim.yaml
Normal file
7
infra/loki/loki/object-bucket-claim.yaml
Normal file
|
@ -0,0 +1,7 @@
|
|||
apiVersion: objectbucket.io/v1alpha1
|
||||
kind: ObjectBucketClaim
|
||||
metadata:
|
||||
name: loki-bucket
|
||||
spec:
|
||||
generateBucketName: loki
|
||||
storageClassName: ceph-bucket
|
75
infra/loki/loki/values.yaml
Normal file
75
infra/loki/loki/values.yaml
Normal file
|
@ -0,0 +1,75 @@
|
|||
loki:
|
||||
auth_enabled: false
|
||||
|
||||
schemaConfig:
|
||||
configs:
|
||||
- from: "2024-04-01"
|
||||
store: tsdb
|
||||
object_store: s3
|
||||
schema: v13
|
||||
index:
|
||||
prefix: index_
|
||||
period: 24h
|
||||
|
||||
limits_config:
|
||||
split_queries_by_interval: "1h"
|
||||
retention_period: 672h # 28 days retention
|
||||
query_scheduler:
|
||||
max_outstanding_requests_per_tenant: 2048
|
||||
|
||||
storage:
|
||||
type: s3
|
||||
bucketNames:
|
||||
chunks: "${BUCKET_NAME}"
|
||||
ruler: "${BUCKET_NAME}"
|
||||
admin: "${BUCKET_NAME}"
|
||||
s3:
|
||||
# s3 URL can be used to specify the endpoint, access key, secret key, and bucket name this works well for S3 compatible storages or if you are hosting Loki on-premises and want to use S3 as the storage backend. Either use the s3 URL or the individual fields below (AWS endpoint, region, secret).
|
||||
# s3: s3://access_key:secret_access_key@custom_endpoint/bucket_name
|
||||
# AWS endpoint URL
|
||||
endpoint: "${BUCKET_HOST}"
|
||||
# AWS region where the S3 bucket is located
|
||||
region: "${BUCKET_REGION}"
|
||||
# AWS secret access key
|
||||
secretAccessKey: "${AWS_SECRET_ACCESS_KEY}"
|
||||
# AWS access key ID
|
||||
accessKeyId: "${AWS_ACCESS_KEY_ID}"
|
||||
# AWS signature version (e.g., v2 or v4)
|
||||
# signatureVersion: <your-signature-version>
|
||||
# Forces the path style for S3 (true/false)
|
||||
s3ForcePathStyle: true
|
||||
# Allows insecure (HTTP) connections (true/false)
|
||||
insecure: true
|
||||
# HTTP configuration settings
|
||||
# http_config: {}
|
||||
|
||||
backend:
|
||||
replicas: 2
|
||||
|
||||
extraArgs:
|
||||
- -config.expand-env=true
|
||||
extraEnvFrom:
|
||||
- secretRef:
|
||||
name: loki-bucket
|
||||
- configMapRef:
|
||||
name: loki-bucket
|
||||
read:
|
||||
replicas: 2
|
||||
|
||||
extraArgs:
|
||||
- -config.expand-env=true
|
||||
extraEnvFrom:
|
||||
- secretRef:
|
||||
name: loki-bucket
|
||||
- configMapRef:
|
||||
name: loki-bucket
|
||||
write:
|
||||
replicas: 2
|
||||
|
||||
extraArgs:
|
||||
- -config.expand-env=true
|
||||
extraEnvFrom:
|
||||
- secretRef:
|
||||
name: loki-bucket
|
||||
- configMapRef:
|
||||
name: loki-bucket
|
Loading…
Reference in New Issue
Block a user