terraform/helm/vector-log-agent/README.md
This Helm chart deploys a k8s DaemonSet that collects ALL logs of a k8s cluster via Vector. The logger then sends the logs to any destination Vector Sink of your choice. We also provide some recommended values for the sink configuration of some sinks. This chart is relatively generic and contains very little Aptos specific logic, except for some minor transforms under files/vector-transforms.yaml.
my-values.yaml to configure your sink. (check ./example-values for example configs.)helm upgrade vector --install --namespace vector --create-namespace ./ --values my-values.yamlhelm upgrade --install vector --namespace vector --create-namespace ./ --values ./example-values/humio-sink.yaml --set k8sCluster=<cluster_name> --set-string secretVars.humio-credentials.HUMIO_TOKEN="<humio_token"
| Key | Type | Default | Description |
|---|---|---|---|
| image.pullPolicy | string | "IfNotPresent" | |
| image.repository | string | "timberio/vector" | |
| image.tag | string | "0.34.X-distroless-libc" | |
| k8sCluster | string | "my_blockchain_cluster" | human readible name of the kubernetes cluster this is being deployed to. This will be added as field k8s.cluster=<cluster_name> into each log event |
| loggingSinks | object | {} | Choose any (you can choose multiple) logging sinks supported by vector as found here https://vector.dev/docs/reference/configuration/sinks/ |
| secretVars | object | {} | secret environment variables to pass to the deployment |
kubectl exec -it <name_of_a_vector_pod> -- vector topThe directory testing contains some sample data and utility scripts to run vector locally and transform some test data.
This is useful to iterate on the parser, especially the remap transforms and see the output without redeploying vector every time.
local testing:
./testing/test-transforms.sh - pipes test1.json and test2.json files to vector and prints the transformed output to stdout
./testing/validate.sh - runs vector validate to statically verify the correctness of the configuration
quick local rendering (bypassing terraform):
helm template --namespace vector ./ --values ./example-values/humio-sink.yaml --set k8sCluster=<cluster_name> --set-string secretVars.humio-credentials.HUMIO_TOKEN="<humio_token" > rendered.yaml
helm upgrade --install vector --namespace vector --create-namespace ./ --values ./example-values/humio-sink.yaml --set k8sCluster=<cluster_name> --set-string secretVars.humio-credentials.HUMIO_TOKEN="<humio_token"