-
Notifications
You must be signed in to change notification settings - Fork 455
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
fix: correctly validate root credentials from secret #2056
Conversation
I cannot reproduce this issue and never seen it before. All I see is this log from sidecar:
How exactly are you deploying it? |
Please look at Helm Steps for latest version: https://github.com/minio/operator/wiki/Deploy-Operator-with-Helm
helm install \
--namespace minio-operator \
--create-namespace \
minio-operator ./operator-5.0.14.tgz helm install \
--namespace tenant-ns \
--create-namespace \
tenant-ns ./tenant-5.0.14.tgz
$ k get pods -n tenant-ns
NAME READY STATUS RESTARTS AGE
myminio-pool-0-0 2/2 Running 0 35s
myminio-pool-0-1 2/2 Running 0 35s
myminio-pool-0-2 2/2 Running 0 35s
myminio-pool-0-3 2/2 Running 0 35s |
Hey @twelho, if your problem persists, could you please open an issue? Be sure to include all the steps required to reproduce it in a very detailed manner. Thank you for your time and interest in looking into this. |
@cniackz I am also able to spin up tenants, but this code looks wrong: operator/pkg/sidecar/sidecar.go Lines 152 to 174 in 01c56a5
The variable |
I will just say that copying my diff verbatim into c92f9e3 without citing the source is open source malpractice. I can gladly rebase PRs on request, and I believe you can also directly interact with my feature branch if you want to do it on your own. Another quick option is to just cherry-pick the original commit and then rename the file if you want to get going right away. I'll let this one slide, but just note that there are people who might not be too happy with the kind of steps you've taken here in general. |
you are cited and credited in PR description #2134 |
And that is appreciated. However, what counts are the commits (i.e., their authors and descriptions), since PR metadata is not tied to version control. Referencing a user in a PR description/comment does not register them as a contributor on GH or anywhere else. Like said, no offense from my side, this is just to let you know for the future. |
When using the MinIO operator to deploy a tenant, the operator-deployed sidecar container keeps crashing on startup:
This occurs when deploying https://github.com/minio/operator/tree/master/helm/tenant, even with default values, with a configuration secret in the same form as the automatically generated one:
After a bunch of messing around with the configuration I figured out that this is a bug introduced in #1437. Regardless of the configuration provided in the secret, the following check will always fail due to
rootUserMissing := true
, and even if that is fixed, it will still fail unless all four of the supported environment variables are defined, even though AFAICT they are supposed to be either-or (user/pass or access/secret):operator/pkg/sidecar/sidecar.go
Lines 153 to 174 in a6a3e21
This PR fixes the issue by copying the intended logic from
validator.go
:operator/pkg/validator/validator.go
Lines 110 to 128 in a6a3e21
Tested working in a bare-metal deployment.
Two questions remain:
Missing root credentials in the configuration.
termination in the code without a way to easily distinguish between them from stdout. Maybe a proper logging framework could be of use here?