helm-charts icon indicating copy to clipboard operation
helm-charts copied to clipboard

feature: Allow "extraLabels" for vmauth in victoria-metrics-k8s-stack

Open micw opened this issue 5 months ago • 4 comments

Chart name and version, where you feel a lack of requested feature chart: victoria-metrics-k8s-stack version: v0.052.0

Is your feature request related to a problem? Please describe.

VM can replace prometheus in most cases. One corner case is: auto detection by tools like "Lens". This is done by searching for custom labels. The chart lacks support for this for the "vmauth" ressource. So either a custom ressource is needed or the deployment of a separate vmauth instance. See https://github.com/lensapp/lens/issues/5837#issuecomment-2988441760 for an example

Describe the solution you'd like Like vmauth.annotations, also support vmauth.extraLabels

Describe alternatives you've considered Deploy a custom instance of vmauth (either as ressource for the operator or via the vmauth chart)

Additional context Nothing to say here.

micw avatar Jun 19 '25 19:06 micw

have you tried changing .Values.vmauth.spec.serviceSpec.metadata.labels? as it's mentioned in doc all vmauth.spec variables can be found here

AndrewChubatiuk avatar Jun 20 '25 10:06 AndrewChubatiuk

hey @micw have you tried suggestion from comment above?

AndrewChubatiuk avatar Jun 24 '25 13:06 AndrewChubatiuk

That gave me: Error: UPGRADE FAILED: failed to create resource: VMAuth.operator.victoriametrics.com "infra-metrics" is invalid: spec.serviceSpec.spec: Required value

So I tried .Values.vmauth.spec.serviceSpec.**spec.**metadata.labels - that created an additional service but without the labels...

micw avatar Jun 24 '25 14:06 micw

right, serviceSpec is for additional k8s service. please try chart version 0.55.1 and set labels using .Values.vmauth.labels property. this will set labels to all vmauth resources. there's no option at the moment to set labels for vmauth service only.

AndrewChubatiuk avatar Jun 27 '25 10:06 AndrewChubatiuk

hey @micw have you tried latest k8s stack chart version and set .Values.vmauth.labels?

AndrewChubatiuk avatar Jun 30 '25 08:06 AndrewChubatiuk

alternatively you can use a solution from this issue

AndrewChubatiuk avatar Jun 30 '25 09:06 AndrewChubatiuk

closing this as answered, please open a new issue if you still have questions or issues

AndrewChubatiuk avatar Jul 03 '25 06:07 AndrewChubatiuk