kube-webhook-certgen create secret job not recreating existing CA secret if parameters change #12767
Labels
needs-kind
Indicates a PR lacks a `kind/foo` label and requires one.
needs-priority
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
What happened:
Installation using the kube-webhook-certgen for ca generation.
When updating the
--host=<name>
in the create secret job with theingress-nginx/kube-webhook-certgen
image, the existing CA secret is not updated. This results in the validating webhook configuration still having the old CA, which then fails all requests to the webhook with errors similar to:This situation can currently only be resolved manually by
Related issues have been reported here already: #5968
What you expected to happen:
When changing parameters of
ingress-nginx/kube-webhook-certgen
create secret job, that would result in a new CA, any existing secret should be updated with the new CA.The responsible code can be found here: https://github.com/kubernetes/ingress-nginx/blob/main/images/kube-webhook-certgen/rootfs/cmd/create.go#L27-L34
Two possible approaches 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: AWS
OS (e.g. from /etc/os-release): AL2
Kernel (e.g.
uname -a
): -Install 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>
Current state of ingress object, if applicable:
kubectl -n <appnamespace> get all,ing -o wide
kubectl -n <appnamespace> describe ing <ingressname>
Others:
kubectl describe ...
of any custom configmap(s) created and in useHow to reproduce this issue:
--host
parameters of the kube-webhook-certgen https://github.com/kubernetes/ingress-nginx/tree/main/images/kube-webhook-certgen#create.Values.controller.name
)Anything else we need to know:
-
The text was updated successfully, but these errors were encountered: