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

Operator doesn't watch changes to tenant configSecret #2392

Open
Starttoaster opened this issue Feb 6, 2025 · 0 comments
Open

Operator doesn't watch changes to tenant configSecret #2392

Starttoaster opened this issue Feb 6, 2025 · 0 comments

Comments

@Starttoaster
Copy link

Starttoaster commented Feb 6, 2025

Expected Behavior

Operator would watch changes to the configSecret Secret defined in the helm values for a tenant, and trigger the tenant reconciler when a change is made.

Current Behavior

Operator doesn't watch changes to the configSecret Secret, and you need to restart the operator Pod for it to recognize the Secret changed.

Possible Solution

Haven't looked at this operator's code too deeply. But I know it's possible in the kubebuilder framework to watch changes on specific Secrets in the cluster. Or even non-specific Secrets in specific namespaces.

Steps to Reproduce (for bugs)

Deploy a tenant using the helm chart with values that contain this (not a complete values yaml file):

tenant:
  configSecret:
    name: myminio-env-configuration
    accessKey: ""
    secretKey: ""

Noting the (in my case accidentally) empty accessKey and secretKey.

If you attempt to look at the tenant in this state with kubectl, it will say:

~ kubectl get tenants
NAME      STATE                      HEALTH   AGE
primary   empty tenant credentials            3h

Then redeploy it with filled in values:

tenant:
  configSecret:
    name: myminio-env-configuration
    accessKey: "testkeydonotuse"
    secretKey: "testsecretkeydonotuse"

Observe that the operator doesn't recognize the change. Inspecting the tenant will still show its state is empty tenant credentials.

Delete the operator Pod (whichever one is the currently elected leader) and observe that the new operator Pod recognizes the Secret change and the tenant starts deploying properly.

Context

This is a pretty low priority issue, I would think. But still strikes me as something worthy of calling out.

Regression

Likely not a regression, probably just an edge case nobody thought about.

Your Environment

  • Version used (minio-operator): v7.0.0
  • Environment name and version (e.g. kubernetes v1.17.2): k8s 1.32.1
  • Server type and version: 1.32.1
  • Operating System and version (uname -a):
  • Link to your deployment file:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant