Skip to content

Commit

Permalink
doc: explain that custom.yaml should be used for template customizati…
Browse files Browse the repository at this point in the history
…on (#3353)
  • Loading branch information
cgrinds authored Dec 5, 2024
1 parent 50485f3 commit ca49d32
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
7 changes: 4 additions & 3 deletions docs/configure-templates.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
## Customization of templates
## Templates customization

This document covers how to use [Collector](configure-templates.md#collector-templates)
and [Object](configure-templates.md#object-templates) templates to extend Harvest with `custom.yaml`.
Customization of templates must follow the `custom.yaml` approach to avoid overwrite.
and [Object](configure-templates.md#object-templates) templates to extend Harvest.
Customization of templates should use the `custom.yaml` approach
to avoid overwriting your changes when Harvest is upgraded, or you rerun the `generate` command.

1. [How to add a new object template via custom.yaml](configure-templates.md#create-a-new-object-template)
2. [How to extend an existing object template via custom.yaml](configure-templates.md#extend-an-existing-object-template)
Expand Down
9 changes: 6 additions & 3 deletions docs/install/containers.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,13 @@ password: admin
### How do I add a new poller?
Note: All of your template customizations should follow the custom.yaml approach
mentioned in [template customization](../configure-templates.md#templates-customization),
otherwise any changes you've made in the `conf` directory will be overwritten.
1. Add poller to `harvest.yml`
2. All your template customization must follow the custom.yaml approach as mentioned in [Customization of templates](../configure-templates.md#customization-of-templates), Else they would be overwritten.
3. Regenerate compose file by running [harvest generate](#generate-a-docker-compose-for-your-pollers)
4. Run [docker compose up](#start-everything), for example,
2. Regenerate compose file by running [harvest generate](#generate-a-docker-compose-for-your-pollers)
3. Run [docker compose up](#start-everything), for example,
```bash
docker compose -f prom-stack.yml -f harvest-compose.yml up -d --remove-orphans
Expand Down
9 changes: 6 additions & 3 deletions docs/install/harvest-containers.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,13 @@ docker compose -f harvest-compose.yml up -d --remove-orphans

### How do I add a new poller?

Note: All of your template customizations should follow the custom.yaml approach
mentioned in [template customization](../configure-templates.md#templates-customization),
otherwise any changes you've made in the `conf` directory will be overwritten.

1. Add poller to `harvest.yml`
2. All your template customization must follow the custom.yaml approach as mentioned in [Customization of templates](../configure-templates.md#customization-of-templates), Else they would be overwritten.
3. Regenerate compose file by running [harvest generate](#generate-a-docker-compose-for-your-pollers)
4. Run [docker compose up](#start-everything), for example,
2. Regenerate compose file by running [harvest generate](#generate-a-docker-compose-for-your-pollers)
3. Run [docker compose up](#start-everything), for example,

```bash
docker compose -f harvest-compose.yml up -d --remove-orphans
Expand Down

0 comments on commit ca49d32

Please sign in to comment.