@@ -114,16 +114,6 @@ func BuildDefaultAPIServer(options configapi.MasterConfig) (*apiserveroptions.Se
114
114
server .GenericServerRunOptions .TLSPrivateKeyFile = options .ServingInfo .ServerCert .KeyFile
115
115
server .GenericServerRunOptions .ClientCAFile = options .ServingInfo .ClientCA
116
116
117
- // TODO this is a terrible hack that should be removed in 1.6
118
- if options .AuthConfig .RequestHeader != nil {
119
- clientCAFile , err := concatenateFiles ("cafrontproxybundle" , "\n " , options .ServingInfo .ClientCA , options .AuthConfig .RequestHeader .ClientCA )
120
- if err != nil {
121
- return nil , nil , fmt .Errorf ("unable to create ca bundle temp file: %v" , err )
122
- }
123
- glog .V (2 ).Infof ("temp clientCA bundle file is %s" , clientCAFile )
124
- server .GenericServerRunOptions .ClientCAFile = clientCAFile
125
- }
126
-
127
117
server .GenericServerRunOptions .MaxRequestsInFlight = options .ServingInfo .MaxRequestsInFlight
128
118
server .GenericServerRunOptions .MinRequestTimeout = options .ServingInfo .RequestTimeoutSeconds
129
119
for _ , nc := range options .ServingInfo .NamedCertificates {
@@ -317,6 +307,14 @@ func BuildKubernetesMasterConfig(options configapi.MasterConfig, requestContextM
317
307
for _ , cert := range oAuthClientCertCAs {
318
308
genericConfig .SecureServingInfo .ClientCA .AddCert (cert )
319
309
}
310
+ requestHeaderCACerts , err := configapi .GetRequestHeaderClientCertCAs (options )
311
+ if err != nil {
312
+ glog .Fatalf ("Error setting up request header client certificates: %v" , err )
313
+ }
314
+ for _ , cert := range requestHeaderCACerts {
315
+ genericConfig .SecureServingInfo .ClientCA .AddCert (cert )
316
+ }
317
+
320
318
url , err := url .Parse (options .MasterPublicURL )
321
319
if err != nil {
322
320
glog .Fatalf ("Error parsing master public url %q: %v" , options .MasterPublicURL , err )
0 commit comments