-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
kube-webhook-certgen create secret job not recreating existing CA secret if parameters change #12767
Comments
This issue is currently awaiting triage. If Ingress contributors determines this is a relevant issue, they will accept it by applying the The 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. |
/remove-kind bug The template of a new bug report template asks questions that are visible in the description post . Answer those questions. And then kindly add the exact install or upgrade command used, the version of the controller attempted to be installed etc etc. |
@longwuyuan thanks for the feedback. I updated the description to make it more clear. |
Thanks. More clear now. Also there is no possibility that such a feature will be added and supported because there are no resources to allocate for such work or for future maintenance of such feature. Some use cases may seem justified to need such a feature but normal uses cases where any changes outside a cert impact the fields in the cert like Subject and Alt-Subject, would most often be a reinstall. |
It's definitely an edge case that can happen in different ways, e.g. a new installation finding an existing secret CA from a previous installation that was not cleaned up manually. The challenge mostly comes from needing to dive deeper into the webhook certgen to understand the actual issue, since the certification verification error message does not directly point at the issue. Issues like #5968 show, that some are running into this cases. Since the change would be concentrated on the webhook certgen service, I would be willing to contribute this myself. But as you already mentioned, this would then depend if there are resources to allocate to review and maintain this in the future. |
Thank you for update because now there is a point to discuss. In the original issue-description you are talking about changing the controller.name spec of a existing instance of the controller. In your latest post above you contradict that by mentioning a new installation finding a existing secret CA from a previous install, that was not cleaned up. Help clarify this contradiciton. We have announced that if there is a PR that improves controller to fix a existing problem, it will be categorized as a "bug-fix" and accepted, because it comes without the worries of "new feature". I think that currently the "normal" expectation for changing the |
Sorry for the confusion. I indeed encountered this issue in two different ways, since the underlying common factor is the CA secret:
I agree with your statement that changing the |
ok. My observations are ;
|
Thanks for your elaborate response. I don't want to keep you busy any longer with a non-critical issue and will close it therefore. I don't think FAQ documentation will add something here. There are threads like #5968, which are quite helpful already to understand the problem and solve this issue manually. Similarly, there is now also this thread to point people into the right direction. |
I wish to emphasize that the intention to improve is extremely high. But we have these situations arising out of lack of developer time where the precise processing of a problem is not conventional. |
What happened:
When changing the
controller.name
of an existing installation, the admission webhook is failing all ingress requests with a cert validation error.This situation can only be resolved manually by
Related issues have been reported here already: #5968
What you expected to happen:
When changing
controller.name
and updating an existing installation, the admission webhook should use a valid certificate and not reject ingress requests with an error.The responsible code in
ingress-nginx/kube-webhook-certgen
can be found here: https://github.com/kubernetes/ingress-nginx/blob/main/images/kube-webhook-certgen/rootfs/cmd/create.go#L27-L34Two possible fixes could be:
This would prevent the need for manual intervention and certification validation errors where it is not immediately clear on why it happens.
NGINX Ingress controller version (exec into the pod and run
/nginx-ingress-controller --version
):1.9.6
Kubernetes version (use
kubectl version
):v1.29.12-eks-2d5f260
Environment:
Cloud provider or hardware configuration: Dell Prevision 5690
OS (e.g. from /etc/os-release): Ubuntu 22.04.5 LTS
Kernel (e.g.
uname -a
): 6.8.0-52-genericInstall tools:
Basic cluster related info:
How was the ingress-nginx-controller installed:
helm ls -A | grep -i ingress
helm -n <ingresscontrollernamespace> get values <helmreleasename>
Current State of the controller:
kubectl describe ingressclasses
kubectl -n <ingresscontrollernamespace> get all -A -o wide
kubectl -n <ingresscontrollernamespace> describe po <ingresscontrollerpodname>
kubectl -n <ingresscontrollernamespace> describe svc <ingresscontrollerservicename>
How to reproduce this issue:
kind create cluster --image "kindest/node:v1.29.12"
helm fetch --version 4.12.0 ingress-nginx/ingress-nginx --untar
helm upgrade ingress-nginx ingress-nginx -f values.yaml
7. Create an ingress resource. Validation fails with error
Anything else we need to know:
-
The text was updated successfully, but these errors were encountered: