@@ -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 {
@@ -314,6 +304,14 @@ func BuildKubernetesMasterConfig(options configapi.MasterConfig, requestContextM
314
304
if err != nil {
315
305
glog .Fatalf ("Error setting up OAuth2 client certificates: %v" , err )
316
306
}
307
+ requestHeaderCACerts , err := configapi .GetRequestHeaderClientCertCAs (options )
308
+ if err != nil {
309
+ glog .Fatalf ("Error setting up request header client certificates: %v" , err )
310
+ }
311
+ if len (requestHeaderCACerts ) > 0 {
312
+ genericConfig .SecureServingInfo .ExtraClientCACerts = append (genericConfig .SecureServingInfo .ExtraClientCACerts , requestHeaderCACerts ... )
313
+ }
314
+
317
315
url , err := url .Parse (options .MasterPublicURL )
318
316
if err != nil {
319
317
glog .Fatalf ("Error parsing master public url %q: %v" , options .MasterPublicURL , err )
0 commit comments