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

Customizing prometheus configuration fails with MountVolume issue #1451

Closed
abouchama opened this issue May 6, 2020 · 3 comments
Closed

Customizing prometheus configuration fails with MountVolume issue #1451

abouchama opened this issue May 6, 2020 · 3 comments
Assignees
Labels
kind/bug Something isn't working
Milestone

Comments

@abouchama
Copy link

abouchama commented May 6, 2020

When we enable the trait --trait prometheus.configmap=prometheus-vol fails with the following error:

Unable to attach or mount volumes: unmounted volumes=[i-resource-000], unattached volumes=[i-resource-000 prometheus-vol default-token-jpfxv i-source-000]: timed out waiting for the condition

Reproducer:

# https://github.com/abouchama/fusedashboard/blob/master/prometheus-jmx-exporter.yaml
oc create configmap prometheus-vol --from-file=prometheus-jmx-exporter.yaml

kamel run --name greetings --configmap=prometheus-vol --dependency=camel-rest --dependency camel-undertow --property camel.rest.port=8080 --open-api greetings-api.json --trait prometheus.enabled=true --trait prometheus.configmap=prometheus-vol --trait prometheus.service-monitor=true --trait prometheus.service-monitor-labels=app=greetings greetings.groovy
@nicolaferraro nicolaferraro added this to the 1.0.0 milestone May 6, 2020
@nicolaferraro nicolaferraro added the kind/bug Something isn't working label May 6, 2020
@nicolaferraro nicolaferraro self-assigned this May 6, 2020
@nicolaferraro
Copy link
Member

@abouchama I think the problem here is that the root property in the prometheus configmap is called rules, while Camel K expects it to be called content.

Can you verify?

@abouchama
Copy link
Author

Strange, I have changed rules with content and even though the same error:

MountVolume.SetUp failed for volume "i-resource-000" : configmap references non-existent config key: content

@abouchama
Copy link
Author

abouchama commented May 6, 2020

Got it, we have to change the filename with content in the configmap
e.g;
from

data:
  prometheus-config.yaml: |

to

data:
  content: |

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants