-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Default v3 scaffold manager pod got permission denied error #3028
Comments
Hi @astraw99, This error is NOT reproducible with the default scaffold and with all mocks generated in the e2e tests. Also, the default scaffold does NOT use a service account. So, the following some questions:
|
@camilamacedo86 Tested if removed this base image part: kubebuilder/pkg/plugins/golang/v3/scaffolds/internal/templates/dockerfile.go Lines 68 to 71 in 61611b2
Just use |
HI @astraw99, The description provided here does enable certmanager and it seems not accurate. See that we indeed have the cert-manager enabled in the e2e tests and the issue is NOT faced. Can you please provide all steps required for we create a new project from the scratch and face this issue? Regards your comment in the other issue:
The default scaffold does have not SA. So, how can that can be faced by default? |
@camilamacedo86
to build Tested the manager pod works well in K8s v1.25, but it got this issue on K8s v1.21. |
Hi @astraw99,
Could you please provide an example?
The e2e tests run against now only from 1.23. However, a few months ago we tested the default scaffolds from 1.16 and we never got this error. On top of that, if that is an issue that is not faced anymore why would we change the default scaffold to fix that? What about we add this one to a FAQ section as well? See: https://github.com/kubernetes-sigs/kubebuilder/issues?q=is%3Aissue+is%3Aopen+FAq |
@camilamacedo86 Found the SA token permission related issues and PRs: From the latest code: The default securityContext set by manager.yaml is:
Checked in my cluster, the permission of SA token file with the above set is
So if not set |
Hi @astraw99, Still not clear for me when the error is faced. If we create a project from the scratch and run it against k8s version x will it happen and if we test against version > X then it is solved? Could you please clarify? |
Yes, we can reproduce by create a project from scatch, then do the
The KB version is:
|
Hi @astraw99, So the error ONLY occurs on versions < 1.22? When the issue was solved in k8s? |
Yes, I think so. My version is 1.21. |
Hi @astraw99, Here into the PR for the doc #3044 you added that it also sorted out with the PR set proper file permission for projected service account volume #89193. If so, that was merged on 5 May 2020 and we could check what releases have it or not. However, note that these changes are in tag 1.21.0 released on 8 Apr 2021. So, it might. not be the right fix. Therefore, for the doc explanation into the PR #3044 I'd suggest we add only face with old k8s versions instead of the version. Also, I would recommend not adding the PR fix since it might be not the right one. |
In the PR #3017, there is a "may" doc info, so it might be proper to add this PR. |
Hi @astraw99, The issue does not occur as you checked in the latest version of k8s. So, wdyt? Could we close this one? Is that make sense? |
OK, we can close it now. |
What broke? What's expected?
Based on the quick start doc, did the
make manifests, make install
, thenmake docker-build docker-push IMG=xxx/xxx:tag, make deploy IMG=xxx/xxx:tag
, thenin the cluster the controller-pod got error:
Reproducing this issue
Based on the quick start doc, did the
make manifests, make install
, thenmake docker-build docker-push IMG=xxx/xxx:tag, make deploy IMG=xxx/xxx:tag
, thenin the cluster will reproduce this issue.
My cluster K8s version is:
Kubebuilder version is:
With these context, will replicate the error.
KubeBuilder (CLI) Version
Version: main.version{KubeBuilderVersion:"3.7.0", KubernetesVendor:"1.24.1", GitCommit:"3bfc84ec8767fa760d1771ce7a0cb05a9a8f6286", BuildDate:"2022-09-20T17:21:57Z", GoOs:"darwin", GoArch:"amd64"}
PROJECT version
No response
Plugin versions
No response
Other versions
No response
Extra Labels
No response
The text was updated successfully, but these errors were encountered: