-
Notifications
You must be signed in to change notification settings - Fork 451
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
TargetAllocator missing scrape configs from ServiceMonitor/PodMonitor when using v1beta1 spec vs v1alpha1 #3528
Comments
I believe this is because you are not setting the TA's selectors to empty as we suggest in the upgrade guide here. When we do the conversion in the operator from v1alpha1 to v1beta1 we set it to the empty selector here. We currently do not default to the empty selector and updated our API docs when we made this change to reflect that. If you try this with setting the selectors to be empty rather than nil, do you get the same result? |
@jaronoff97 Thanks, totally missed that in the docs |
The blog post from september does not mention this as well, I am just stumbling upon this. Of course, it's a blog post from the past, but maybe still makes sense to mention these changes there? |
@lenalebt thanks for sharing! that blog post was written with v1alpha1 which doesn't have this issue (as previously mentioned) so it's still accurate. That being said, it may be worth linking to the upgrade guide for people who read that post and want to use v1beta1. |
Maybe I'm doing something wrong, maybe it just is that I'm using newest versions for deployment, but I'm actually having trouble right now with a targetallocator trying to read those CRDs, but I did not have the CRDs installed, nor gave access to them, which meant it failed. I am using that blog post as a reference. But also, I don't have it fully working yet. Anyways, the ticket here helped me better understand what the problem is :-). |
good to know! I opened up this issue in the community repo, so if you're having trouble following that post it would be great to share your experience and we can improve the docs there too :D |
Component(s)
target allocator
What happened?
Description
Originally deployed a v1beta1 spec and the /scrape_configs endpoint of the TargetAllocator is missing all ServiceMonitor and PodMonitor definitions.
Steps to Reproduce
Collector v1beta1
The operator should have a ServiceMonitor - you could also define an additional ServiceMonitor
Apply all resources
Port forward into the targetallocator service and check the /scrape-configs
Expected Result
I should see the scrape configs for the 2 ServiceMonitors deployed
Actual Result
The scrape configs are missing
Downgrade version to v1alpha1, simply change the spec version and add a pipe after config: and apply
Kubernetes Version
1.30.5
Operator version
0.75.0
Collector version
0.114.1
Environment information
Environment
OS: (e.g., "Ubuntu 20.04") GKE Container OS
Compiler(if manually compiled): (e.g., "go 14.2")
Log output
Additional context
I've reproduced this behavior in multiple clusters, I understand that even the v1alpha1 spec is ultimately saved as v1beta1. I've also deployed a v1beta1 spec over top of v1alpha1 and it resolves as already configured to the operator and doesn't change. But every time I start with the beta spec the target allocator does not work properly it doesn't get any config beyond the static config defined for the collector for scraping and never sees the servicemonitors or pod monitors.
The text was updated successfully, but these errors were encountered: