Merge pull request #115074 from yangjunmyfm192085/deleteklogv0-controller

use klog instead of klog.V(0)--controller manager part
This commit is contained in:
Kubernetes Prow Robot 2023-01-16 09:58:50 -08:00 committed by GitHub
commit 7b01daba71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 12 deletions

View File

@ -128,7 +128,7 @@ func NewCloudCIDRAllocator(client clientset.Interface, cloud cloudprovider.Inter
DeleteFunc: controllerutil.CreateDeleteNodeHandler(ca.ReleaseCIDR),
})
klog.V(0).Infof("Using cloud CIDR allocator (provider: %v)", cloud.ProviderName())
klog.Infof("Using cloud CIDR allocator (provider: %v)", cloud.ProviderName())
return ca, nil
}
@ -137,7 +137,7 @@ func (ca *cloudCIDRAllocator) Run(stopCh <-chan struct{}) {
// Start event processing pipeline.
ca.broadcaster.StartStructuredLogging(0)
klog.V(0).Infof("Sending events to api server.")
klog.Infof("Sending events to api server.")
ca.broadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: ca.client.CoreV1().Events("")})
defer ca.broadcaster.Shutdown()

View File

@ -175,13 +175,13 @@ func NewMultiCIDRRangeAllocator(
if allocatorParams.ServiceCIDR != nil {
ra.filterOutServiceRange(allocatorParams.ServiceCIDR)
} else {
klog.V(0).Info("No Service CIDR provided. Skipping filtering out service addresses.")
klog.Info("No Service CIDR provided. Skipping filtering out service addresses.")
}
if allocatorParams.SecondaryServiceCIDR != nil {
ra.filterOutServiceRange(allocatorParams.SecondaryServiceCIDR)
} else {
klog.V(0).Info("No Secondary Service CIDR provided. Skipping filtering out secondary service addresses.")
klog.Info("No Secondary Service CIDR provided. Skipping filtering out secondary service addresses.")
}
if nodeList != nil {
@ -190,7 +190,7 @@ func NewMultiCIDRRangeAllocator(
klog.V(4).Infof("Node %v has no CIDR, ignoring", node.Name)
continue
}
klog.V(0).Infof("Node %v has CIDR %s, occupying it in CIDR map", node.Name, node.Spec.PodCIDRs)
klog.Infof("Node %v has CIDR %s, occupying it in CIDR map", node.Name, node.Spec.PodCIDRs)
if err := ra.occupyCIDRs(&node); err != nil {
// This will happen if:
// 1. We find garbage in the podCIDRs field. Retrying is useless.
@ -240,7 +240,7 @@ func (r *multiCIDRRangeAllocator) Run(stopCh <-chan struct{}) {
// Start event processing pipeline.
r.broadcaster.StartStructuredLogging(0)
klog.V(0).Infof("Started sending events to API Server.")
klog.Infof("Started sending events to API Server.")
r.broadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: r.client.CoreV1().Events("")})
defer r.broadcaster.Shutdown()

View File

@ -100,13 +100,13 @@ func NewCIDRRangeAllocator(client clientset.Interface, nodeInformer informers.No
if allocatorParams.ServiceCIDR != nil {
ra.filterOutServiceRange(allocatorParams.ServiceCIDR)
} else {
klog.V(0).Info("No Service CIDR provided. Skipping filtering out service addresses.")
klog.Info("No Service CIDR provided. Skipping filtering out service addresses.")
}
if allocatorParams.SecondaryServiceCIDR != nil {
ra.filterOutServiceRange(allocatorParams.SecondaryServiceCIDR)
} else {
klog.V(0).Info("No Secondary Service CIDR provided. Skipping filtering out secondary service addresses.")
klog.Info("No Secondary Service CIDR provided. Skipping filtering out secondary service addresses.")
}
if nodeList != nil {
@ -164,7 +164,7 @@ func (r *rangeAllocator) Run(stopCh <-chan struct{}) {
// Start event processing pipeline.
r.broadcaster.StartStructuredLogging(0)
klog.V(0).Infof("Sending events to api server.")
klog.Infof("Sending events to api server.")
r.broadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: r.client.CoreV1().Events("")})
defer r.broadcaster.Shutdown()

View File

@ -1229,7 +1229,7 @@ func (nc *Controller) handleDisruption(ctx context.Context, zoneToNodeConditions
if !allAreFullyDisrupted || !allWasFullyDisrupted {
// We're switching to full disruption mode
if allAreFullyDisrupted {
klog.V(0).Info("Controller detected that all Nodes are not-Ready. Entering master disruption mode.")
klog.Info("Controller detected that all Nodes are not-Ready. Entering master disruption mode.")
for i := range nodes {
if nc.runTaintManager {
_, err := nc.markNodeAsReachable(ctx, nodes[i])
@ -1256,7 +1256,7 @@ func (nc *Controller) handleDisruption(ctx context.Context, zoneToNodeConditions
}
// We're exiting full disruption mode
if allWasFullyDisrupted {
klog.V(0).Info("Controller detected that some Nodes are Ready. Exiting master disruption mode.")
klog.Info("Controller detected that some Nodes are Ready. Exiting master disruption mode.")
// When exiting disruption mode update probe timestamps on all Nodes.
now := nc.now()
for i := range nodes {
@ -1279,7 +1279,7 @@ func (nc *Controller) handleDisruption(ctx context.Context, zoneToNodeConditions
if v == newState {
continue
}
klog.V(0).Infof("Controller detected that zone %v is now in state %v.", k, newState)
klog.Infof("Controller detected that zone %v is now in state %v.", k, newState)
nc.setLimiterInZone(k, len(zoneToNodeConditions[k]), newState)
nc.zoneStates[k] = newState
}