Compare commits

3 Commits

Author SHA1 Message Date
951198ffa8 Added loki as grafana datasource
All checks were successful
kustomization/cert-manager/3a682516 reconciliation succeeded
kustomization/node-feature-discovery-rules/3a682516 reconciliation succeeded
kustomization/kyverno/3a682516 reconciliation succeeded
kustomization/rook-ceph/3a682516 reconciliation succeeded
kustomization/akri/3a682516 reconciliation succeeded
kustomization/node-feature-discovery/3a682516 reconciliation succeeded
kustomization/velero/3a682516 reconciliation succeeded
kustomization/flux-system/3a682516 reconciliation succeeded
kustomization/letsencrypt/3a682516 reconciliation succeeded
kustomization/topolvm/3a682516 reconciliation succeeded
kustomization/kyverno-policies/3a682516 reconciliation succeeded
kustomization/rook-ceph-cluster/3a682516 reconciliation succeeded
kustomization/cnpg/3a682516 reconciliation succeeded
kustomization/kube-vip/3a682516 reconciliation succeeded
kustomization/traefik-middleware/3a682516 reconciliation succeeded
kustomization/lldap/3a682516 reconciliation succeeded
kustomization/authelia/3a682516 reconciliation succeeded
kustomization/promtail/3a682516 reconciliation succeeded
kustomization/traefik/3a682516 reconciliation succeeded
kustomization/apps/3a682516 reconciliation succeeded
kustomization/loki/3a682516 reconciliation succeeded
2025-04-24 23:50:14 +02:00
7f78d71d42 Added promtail 2025-04-24 23:50:13 +02:00
23690f01db Added loki 2025-04-24 23:50:09 +02:00
6 changed files with 59 additions and 73 deletions

View File

@@ -65,6 +65,12 @@ spec:
enabled: true enabled: true
existingSecret: grafana-ldap-toml existingSecret: grafana-ldap-toml
sidecar:
datasources:
enabled: true
searchNamespace: ALL
labelValue: "1"
extraSecretMounts: extraSecretMounts:
- name: postgres-app-mount - name: postgres-app-mount
secretName: postgres-app secretName: postgres-app

View File

@@ -3,8 +3,7 @@ kind: Kustomization
namespace: loki namespace: loki
resources: resources:
- ./namespace.yaml - ./namespace.yaml
- ./object-bucket-claim-chunks.yaml - ./object-bucket-claim.yaml
- ./object-bucket-claim-ruler.yaml
- ./helm-repository.yaml - ./helm-repository.yaml
- ./helm-release.yaml - ./helm-release.yaml
@@ -15,3 +14,9 @@ configMapGenerator:
- name: loki-values - name: loki-values
files: files:
- ./values.yaml - ./values.yaml
- name: grafana-datasource
options:
labels:
grafana_datasource: "1"
files:
- ./loki-datasource.yaml

View File

@@ -0,0 +1,8 @@
apiVersion: 1
datasources:
- name: Loki
type: loki
access: proxy
url: http://loki-gateway.loki.svc.cluster.local
uid: "loki"
jsonData: {}

View File

@@ -1,7 +0,0 @@
apiVersion: objectbucket.io/v1alpha1
kind: ObjectBucketClaim
metadata:
name: ruler
spec:
generateBucketName: ruler
storageClassName: ceph-bucket

View File

@@ -1,7 +1,7 @@
apiVersion: objectbucket.io/v1alpha1 apiVersion: objectbucket.io/v1alpha1
kind: ObjectBucketClaim kind: ObjectBucketClaim
metadata: metadata:
name: chunks name: loki-bucket
spec: spec:
generateBucketName: chunks generateBucketName: loki
storageClassName: ceph-bucket storageClassName: ceph-bucket

View File

@@ -1,22 +1,6 @@
global:
extraArgs:
- -config.expand-env=true
extraEnvFrom:
- secretRef:
name: chunks
prefix: CHUNKS_
- configMapRef:
name: chunks
prefix: CHUNKS_
- secretRef:
name: ruler
prefix: RULER_
- configMapRef:
name: ruler
prefix: RULER_
loki: loki:
auth_enabled: false auth_enabled: false
schemaConfig: schemaConfig:
configs: configs:
- from: "2024-04-01" - from: "2024-04-01"
@@ -24,33 +8,32 @@ loki:
object_store: s3 object_store: s3
schema: v13 schema: v13
index: index:
prefix: loki_index_ prefix: index_
period: 24h period: 24h
pattern_ingester:
enabled: true
limits_config: limits_config:
allow_structured_metadata: true split_queries_by_interval: "1h"
volume_enabled: true
retention_period: 672h # 28 days retention retention_period: 672h # 28 days retention
querier: query_scheduler:
max_concurrent: 4 max_outstanding_requests_per_tenant: 2048
storage: storage:
type: s3 type: s3
bucketNames: bucketNames:
chunks: "${CHUNKS_BUCKET_NAME}" chunks: "${BUCKET_NAME}"
ruler: "${RULER_BUCKET_NAME}" ruler: "${BUCKET_NAME}"
admin: "${BUCKET_NAME}"
s3: 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 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 # s3: s3://access_key:secret_access_key@custom_endpoint/bucket_name
# AWS endpoint URL # AWS endpoint URL
endpoint: "${CHUNKS_BUCKET_HOST}" endpoint: "${BUCKET_HOST}"
# AWS region where the S3 bucket is located # AWS region where the S3 bucket is located
region: "${CHUNKS_BUCKET_REGION}" region: "${BUCKET_REGION}"
# AWS secret access key # AWS secret access key
secretAccessKey: "${CHUNKS_SECRET_ACCESS_KEY}" secretAccessKey: "${AWS_SECRET_ACCESS_KEY}"
# AWS access key ID # AWS access key ID
accessKeyId: "${CHUNKS_ACCESS_KEY_ID}" accessKeyId: "${AWS_ACCESS_KEY_ID}"
# AWS signature version (e.g., v2 or v4) # AWS signature version (e.g., v2 or v4)
# signatureVersion: <your-signature-version> # signatureVersion: <your-signature-version>
# Forces the path style for S3 (true/false) # Forces the path style for S3 (true/false)
@@ -59,43 +42,34 @@ loki:
insecure: true insecure: true
# HTTP configuration settings # HTTP configuration settings
# http_config: {} # http_config: {}
# NOTE: Normally these values are set from loki.storage, however we do not use the same credentials so we have to overwrite the values
rulerConfig:
storage:
type: s3
s3:
bucketnames: ${RULER_BUCKET_NAME}
endpoint: ${RULER_BUCKET_HOST}
region: ${RULER_BUCKET_REGION}
secret_access_key: ${RULER_SECRET_ACCESS_KEY}
access_key_id: ${RULER_ACCESS_KEY_ID}
s3forcepathstyle: true
insecure: true
deploymentMode: SimpleScalable
backend: backend:
replicas: 3 replicas: 2
# NOTE: There appears to be an error in the helm chart, it uses extraEnv instead of extraEnvFrom from global extraArgs:
- -config.expand-env=true
extraEnvFrom: extraEnvFrom:
- secretRef: - secretRef:
name: chunks name: loki-bucket
prefix: CHUNKS_
- configMapRef: - configMapRef:
name: chunks name: loki-bucket
prefix: CHUNKS_
- secretRef:
name: ruler
prefix: RULER_
- configMapRef:
name: ruler
prefix: RULER_
read: read:
replicas: 3 replicas: 2
write:
replicas: 3
# Disable minio storage extraArgs:
minio: - -config.expand-env=true
enabled: false 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