Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(ruka/loki,promtail) Add observability fleet on Ruka #640

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions fleet/s/dev/c/ruka/observability/fleet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
defaultNamespace: monitoring
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets install loki into a ns named loki to be consistent with the mimir deployment.

helmCharts:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a valid key in a fleet.yaml file. https://fleet.rancher.io/ref-fleet-yaml

- name: loki
repo: https://grafana.github.io/helm-charts
chart: loki
version: 5.8.4
valuesFiles:
- loki/values.yaml
- name: promtail
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fleet does not support multiple charts in the same bundle.

repo: https://grafana.github.io/helm-charts
chart: promtail
version: 6.11.1
valuesFiles:
- promtail/values.yaml
52 changes: 52 additions & 0 deletions fleet/s/dev/c/ruka/observability/loki/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# loki/values.yaml
config:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only config I see in the values.yaml is loki.confg. https://github.com/grafana/loki/blob/main/production/helm/loki/values.yaml#L127

auth_enabled: false
server:
http_listen_port: 3100

storage_config:
aws:
s3: s3://s3.ruka.dev.lsst.org
endpoint: http://rook-ceph-rgw-lfa.rook-ceph.svc.cluster.local:80
region: us-east-1
access_key_id: ${ACCESS_KEY_ID}
secret_access_key: ${SECRET_ACCESS_KEY}
s3forcepathstyle: true
insecure: true
boltdb_shipper:
active_index_directory: /data/loki/index
shared_store: s3

schema_config:
configs:
- from: "2022-01-01"
store: boltdb-shipper
object_store: s3
schema: v11
index:
prefix: loki_index_
period: 168h

limits_config:
enforce_metric_name: false
reject_old_samples: true
reject_old_samples_max_age: 168h

extraEnv:
- name: ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: rook-ceph-object-user-rook-ceph-loki
key: access_key_id
- name: SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: rook-ceph-object-user-rook-ceph-loki
key: secret_access_key

persistence:
enabled: true
storageClassName: <your-storage-class>
accessModes:
- ReadWriteOnce
size: 10Gi
34 changes: 34 additions & 0 deletions fleet/s/dev/c/ruka/observability/promtail/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# promtail/values.yaml
config:
server:
http_listen_port: 9080
grpc_listen_port: 0 # Disable if not needed

positions:
filename: /run/promtail/positions.yaml
clients:
- url: http://loki.monitoring.svc.cluster.local:3100/loki/api/v1/push

scrape_configs:
- job_name: syslog
syslog:
listen_address:"0.0.0.0:1514"
label_structured_data: true
labels:
job:"syslog"
relabel_configs:
- source_labels: ["__syslog_message_hostname]
target_label:"host"

extraPorts:
- name: syslog
containerPort: 1514
protocol: TCP

service:
type: LoadBalancer
ports:
- name: syslog
port: 1514
targetPort: syslog
protocol: TCP
Loading