Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: kubernetes/kubernetes
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: tkornai/kubernetes
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Feb 24, 2019

  1. Only set TLS cert callback if credentials plugin returns with cert

    According to https://kubernetes.io/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins the credentials plugin can return either with a bearer token or with TLS cert data.
    
    This change ensures that the HasCertCallback() (https://github.com/kubernetes/client-go/blob/b831b8de7155117e51afaffeb647007a756ddc92/transport/config.go#L100) will only return True if the plugin actually generates a client certificate. In case it returns a Bearer token the return value should be False.
    
    This change helps with successful calls to `kubernetes.NewForConfig(config)` when using bearer token authentication as it won't fail on this line:
    https://github.com/kubernetes/client-go/blob/b831b8de7155117e51afaffeb647007a756ddc92/transport/transport.go#L33
    tkornai committed Feb 24, 2019
    Configuration menu
    Copy the full SHA
    06e7cfe View commit details
    Browse the repository at this point in the history
Loading