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

Possibility to target VMuser on VLogs #1241

Open
tropnikovvl opened this issue Feb 19, 2025 · 3 comments
Open

Possibility to target VMuser on VLogs #1241

tropnikovvl opened this issue Feb 19, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@tropnikovvl
Copy link

tropnikovvl commented Feb 19, 2025

At the moment such a design is not possible

kind: VMUser
apiVersion: operator.victoriametrics.com/v1beta1
metadata:
  name: vlogs
  namespace: vlogs
spec:
  username: simple-user
  password: simple-password
  targetRefs:
     - crd:
         kind: VLogs
         name: vlogs
         namespace: vlogs
       paths: ["/insert/loki/api/v1/push"]

VMUser.operator.victoriametrics.com "simple-user" is invalid: spec.targetRefs[0].crd.kind: Unsupported value: "VLogs": supported values: "VMAgent", "VMAlert", "VMSingle", "VMAlertManager", "VMAlertmanager", "VMCluster/vmselect", "VMCluster/vmstorage", "VMCluster/vminsert"

and I have to use this.

kind: VMUser
apiVersion: operator.victoriametrics.com/v1beta1
metadata:
  name: vlogs
  namespace: vlogs
spec:
  username: simple-user
  password: simple-password
  targetRefs:
    - static:
        url: http://vlogs-vlogs.vlogs.svc.cluster.local:9428
      paths: ["/insert/loki/api/v1/push"]
@f41gh7
Copy link
Collaborator

f41gh7 commented Feb 19, 2025

Did you try it with the latest v0.53.0 release https://github.com/VictoriaMetrics/operator/releases/tag/v0.53.0? It's required to perform CRD definitions update.

@f41gh7 f41gh7 added the question Further information is requested label Feb 19, 2025
@tropnikovvl
Copy link
Author

tropnikovvl commented Feb 19, 2025

Hi @f41gh7

I use latest version vm/victoria-metrics-k8s-stack and there is already this update, I noticed that for some reason when updating the chart, the CRDs were not updated (I use the default parameters for the CRD deployment).
Thanks for the tip, I'll go and see what could have gone wrong.

Issue can be closed.

ref VictoriaMetrics/helm-charts#2001

@tropnikovvl
Copy link
Author

Hi @f41gh7 ,

I updated CRD,operator version is 0.53.0 and the problem is still with me

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.16.5
    helm.sh/resource-policy: keep
    meta.helm.sh/release-name: vm
    meta.helm.sh/release-namespace: vm
  creationTimestamp: "2025-01-29T10:50:52Z"
  generation: 2
  labels:
    app.kubernetes.io/instance: vm
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: victoria-metrics-operator
    app.kubernetes.io/version: v0.53.0
    helm.sh/chart: victoria-metrics-operator-0.42.0
    helm.toolkit.fluxcd.io/name: vm
    helm.toolkit.fluxcd.io/namespace: vm
  name: vmusers.operator.victoriametrics.com
  resourceVersion: "301598206"
  uid: 3068f23b-ff70-47f0-993c-186cfa78ad5d
spec:
  conversion:
    strategy: None
  group: operator.victoriametrics.com
  names:
    kind: VMUser
    listKind: VMUserList
    plural: vmusers
    singular: vmuser

VMUser/vlogs/simple-user dry-run failed (Forbidden): admission webhook "vmuser.victoriametrics.com" denied the request: unsupported crd.kind for target ref, got: VLogs, want one of: VMAgent,VMAlert,VMAlertmanager,VMSingle,VMCluster/vmselect,VMCluster/vminsert,VMCluster/vmstorage

@f41gh7 f41gh7 added bug Something isn't working and removed question Further information is requested labels Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants