|
| 1 | +# Vector Agent |
| 2 | + |
| 3 | +[Vector](https://github.com/vectordotdev/vector) is a high-performance |
| 4 | +observability data pipeline that allows you to collect, transform, and route |
| 5 | +all your logs, metrics, and traces. It is designed to be highly efficient and |
| 6 | +reliable, making it a great choice for managing observability data at scale. |
| 7 | + |
| 8 | +## Makefile Overview |
| 9 | + |
| 10 | +This Makefile manages the Loki Helm chart, which simplifies the deployment and |
| 11 | +management of Loki in a Kubernetes environment. The Makefile provides targets |
| 12 | +to automate common tasks such as pulling the latest Loki YAML configuration, |
| 13 | +upgrading Loki, and ensure required tools are present. |
| 14 | + |
| 15 | +## Prerequisites |
| 16 | + |
| 17 | +Before using the Makefile, ensure you have the following tools installed: |
| 18 | + |
| 19 | +- `helm` |
| 20 | + |
| 21 | +### Makefile Targets |
| 22 | + |
| 23 | +- **all**: This is the default target that runs `check-tools`, `clean`, and |
| 24 | +`manifests` targets in sequence. |
| 25 | +- **init**: Adds the Vector Helm repository and updates the Helm repository |
| 26 | +index. |
| 27 | +- **manifests**: Removes the previous Vector Agent YAML file and pulls the |
| 28 | +latest Vector Agent YAML configuration from the Helm chart using the specified |
| 29 | +`values.yaml` file. |
| 30 | +- **upgrade**: Removes the previous Vector Agent YAML file and upgrades the Loki |
| 31 | +deployment using the latest configuration from the Helm chart. |
| 32 | +- **check-tools**: Ensures that the required tools (e.g., Helm) are available |
| 33 | +on the system. |
| 34 | +- **help**: Displays usage information for the Makefile targets. |
| 35 | + |
| 36 | +### Usage |
| 37 | + |
| 38 | +1. **Initialize Helm Repository** |
| 39 | + |
| 40 | + Before using the Makefile, you need to initialize the Helm repository: |
| 41 | + |
| 42 | + ```sh |
| 43 | + make init |
| 44 | + ``` |
| 45 | + |
| 46 | +2. **Generate Vector Agent Manifests** |
| 47 | + |
| 48 | + To generate the Vector Agent YAML configuration file, run: |
| 49 | + |
| 50 | + ```sh |
| 51 | + make manifests |
| 52 | + ``` |
| 53 | + |
| 54 | + This will remove the previous `vector-agent.yaml` file and pull the latest |
| 55 | + configuration from the Helm chart. |
| 56 | + |
| 57 | +3. **Upgrade Vector Agent** |
| 58 | + |
| 59 | + To upgrade the Vector Agent deployment with the latest configuration, run: |
| 60 | + |
| 61 | + ```sh |
| 62 | + make upgrade |
| 63 | + ``` |
| 64 | + |
| 65 | + This will remove the previous `vector-agent.yaml` file and upgrade the Loki deployment. |
| 66 | + |
| 67 | +4. **Check Required Tools** |
| 68 | + |
| 69 | + Ensure the installation of required tools by running: |
| 70 | + |
| 71 | + ```sh |
| 72 | + make check-tools |
| 73 | + ``` |
| 74 | + |
| 75 | + This will check that Helm is available on your system. |
| 76 | + |
| 77 | +5. **Display Help** |
| 78 | + |
| 79 | + To display the help message with information about the Makefile targets, run: |
| 80 | + |
| 81 | + ```sh |
| 82 | + make help |
| 83 | + ``` |
| 84 | + |
| 85 | +### Default Variables |
| 86 | + |
| 87 | +- **DEFAULT_VERSION**: The default version of Vector Agent to use (e.g., |
| 88 | +`0.37.0`). |
| 89 | +- **VECTOR_VERSION**: The version of Vector Agent to use, which can be |
| 90 | +overridden by setting this variable. |
| 91 | +- **VECTOR_AGENT_OUTPUT_YAML**: The output file for the Vector Agent YAML |
| 92 | +configuration (default: `vendor/vector-agent.yaml`). |
| 93 | +- **VALUES_FILE**: The path to the `values.yaml` file used for Helm |
| 94 | +configuration. |
| 95 | + |
| 96 | +### Example |
| 97 | + |
| 98 | +To generate the Vector Agent manifests using a specific version and values |
| 99 | +file, you can run: |
| 100 | + |
| 101 | +```sh |
| 102 | +make VECTOR_VERSION=0.22.1 VALUES_FILE=/path/to/your/values.yaml manifests |
| 103 | +``` |
| 104 | + |
| 105 | +This will pull the specified version of Vector Agent and use the provided |
| 106 | +`values.yaml` file for configuration. |
0 commit comments