aenix-io / etcd-operator

New generation community-driven etcd-operator!
https://etcd.aenix.io
Apache License 2.0
82 stars 14 forks source link

Reconciliation does not work for EtcdCluster resources that failed to be created. #159

Closed kvaps closed 4 months ago

kvaps commented 5 months ago

Hey team. Just discovered a bug:

  1. Installed an old version of the operator v0.0.1
  2. Applied an invalid EtcdCluster for it (with podSpec), it started crashing with CrashLoopBackOff - which is okay.
  3. Installed a newer version of the operator v0.1.0, it started up and did not reconcile the previous resource - which is not okay.
  4. Deleted the EtcdCluster and recreated it, now it's working.

Any ideas what the issue might be?

aobort commented 4 months ago

Attempt 1 to reproduce issue:

  1. Checked out to v0.0.1
  2. Deployed with v0.0.1 image using make install deploy (CRD match v0.0.1)
  3. Applied manifest with PodSpec field

Observation: failed to apply (as expected)

Error from server (BadRequest): error when creating "cluster.yaml": EtcdCluster in version "v1alpha1" cannot be handled as a EtcdCluster: strict decoding error: unknown field "spec.podSpec", unknown field "spec.storage.emptyDir"

Attempt 2 to reproduce issue:

  1. Checked out to tag v0.1.0
  2. Deployed with v0.0.1 image using make install deploy (CRD match v0.1.0)
  3. Applied sample manifest with PodTemplate field

Observation: