-
Notifications
You must be signed in to change notification settings - Fork 58
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
Updates for gmsa webhook for k8s version 1.22 #31
Updates for gmsa webhook for k8s version 1.22 #31
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jsturtevant 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 |
/cc @ionutbalutoiu |
@jsturtevant: GitHub didn't allow me to request PR reviews from the following users: ionutbalutoiu. Note that only kubernetes-sigs members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
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/test-infra repository. |
I'm not sure, but we might need to update When using
It needs to be checked. |
76c463f
to
8d62873
Compare
0244e23
to
12f7943
Compare
@sponte @ionutbalutoiu would you be able try this out? I have had success with deploying the v1 versions with these changes. |
Hello James, I tried these changes, and indeed you can successfully deploy the However, the admission webhook doesn't work properly anymore. When I validate with my usual deployment using the GMSA credential spec, the deployment resource reports the following status condition:
and the deployment replica pods never spawn. So, I reverted But, then during the validation, the pods spawn, and they crash with
So, I reverted the GMSA CRD to In conclusion, only |
Hello @jsturtevant , thanks for following up. I can confirm that the version from `` commit is working. Output below:
However, admission of a pod is failing with the following message: After reverting to previous configuration, things seem to work. BTW: The setup script is not idempotent, every time it runs, it wipes out my |
Thanks for validation, I will look into why the ValidatingWebhookConfiguration and MutatingWebhookConfiguration to v1beta1 changes are failing. What are the versions of the Kubernetes you are both working from? The bump to the v1 versions is required for 1.22. |
Hello, I'm on AKS 1.19.7 at the moment. |
Hello! I'm using AKS and it's deployed with If we are deploying versions < v1.22, we still have to use |
How about creating tagged releases corresponding to k8s versions?
…On May 19 2021, at 7:44 pm, Ionut BALUTOIU ***@***.***> wrote:
>
> What are the versions of the Kubernetes you are both working from? The bump to the v1 versions is required for 1.22.
>
Hello! I'm using AKS and it's deployed with
v1.20.5
(it was the newest version available when I deployed it).
If we are deploying versions < v1.22, we still have to use
v1beta1
?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub (#31 (comment)), or unsubscribe (https://github.com/notifications/unsubscribe-auth/AAALS3DPFAHZKZWI6R5JYGLTOQBKHANCNFSM45BBI7NQ).
|
according to https://kubernetes.io/docs/reference/using-api/deprecation-guide/#webhook-resources-v122 v1 should be available from 1.16+. I think the code in the webhook might need to be updated to handle the new versions.
Doesn't look like this project has an tag/releases. I wasn't a maintainer but version this repo is a good idea (maybe not to k8s releases but in general). I think at this point the project is pretty stable so we can tag the version before these changes and then create a new one. |
We could have a release tag with the codebase before these To be honest, I don't think there are many production environments (if any!) with Windows + gMSA having Kubernetes release below v1.16. I believe that we should have the webhook working only with the stable API version. And that should be maintained going forward. Once that's stable enough, we should have a release tag. |
This problem is caused by v1 no longer accepting unstructured objects in the GMSA spec. Following modifications made the winapi error disappear. You can validate the problem by inspecting any created gmsacredentialspec and seeing that the credspec property is an empty object. (I'm on kubernetes v1.21.1)
Perhaps this can be included in this PR? |
I can confirm that this change fixes the The only remaining item is making the AdmissionWebhook container image to be compatible with |
f03b830
to
0214f76
Compare
I've pulled in changes from #29 and we now have CI (#35 and #36) on the pull requests and I am see the same errors reported above 👍
|
Co-authored-by: Vitaliy Leschenko <v.leschenko@vitaliy.org>
0214f76
to
fe82cd4
Compare
Required updates to the response to use the latest version. Docs here: https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/ |
Tests pass 🚀 Before merging need to build an push a valid image to a container registry. The previous image was on |
/hold |
225a9b5
to
7327426
Compare
/unhold @zenodhaene @ionutbalutoiu @sponte this is ready for review. If you could test it out that would be added validation 👍 I've moved the image over from the personal repo to the github packages: https://github.com/kubernetes-sigs/windows-gmsa/packages/825309 This will automatically be used be the deploy script.
|
Hello, tried to implement it but docker image is not public i.e. it requires PAT token for reading packages. How can you feed ImagePullSecret into webhook deployment? Alternatively, you can migrate to github container registry to enable anonymous access. |
I can confirm this. Being an image for public consumption, I believe we should have anonymous access. In the meantime, to confirm that all the changes are working, I re-built the Docker image with the changes from this PR, and temporarily published it to:
Everything worked for me. Thank-you! |
Using @ionutbalutoiu's image also worked for me too. The docker.pkg.github.com/kubernetes-sigs/windows-gmsa/k8s-gmsa-webhook:latest one had an issue with the layer, but haven't really investigated it properly |
ah, sorry I thought I tested it but must have had cached credentials.
This is what I looked at first but its not enabled for the kubenetes-sig org as of right now. We have a Thanks for testing it out! |
7327426
to
dc75308
Compare
@ionutbalutoiu @sponte would you try this image?
|
This is now working for me :) Thanks |
The new image works for me too. Thank-you! |
in #29 the certificates.k8s.io/v1 was missing thesignerName
This includes all changes from #29 and adds some additional needed updates. See the comment below: #31 (comment)
Fixes: kubernetes/kubernetes#102113 #32