@@ -219,6 +219,10 @@ func createTargetConfig(ctx context.Context, c TargetConfigController, recorder
219
219
if err != nil {
220
220
errors = append (errors , fmt .Errorf ("%q: %v" , "configmap/config" , err ))
221
221
}
222
+ _ , _ , err = manageKubeAPICheckEndpointsConfig (ctx , c .kubeClient .CoreV1 (), recorder )
223
+ if err != nil {
224
+ errors = append (errors , fmt .Errorf ("%q: %v" , "configmap/kube-apiserver-check-endpoints-config" , err ))
225
+ }
222
226
_ , _ , err = managePods (ctx , c .kubeClient .CoreV1 (), c .isStartupMonitorEnabledFn , recorder , operatorSpec , c .targetImagePullSpec , c .operatorImagePullSpec , c .operatorImageVersion )
223
227
if err != nil {
224
228
errors = append (errors , fmt .Errorf ("%q: %v" , "configmap/kube-apiserver-pod" , err ))
@@ -303,6 +307,12 @@ func manageKubeAPIServerConfig(ctx context.Context, client coreclientv1.ConfigMa
303
307
return resourceapply .ApplyConfigMap (ctx , client , recorder , requiredConfigMap )
304
308
}
305
309
310
+ func manageKubeAPICheckEndpointsConfig (ctx context.Context , client coreclientv1.ConfigMapsGetter , recorder events.Recorder ) (* corev1.ConfigMap , bool , error ) {
311
+ configMap := resourceread .ReadConfigMapV1OrDie (bindata .MustAsset ("assets/kube-apiserver/check-endpoints-config-cm.yaml" ))
312
+ configMap .Namespace = operatorclient .TargetNamespace
313
+ return resourceapply .ApplyConfigMap (ctx , client , recorder , configMap )
314
+ }
315
+
306
316
func managePods (ctx context.Context , client coreclientv1.ConfigMapsGetter , isStartupMonitorEnabledFn func () (bool , error ), recorder events.Recorder , operatorSpec * operatorv1.StaticPodOperatorSpec , imagePullSpec , operatorImagePullSpec , operatorImageVersion string ) (* corev1.ConfigMap , bool , error ) {
307
317
appliedPodTemplate , err := manageTemplate (string (bindata .MustAsset ("assets/kube-apiserver/pod.yaml" )), imagePullSpec , operatorImagePullSpec , operatorImageVersion , operatorSpec )
308
318
if err != nil {
0 commit comments