Open kristeey opened 1 week ago
Hey @kristeey! I'm here to help you with any bugs, questions, or contributions you have. Let's tackle this together!
The scrape_configs_file
attribute in the opentelemetry-kube-stack
Helm chart indeed has limitations when it comes to including external scrape config files, especially when using the chart from a remote repository or as a subchart. This is due to the constraints of the .Files
object in Helm, which cannot access files outside of the Helm chart's directory structure.
However, there are workarounds to include external scrape config files:
Direct Configuration in values.yaml
:
You can directly add your scrape configurations in the values.yaml
file under the config
section. Here is an example:
config:
receivers:
prometheus:
config:
scrape_configs:
- job_name: 'external-scrape-config'
scrape_interval: 15s
static_configs:
- targets: ['example.com:9090']
Customizing the Chart Locally: If you need to include a file, you can clone the chart repository, add your custom scrape config file, and then install the chart locally.
Using ConfigMaps: Another approach is to create a ConfigMap with your scrape configurations and reference it in your Helm chart. This method requires additional setup but can be more flexible.
For more detailed guidance, you can refer to the OpenTelemetry Kubernetes Getting Started Guide [1].
To continue talking to Dosu, mention @dosu.
Hi, Trying out different features in the
opentelemetry-kube-stack
helm chart, and came over thescrape_configs_file
attribute in thecollectors.collectorName
section. This is basically useless unless the user wants to use the default scrape config that comes with the helm chartdeamon_scrape_configs.yaml
or the user clones the chart and installes the helm chart locally. When installing the helm chart using the remote repository it is not possible to include "external" scrape config files into the helm structure (because of helm...). This is also the case when the chart is used as a subchart, and the scrape config files exists in the parent chart. Quoting the helm docs:this is a limitation with the
.Files
object in Helm.