File tree Expand file tree Collapse file tree 3 files changed +6
-0
lines changed Expand file tree Collapse file tree 3 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ import (
5252 "sigs.k8s.io/cluster-api/feature"
5353 bootstrapv1alpha3 "sigs.k8s.io/cluster-api/internal/apis/bootstrap/kubeadm/v1alpha3"
5454 bootstrapv1alpha4 "sigs.k8s.io/cluster-api/internal/apis/bootstrap/kubeadm/v1alpha4"
55+ "sigs.k8s.io/cluster-api/util/apiwarnings"
5556 "sigs.k8s.io/cluster-api/util/flags"
5657 "sigs.k8s.io/cluster-api/version"
5758)
@@ -201,6 +202,7 @@ func main() {
201202 restConfig .QPS = restConfigQPS
202203 restConfig .Burst = restConfigBurst
203204 restConfig .UserAgent = remote .DefaultClusterAPIUserAgent (controllerName )
205+ restConfig .WarningHandler = apiwarnings .DefaultHandler (klog .Background ().WithName ("API Server Warning" ))
204206
205207 tlsOptions , metricsOptions , err := flags .GetManagerOptions (managerOptions )
206208 if err != nil {
Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ import (
5656 "sigs.k8s.io/cluster-api/feature"
5757 controlplanev1alpha3 "sigs.k8s.io/cluster-api/internal/apis/controlplane/kubeadm/v1alpha3"
5858 controlplanev1alpha4 "sigs.k8s.io/cluster-api/internal/apis/controlplane/kubeadm/v1alpha4"
59+ "sigs.k8s.io/cluster-api/util/apiwarnings"
5960 "sigs.k8s.io/cluster-api/util/flags"
6061 "sigs.k8s.io/cluster-api/version"
6162)
@@ -211,6 +212,7 @@ func main() {
211212 restConfig .QPS = restConfigQPS
212213 restConfig .Burst = restConfigBurst
213214 restConfig .UserAgent = remote .DefaultClusterAPIUserAgent (controllerName )
215+ restConfig .WarningHandler = apiwarnings .DefaultHandler (klog .Background ().WithName ("API Server Warning" ))
214216
215217 tlsOptions , metricsOptions , err := flags .GetManagerOptions (managerOptions )
216218 if err != nil {
Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ import (
7272 runtimeclient "sigs.k8s.io/cluster-api/internal/runtime/client"
7373 runtimeregistry "sigs.k8s.io/cluster-api/internal/runtime/registry"
7474 runtimewebhooks "sigs.k8s.io/cluster-api/internal/webhooks/runtime"
75+ "sigs.k8s.io/cluster-api/util/apiwarnings"
7576 "sigs.k8s.io/cluster-api/util/flags"
7677 "sigs.k8s.io/cluster-api/version"
7778 "sigs.k8s.io/cluster-api/webhooks"
@@ -270,6 +271,7 @@ func main() {
270271 restConfig .QPS = restConfigQPS
271272 restConfig .Burst = restConfigBurst
272273 restConfig .UserAgent = remote .DefaultClusterAPIUserAgent (controllerName )
274+ restConfig .WarningHandler = apiwarnings .DefaultHandler (klog .Background ().WithName ("API Server Warning" ))
273275
274276 minVer := version .MinimumKubernetesVersion
275277 if feature .Gates .Enabled (feature .ClusterTopology ) {
You can’t perform that action at this time.
0 commit comments