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

metadata.resourceVersion: Invalid value: \"\" #1200

Closed
jicki opened this issue Dec 21, 2024 · 4 comments
Closed

metadata.resourceVersion: Invalid value: \"\" #1200

jicki opened this issue Dec 21, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@jicki
Copy link

jicki commented Dec 21, 2024

{"level":"info","ts":"2024-12-21T06:34:46Z","logger":"controller.VMAlert","msg":"updating service vmalert-victoria-metrics-cluster configuration, is_current_equal=false, is_prev_equal=true, is_prev_nil=false","vmalert":"victoria-metrics-cluster","namespace":"monitor-system"} {"level":"error","ts":"2024-12-21T06:34:46Z","logger":"manager","msg":"Reconciler error","controller":"vmalert","controllerGroup":"operator.victoriametrics.com","controllerKind":"VMAlert","VMAlert":{"name":"victoria-metrics-cluster","namespace":"monitor-system"},"namespace":"monitor-system","name":"victoria-metrics-cluster","reconcileID":"112e8f65-2bca-46ea-80cc-6ea1071628b5","error":"cannot reconcile service for vmalert: Service \"vmalert-victoria-metrics-cluster\" is invalid: metadata.resourceVersion: Invalid value: \"\": must be specified for an update"}

{"level":"error","ts":"2024-12-21T06:33:59Z","logger":"manager","msg":"Reconciler error","controller":"vmagent","controllerGroup":"operator.victoriametrics.com","controllerKind":"VMAgent","VMAgent":{"name":"victoria-metrics-cluster","namespace":"monitor-system"},"namespace":"monitor-system","name":"victoria-metrics-cluster","reconcileID":"64b04744-1271-4826-b6e0-cdea676a8a8e","error":"cannot reconcile service for vmagent: Service \"vmagent-victoria-metrics-cluster\" is invalid: metadata.resourceVersion: Invalid value: \"\": must be specified for an update"}

get service

kubectl -n monitor-system get service vmagent-victoria-metrics-cluster -o yaml
apiVersion: v1
kind: Service
metadata:
  annotations:
    meta.helm.sh/release-name: vm-cluster
    meta.helm.sh/release-namespace: monitor-system
  creationTimestamp: "2024-12-21T06:19:38Z"
  finalizers:
  - apps.victoriametrics.com/finalizer
  labels:
    app.kubernetes.io/component: monitoring
    app.kubernetes.io/instance: victoria-metrics-cluster
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: vmagent
    managed-by: vm-operator
  name: vmagent-victoria-metrics-cluster
  namespace: monitor-system
  ownerReferences:
  - apiVersion: operator.victoriametrics.com/v1beta1
    blockOwnerDeletion: true
    controller: true
    kind: VMAgent
    name: victoria-metrics-cluster
    uid: a3538539-24f1-4b4f-bd62-8091f0ea3492
  resourceVersion: "1456119786"
  selfLink: /api/v1/namespaces/monitor-system/services/vmagent-victoria-metrics-cluster
  uid: a1ad4de8-6f07-43ae-87b5-e876be60b04f
@f41gh7
Copy link
Collaborator

f41gh7 commented Dec 21, 2024

Hello, could you please share your kubernetes cluster version?

@f41gh7 f41gh7 added the bug Something isn't working label Dec 21, 2024
@jicki
Copy link
Author

jicki commented Dec 23, 2024

Hello, could you please share your kubernetes cluster version?

kubernetes cluster version v1.17.6

f41gh7 added a commit that referenced this issue Dec 23, 2024
metadata.resourceVersion should be kept for backward backward-compatibility with older Kubernetes cluster version.

 For instance, any Kubernetes version requires `resourceVersion` to be set for `PodDisruptionBudget`.

 Kubernetes versions before v1.23 requires `resourceVersion` for `Service`.

 This commit copies significant metadata fields:
 - generation
 - resourceVersion
 - creationTimestamp

 for `Update` API requests.

 Related issue:
#1200

Signed-off-by: f41gh7 <[email protected]>
@f41gh7
Copy link
Collaborator

f41gh7 commented Dec 23, 2024

Hello, could you please share your kubernetes cluster version?

kubernetes cluster version v1.17.6

Thanks! An Issue seems to be related to the old Kubernetes version, before v1.23 version API server requires metadata.resourceVersion to be set.

This issue will be fixed at upcoming v0.51.2 bugfix release

@f41gh7 f41gh7 added the waiting for release The change was merged to upstream, but wasn't released yet. label Dec 23, 2024
@f41gh7
Copy link
Collaborator

f41gh7 commented Dec 24, 2024

The issue was fixed at v0.51.2 release

@f41gh7 f41gh7 closed this as completed Dec 24, 2024
@f41gh7 f41gh7 removed the waiting for release The change was merged to upstream, but wasn't released yet. label Dec 24, 2024
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