-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Remove --auth-anonymous if kube_api_anonymous_auth is undefined #12353
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
base: master
Are you sure you want to change the base?
Conversation
|
Welcome @psychomantys! |
Hi @psychomantys. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Hum, do you mean that the anonymous-auth flag is actually a tristate rather than a boolean (aka undefined/true/false), and that only undefined is compatible with using structured authentication (or only the anonymous in structured authentication).
I'm not a big fan of negative flags because they lead to double negatives which are not great for comprehension, maybe there is another alternative, like not defining the flag ?
|
@VannTen Yes, the Initially, I considered moving to an undefined state, similar to the pull request that removed this behavior. However, for greater compatibility and because the variable already had a defined default value, I decided to add the variable instead. Since I perceive indications of potential larger changes, I will modify the pull request accordingly. |
46df4bf
to
768defb
Compare
@VannTen I've updated the branch to remove argument Please review if this meets your requirements or if any further adjustments are needed. Feel free to reach out for any clarifications or changes. |
/ok-to-test |
/retest Hum, I was thinking we could check the authentication config variable but actually #11841 is not merged 🤔 I think your approach is acceptable, and once we support creating the structured authentication we'll be able to inspect it and remove the flag depending on the presence of the Could you add a TODO: note (on the ifdef) to rework once suppport for structured auth lands ? |
@VannTen Yes, I can make them work and be compatible. I will make the adjustments and then let you know. |
Remove --auth-anonymous if kube_api_anonymous_auth in undefined, to avoid compatibility errors with other arguments of the kube-apiserver, such as --authentication-config when anonymous field is configured.
@VannTen I decided to make a condition to test the variable Therefore, to achieve this, there would be one more a state in the Feel free to reach out for anything more. |
Yeah let's keep it simple for now, I didn't expect you to integrate with an unmerged PR 👍 Thanks for the work |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: psychomantys, VannTen The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@psychomantys, please remove the merge commit and use rebase. |
@tico88612 Sorry for the mess, I had forgotten about it. Everything is fine now. |
Hum, I think you still need to rebase ? The missing files in tests/ are usually a symptom of changed stuff in the tip of the target branch. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR introduces changes to address the incompatibility between the
kube_api_anonymous_auth
flag and the--authentication-config
argument in kubeadm. The current implementation adds--anonymous-auth=true|false
based on the value ofkube_api_anonymous_auth
, which is not compatible with the--authentication-config
configuration file, when the config file includes a configuration for anonymous authentication.This PR modifies the behavior to remove the
--anonymous-auth
flag whenkube_api_anonymous_auth
is"{{ undef() }}"
, ensuring compatibility without conflicting configurations.Which issue(s) this PR fixes:
Additionally, if kube-apiserver uses
--anonynous-auth=true|false
and--authorization-config
with a configuration like the following:An error log message will exist in kube-apiserver:
As describe in the KEP-4633 and in documentation.
Special notes for your reviewer:
Maybe this issue was introduced by #12307. It would be nice to port the fix to older versions.
Does this PR introduce a user-facing change?: