Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[opentelemetry-kube-stack] scrape_configs_file is basically useless #1331

Open
kristeey opened this issue Sep 6, 2024 · 1 comment
Open

Comments

@kristeey
Copy link

kristeey commented Sep 6, 2024

Hi,
Trying out different features in the opentelemetry-kube-stack helm chart, and came over the scrape_configs_file attribute in the collectors.collectorName section. This is basically useless unless the user wants to use the default scrape config that comes with the helm chart deamon_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:

"Files outside of a Helm application subchart, including those of the parent, cannot be accessed"

this is a limitation with the .Files object in Helm.

Copy link

dosubot bot commented Sep 6, 2024

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:

  1. 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']
  2. 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.

  3. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant