- 
                Notifications
    
You must be signed in to change notification settings  - Fork 5.1k
 
start: trust custom CAs before registry probe; retry once on cert errors #21808
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
- Reuse bootstrapper certs plumbing to copy custom CAs into the guest - Install symlinks and refresh trust before tryRegistry runs - Retry once on certificate trust errors (suppresses misleading warning) Fixes kubernetes#21799 Signed-off-by: Andreas Müller <mulan04.0120@gmail.com>
| 
           [APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mulan04 The full list of commands accepted by this bot can be found here. 
Needs approval from an approver in each of these files:
 
      Approvers can indicate their approval by writing   | 
    
| 
           
 
  | 
    
| 
           Welcome @mulan04!   | 
    
| 
           Hi @mulan04. Thanks for your PR. I'm waiting for a github.com 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.  | 
    
| 
           Can one of the admins verify this patch?  | 
    
| 
           /ok-to-test  | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plz add a Before/After this PR ouptut
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
| 
           @mulan04: The following tests failed, say  
 Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here.  | 
    
| 
           kvm2 driver with docker runtime Times for minikube start: 42.8s 45.3s 43.2s 44.4s 43.5s Times for minikube (PR 21808) ingress: 15.8s 16.2s 17.7s 16.3s 15.7s docker driver with docker runtime Times for minikube ingress: 12.6s 10.6s 12.6s 10.6s 10.6s Times for minikube start: 21.1s 21.5s 24.6s 21.9s 22.5s docker driver with containerd runtime Times for minikube start: 21.8s 20.6s 19.6s 19.5s 20.0s Times for minikube ingress: 22.1s 21.1s 21.1s 20.1s 21.1s  | 
    
| 
           Keywords which can automatically close issues and at(@) or hashtag(#) mentions are not allowed in commit messages. The list of commits with invalid commit messages: 
 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. I understand the commands that are listed here.  | 
    
          
 @medyagh I added the requested 'Before / After this PR output' section to the PR description - I hope it is clear now what this PR accomplishes Before / After this PR outputBefore this PR❗  Failing to connect to https://registry.k8s.io/ from inside the minikube VM with VPN Client requiring a custom CA cert After this PR(no warning about https://registry.k8s.io/) 
  | 
    
| 
           Here are the number of top 10 failed tests in each environments with lowest flake rate. 
 Besides the following environments also have failed tests: 
 To see the flake rates of all tests by environment, click here.  | 
    
What this PR does / why we need it
When a user provides custom root CAs (for example behind enterprise VPNs or proxies), Minikube currently probes
https://registry.k8s.io/before those CAs are copied and trusted inside the guest.This causes a misleading warning like:
even though connectivity works moments later once the CAs are installed.
This PR:
update-ca-certificates/update-ca-trust) inside the guest.Before / After this PR output
Before this PR
❗ Failing to connect to https://registry.k8s.io/ from inside the minikube VM
curl: (60) SSL certificate problem: self-signed certificate
After this PR
(no warning about https://registry.k8s.io/)
Which issue(s) this PR fixes
Fixes [#21799](#21799)
(Startup falsely reports registry SSL failure when using custom CA.)
Special notes for your reviewer
collectCACerts,installCertSymlinks)instead of duplicating certificate copy and trust code.
EnsureCACertsEarlyis idempotent and safe to call multiple times; it will only act when host-provided certs exist.Testing
Place a custom CA (e.g. your corporate proxy CA) in
~/.minikube/certs/or
~/.minikube/files/etc/ssl/certs/.Run Minikube start:
Observe:
registry.k8s.io.Also verified:
Release note