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

VMOperator drops Ingress created without using it #758

Open
thunderbird86 opened this issue Sep 20, 2023 · 2 comments
Open

VMOperator drops Ingress created without using it #758

thunderbird86 opened this issue Sep 20, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@thunderbird86
Copy link
Contributor

Describe the bug

VMOperator drops Ingress created without using it if it has the same name as an operator-managed resource. Probably it can be related not only to Ingress but to other resources too

To Reproduce

Deploy resource using VMOperater e.g. vmauth

apiVersion: operator.victoriametrics.com/v1beta1
kind: VMAuth
metadata:
  name: vmauth-sample
spec:
  replicaCount: 1
  resources:
    limits:
      cpu: 500m
      memory: 850Mi
    requests:
      cpu: 250m
      memory: 350Mi
  selectAllByDefault: true

Deploy Ingress using kubectl

---
apiVersion: v1
kind: Service
metadata:
  name: vmauth-sample
spec:
  type: ClusterIP
  ports:
    - name: service
      port: 8427
      protocol: TCP
      targetPort: 8427
  selector:
    app.kubernetes.io/name: vmauth

Expectation

Both resources work fine

Actual Result

VMOperator drops ingress

@Amper Amper self-assigned this Sep 20, 2023
@f41gh7 f41gh7 added the bug Something isn't working label Sep 21, 2023
@f41gh7
Copy link
Collaborator

f41gh7 commented Sep 21, 2023

It would be great to store dynamic linked resources ( ingress, hpa, psp, pdb, rbac policy) at resource annotation. And perform 3-way merge ( new config state, cluster config state, annotations config state) like kubectl does.

@user81230
Copy link

Finally, I found the cause of VMOperator dropping my ingresses. This affected us too, and renaming ingresses solved the problem. Maybe it is a good practice to give all the resources unique names, regardless of their kind.

I suggest parsing Kubernetes resources together with their name (like "ingress/vmauth-sample" instead of just "vmauth-sample") in the operator's internals.

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

4 participants