Skip to content

Commit

Permalink
feat(helm): install loki
Browse files Browse the repository at this point in the history
  • Loading branch information
willianpaixao committed Apr 11, 2024
1 parent 92bfea9 commit 6d6ad68
Show file tree
Hide file tree
Showing 6 changed files with 142 additions and 3 deletions.
1 change: 1 addition & 0 deletions kubernetes/apps/observability/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ kind: Kustomization
resources:
- ./namespace.yaml
- ./kube-prometheus-stack/ks.yaml
- ./loki/ks.yaml
- ./prometheus-blackbox-exporter/ks.yaml
111 changes: 111 additions & 0 deletions kubernetes/apps/observability/loki/app/helmrelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/helm.toolkit.fluxcd.io/helmrelease_v2beta2.json
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: &app loki
namespace: &namespace observability
spec:
interval: 30m
timeout: 15m
chart:
spec:
chart: loki
version: 6.0.0
sourceRef:
kind: HelmRepository
name: loki
namespace: flux-system
install:
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
strategy: rollback
retries: 3
values:
loki:
commonConfig:
replication_factor: 1
schemaConfig:
configs:
- from: "2020-10-24"
store: tsdb
object_store: filesystem
schema: v13
index:
prefix: index_
period: 24h
storage:
type: 'filesystem'
ingester:
chunk_encoding: snappy
tracing:
enabled: false
querier:
max_concurrent: 2

gateway:
ingress:
enabled: true
hosts:
- host: &host loki.${SECRET_DOMAIN}
paths:
- path: /
pathType: Prefix
tls:
- hosts:
- *host

deploymentMode: SingleBinary
singleBinary:
replicas: 1
resources:
limits:
cpu: 3
memory: 4Gi
requests:
cpu: 2
memory: 2Gi
extraEnv:
- name: GOMEMLIMIT
value: 3750MiB

memberlist:
service:
publishNotReadyAddresses: true

chunksCache:
writebackSizeLimit: 10MB

minio:
enabled: false

backend:
replicas: 0
read:
replicas: 0
write:
replicas: 0
ingester:
replicas: 0
querier:
replicas: 0
queryFrontend:
replicas: 0
queryScheduler:
replicas: 0
distributor:
replicas: 0
compactor:
replicas: 0
indexGateway:
replicas: 0
bloomCompactor:
replicas: 0
chunksCache:
enabled: false
bloomGateway:
replicas: 0

6 changes: 6 additions & 0 deletions kubernetes/apps/observability/loki/app/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./helmrelease.yaml
21 changes: 21 additions & 0 deletions kubernetes/apps/observability/loki/ks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: &app loki
namespace: flux-system
spec:
targetNamespace: observability
commonMetadata:
labels:
app.kubernetes.io/name: *app
path: ./kubernetes/apps/observability/loki/app
prune: true
sourceRef:
kind: GitRepository
name: home-kubernetes
wait: false
interval: 30m
retryInterval: 1m
timeout: 15m
2 changes: 1 addition & 1 deletion kubernetes/flux/repositories/helm/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ resources:
- ./ingress-nginx.yaml
- ./jetstack.yaml
- ./k8s-gateway.yaml
- ./loki.yaml
- ./longhorn.yaml
- ./metrics-server.yaml
- ./openebs.yaml
- ./prometheus-community-charts.yaml
- ./stakater.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: openebs
name: loki
namespace: flux-system
spec:
interval: 1h
url: https://openebs.github.io/charts
url: https://grafana.github.io/helm-charts

0 comments on commit 6d6ad68

Please sign in to comment.