fix: update vmselect/vminsert service selector when RequestsLoadBalancer is set#1829
fix: update vmselect/vminsert service selector when RequestsLoadBalancer is set#1829
Conversation
…cer is set Make sure that RequestsLoadBalancer setting changes labels and selector of vminsert/vmselect internal services and points to lb instead of vmselect/vminsert services directly
| } | ||
| }) | ||
| if cr.Spec.RequestsLoadBalancer.Enabled && !cr.Spec.RequestsLoadBalancer.DisableInsertBalancing { | ||
| svc.Name = cr.PrefixedInternalName(vmv1beta1.ClusterComponentInsert) |
There was a problem hiding this comment.
when requests load balancer enabled this service has a different name and vmauth uses it to query insert instances, same is for select, with this change vmauth will be querying itself
There was a problem hiding this comment.
Oh, this changes the internal VMInsert / VMSelect service, which is already pointing to VMInsert / VMInsert. But aren't we creating a new service for LB (in createOrUpdateLBProxyService?) and we should be pointing "external" service to it as well - I can't find the place where this happens
There was a problem hiding this comment.
when requestsloadbalancer is enabled createOrUpdateLBProxyService creates "external" vminsert/vmselect services that target vmauth with the same name as buildVMSelectService/buildVMInsertService create, when requestsLoadBalancer is disabled
There was a problem hiding this comment.
Oh, I see. In that case, #1814 is probably an invalid issue - I'll doublecheck vmauth metrics to see if the traffic is flowing throuigh them correctly
Make sure that RequestsLoadBalancer setting changes labels and selector of vminsert/vmselect internal services and points to lb instead of vmselect/vminsert services directly
Fixes #1814
Summary by cubic
Update vmselect and vminsert internal services to route through the vmauth RequestsLoadBalancer when enabled. This ensures traffic goes via the LB instead of directly to vmselect/vminsert pods.
Written for commit 3e4808f. Summary will update on new commits.