Skip to content

Commit

Permalink
update loki demo, prepare for tag release
Browse files Browse the repository at this point in the history
Signed-off-by: Kristof Gyuracz <[email protected]>
  • Loading branch information
kristofgyuracz committed Sep 19, 2024

Verified

This commit was signed with the committer’s verified signature.
kristofgyuracz Kristóf Gyurácz
1 parent cc11d9e commit 6bb0f7e
Showing 5 changed files with 37 additions and 65 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ KIND_CLUSTER ?= kind
CI_MODE_ENABLED := ""
NO_KIND_CLEANUP := ""

IMG ?= ghcr.io/kube-logging/telemetry-controller:0.0.10
IMG ?= ghcr.io/kube-logging/telemetry-controller:0.0.11
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.28.0

2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -5,4 +5,4 @@ kind: Kustomization
images:
- name: controller
newName: ghcr.io/kube-logging/telemetry-controller
newTag: 0.0.10
newTag: 0.0.11
31 changes: 18 additions & 13 deletions docs/demos/loki/loki_values.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
deploymentMode: SingleBinary
loki:
auth_enabled: false
commonConfig:
replication_factor: 1
storage:
type: 'filesystem'
monitoring:
enabled: false
rules:
enabled: false
selfMonitoring:
enabled: false
grafanaAgent:
installOperator: false
lokiCanary:
enabled: false
storage:
type: 'filesystem'
schemaConfig:
configs:
- from: "2024-01-01"
store: tsdb
index:
prefix: loki_index_
period: 24h
object_store: filesystem # we're storing on filesystem so there's no real persistence here.
schema: v13
singleBinary:
replicas: 1
test:
enabled: false

read:
replicas: 0
backend:
replicas: 0
write:
replicas: 0
54 changes: 12 additions & 42 deletions docs/demos/loki/manifests.yaml
Original file line number Diff line number Diff line change
@@ -22,13 +22,24 @@ kind: Collector
metadata:
name: kubernetes
spec:
#debug: true
debug: true
controlNamespace: collector
tenantSelector:
matchLabels:
collectorLabel: kubernetes
---
apiVersion: telemetry.kube-logging.dev/v1alpha1
kind: Output
metadata:
name: loki
namespace: collector
spec:
otlphttp:
endpoint: http://loki.loki.svc.cluster.local:3100/otlp/
tls:
insecure: true
---
apiVersion: telemetry.kube-logging.dev/v1alpha1
kind: Tenant
metadata:
labels:
@@ -56,17 +67,6 @@ spec:
namespace: collector
---
apiVersion: telemetry.kube-logging.dev/v1alpha1
kind: Output
metadata:
name: loki
namespace: collector
spec:
loki:
endpoint: http://loki.loki.svc.cluster.local:3100/loki/api/v1/push
tls:
insecure: true
---
apiVersion: telemetry.kube-logging.dev/v1alpha1
kind: Tenant
metadata:
labels:
@@ -92,33 +92,3 @@ spec:
namespace: collector
- name: openobserve-2
namespace: collector
---
apiVersion: telemetry.kube-logging.dev/v1alpha1
kind: Output
metadata:
name: openobserve-1
namespace: collector
spec:
otlp:
endpoint: openobserve-otlp-grpc.openobserve.svc.cluster.local:5081
headers:
Authorization: "Basic cm9vdEBleGFtcGxlLmNvbTphUGJUZzljTE9PWFp4SVA1"
organization: demo-1
stream-name: all-logs
tls:
insecure: true
---
apiVersion: telemetry.kube-logging.dev/v1alpha1
kind: Output
metadata:
name: openobserve-2
namespace: collector
spec:
otlp:
endpoint: openobserve-otlp-grpc.openobserve.svc.cluster.local:5081
headers:
Authorization: "Basic cm9vdEBleGFtcGxlLmNvbTphUGJUZzljTE9PWFp4SVA1"
organization: demo-2
stream-name: all-logs
tls:
insecure: true
13 changes: 5 additions & 8 deletions docs/demos/loki/setup.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
#!/bin/bash

helm upgrade --install --namespace loki --create-namespace loki --repo https://grafana.github.io/helm-charts loki --values loki_values.yaml --version 5.38.0
helm upgrade --install --namespace=loki --repo https://grafana.github.io/helm-charts loki-grafana grafana --version 7.0.8
helm upgrade --install --namespace loki --create-namespace loki --repo https://grafana.github.io/helm-charts loki --values loki_values.yaml --version 6.12.0
helm upgrade --install --namespace loki --repo https://grafana.github.io/helm-charts loki-grafana grafana --version 8.5.1

helm upgrade --install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --set installCRDs=true --version v1.13.3
kubectl apply -f https://github.com/open-telemetry/opentelemetry-operator/releases/download/v0.96.0/opentelemetry-operator.yaml
helm upgrade --install --wait --create-namespace --namespace telemetry-controller-system telemetry-controller oci://ghcr.io/kube-logging/helm-charts/telemetry-controller

(cd ../../.. && make install)

kubectl apply -f manifests.yaml

helm upgrade --install --wait log-generator oci://ghcr.io/kube-logging/helm-charts/log-generator -n tenant-loki-1
helm upgrade --install --wait log-generator oci://ghcr.io/kube-logging/helm-charts/log-generator -n tenant-loki-2
helm upgrade --install --wait log-generator oci://ghcr.io/kube-logging/helm-charts/log-generator -n tenant-demo-1
helm upgrade --install --wait log-generator oci://ghcr.io/kube-logging/helm-charts/log-generator -n tenant-demo-2

kubectl get secret -n loki loki-grafana -o jsonpath="{.data.admin-password}" | base64 --decode
echo ""

(cd ../../.. && make run)

0 comments on commit 6bb0f7e

Please sign in to comment.