add config sketch for setting up vector on minikube

This commit is contained in:
gmega 2025-01-07 18:46:35 -03:00
parent 48a1d1a458
commit d417f55ffd
No known key found for this signature in database
GPG Key ID: 6290D34EAD824B18
3 changed files with 65 additions and 0 deletions

2
k8s/local/README.md Normal file
View File

@ -0,0 +1,2 @@
Configurations which can be applied to a local k8s cluster like Minikube or Kind so that experiment logs can be collected for later parsing. This is a simple version of what one would do in a real cluster: use a log collector and ship everything onto external storage or a service like Logstash.

View File

@ -0,0 +1,25 @@
# We need a persistent volume for Vector to collec the logs, which will then be accessible
# to the log parser.
apiVersion: v1
kind: PersistentVolume
metadata:
name: codex-workflow-logs-pv
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteMany
hostPath:
path: /mnt/codex-workflow-logs
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: codex-workflow-logs-pvc
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 10Gi

View File

@ -0,0 +1,38 @@
role: "Agent"
service:
enabled: false
extraVolumes:
- name: vector-logs
persistentVolumeClaim:
claimName: codex-workflow-logs-pvc
extraVolumeMounts:
- name: vector-logs
mountPath: /vector-logs
customConfig:
data_dir: /var/lib/vector
sources:
benchmark-experiments-source:
type: kubernetes_logs
extra_label_selector: "app.kubernetes.io/name=codex-benchmarks"
node_annotation_fields:
node_labels: ""
pod_annotation_fields:
container_id: ""
container_image: ""
container_image_id: ""
pod_node_name: ""
pod_owner: ""
pod_uid: ""
pod_ip: ""
pod_ips: ""
sinks:
output:
type: file
inputs: [benchmark-experiments-source]
path: "/vector-logs/benchmarks-%Y-%m-%d.jsonl"
encoding:
codec: json