Skip to content

Commit

Permalink
Allow override of kubeconfig dialer
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuildthecloud authored and brandond committed Sep 16, 2021
1 parent 29d1cbd commit 5cbb88f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmd/kube-apiserver/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ import (
"k8s.io/kubernetes/pkg/serviceaccount"
)

var (
DefaultProxyDialerFn utilnet.DialFunc
)

// TODO: delete this check after insecure flags removed in v1.24
func checkNonZeroInsecurePort(fs *pflag.FlagSet) error {
for _, name := range options.InsecurePortFlags {
Expand Down Expand Up @@ -177,7 +181,12 @@ func Run(completeOptions completedServerRunOptions, stopCh <-chan struct{}) erro

// CreateServerChain creates the apiservers connected via delegation.
func CreateServerChain(completedOptions completedServerRunOptions, stopCh <-chan struct{}) (*aggregatorapiserver.APIAggregator, error) {
if DefaultProxyDialerFn != nil {
completedOptions.KubeletConfig.Dial = DefaultProxyDialerFn
}

kubeAPIServerConfig, serviceResolver, pluginInitializer, err := CreateKubeAPIServerConfig(completedOptions)

if err != nil {
return nil, err
}
Expand Down

0 comments on commit 5cbb88f

Please sign in to comment.