minio / operator

Simple Kubernetes Operator for MinIO clusters :computer:
https://min.io/docs/minio/kubernetes/upstream/index.html
GNU Affero General Public License v3.0
1.22k stars 455 forks source link

fix: empty tenant log #2324

Closed jiuker closed 1 month ago

jiuker commented 1 month ago

When update failed, tenant will reset to the default one without any information

minio-operator-bdb6b4f55-bkdg7 operator E0909 07:20:34.734171       1 main-controller.go:1570] error syncing '/': resource name may not be empty
minio-operator-bdb6b4f55-bkdg7 operator E0909 07:21:34.735160       1 main-controller.go:1570] error syncing '/': resource name may not be empty
minio-operator-bdb6b4f55-bkdg7 operator E0909 07:22:34.736224       1 main-controller.go:1570] error syncing '/': resource name may not be empty
minio-operator-bdb6b4f55-bkdg7 operator E0909 07:23:34.737242       1 main-controller.go:1570] error syncing '/': resource name may not be empty
minio-operator-bdb6b4f55-bkdg7 operator E0909 07:24:34.737571       1 main-controller.go:1570] error syncing '/': resource name may not be empty
jiuker commented 1 month ago

LGTM, but what could be the reason of updating pool status to fail?

Update conflicts

ramondeklein commented 1 month ago

Wouldn't skipping this result in an improper status? Shouldn't we retry determining the status if it hits a conflict?

But this PR is better than before, so let's merge it anyway...

jiuker commented 1 month ago

Wouldn't skipping this result in an improper status? Shouldn't we retry determining the status if it hits a conflict?

But this PR is better than before, so let's merge it anyway...

Yes, the tenant will be empty here, and the outermost layer will pass the tenant to the syncHandler for further processing