Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Reduce log verbosity for skipped handlers #692

Merged
merged 1 commit into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/handlers/generic/lifecycle/ccm/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (c *CCMHandler) AfterControlPlaneInitialized(
_, err := variables.Get[v1alpha1.CCM](varMap, c.variableName, c.variablePath...)
if err != nil {
if variables.IsNotFoundError(err) {
log.V(4).Info("Skipping CCM handler.")
log.V(5).Info("Skipping CCM handler.")
jimmidyson marked this conversation as resolved.
Show resolved Hide resolved
return
}
log.Error(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (n *DefaultClusterAutoscaler) AfterControlPlaneInitialized(
n.variablePath...)
if err != nil {
if variables.IsNotFoundError(err) {
log.Info(
log.V(5).Info(
"Skipping cluster-autoscaler handler, cluster does not specify request cluster-autoscaler addon deployment",
)
return
Expand Down
4 changes: 2 additions & 2 deletions pkg/handlers/generic/lifecycle/cni/calico/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (c *CalicoCNI) AfterControlPlaneInitialized(
cniVar, err := variables.Get[v1alpha1.CNI](varMap, c.variableName, c.variablePath...)
if err != nil {
if variables.IsNotFoundError(err) {
log.
log.V(5).
Info(
"Skipping Calico CNI handler, cluster does not specify request CNI addon deployment",
)
Expand All @@ -110,7 +110,7 @@ func (c *CalicoCNI) AfterControlPlaneInitialized(
return
}
if cniVar.Provider != v1alpha1.CNIProviderCalico {
log.Info(
log.V(5).Info(
fmt.Sprintf(
"Skipping Calico CNI handler, cluster does not specify %q as value of CNI provider variable",
v1alpha1.CNIProviderCalico,
Expand Down
2 changes: 1 addition & 1 deletion pkg/handlers/generic/lifecycle/cni/calico/strategy_crs.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (s crsStrategy) apply(
infraKind := req.Cluster.Spec.InfrastructureRef.Kind
defaultInstallationConfigMapName, ok := s.config.defaultProviderInstallationConfigMapNames[infraKind]
if !ok {
log.V(4).Info(
log.Info(
jimmidyson marked this conversation as resolved.
Show resolved Hide resolved
fmt.Sprintf(
"Skipping Calico CNI handler, no default installation ConfigMap configured for infrastructure provider %q",
req.Cluster.Spec.InfrastructureRef.Kind,
Expand Down
4 changes: 2 additions & 2 deletions pkg/handlers/generic/lifecycle/cni/cilium/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (c *CiliumCNI) AfterControlPlaneInitialized(
cniVar, err := variables.Get[v1alpha1.CNI](varMap, c.variableName, c.variablePath...)
if err != nil {
if variables.IsNotFoundError(err) {
log.
log.V(5).
Info(
"Skipping Cilium CNI handler, cluster does not specify request CNI addon deployment",
)
Expand All @@ -110,7 +110,7 @@ func (c *CiliumCNI) AfterControlPlaneInitialized(
return
}
if cniVar.Provider != v1alpha1.CNIProviderCilium {
log.Info(
log.V(5).Info(
fmt.Sprintf(
"Skipping Cilium CNI handler, cluster does not specify %q as value of CNI provider variable",
v1alpha1.CNIProviderCilium,
Expand Down
2 changes: 1 addition & 1 deletion pkg/handlers/generic/lifecycle/csi/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (c *CSIHandler) AfterControlPlaneInitialized(
c.variablePath...)
if err != nil {
if variables.IsNotFoundError(err) {
log.Info("Skipping CSI handler, the cluster does not define the CSI variable")
log.V(5).Info("Skipping CSI handler, the cluster does not define the CSI variable")
return
}
msg := "failed to read the CSI variable from the cluster"
Expand Down
3 changes: 2 additions & 1 deletion pkg/handlers/generic/lifecycle/nfd/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ func (n *DefaultNFD) AfterControlPlaneInitialized(
cniVar, err := variables.Get[v1alpha1.NFD](varMap, n.variableName, n.variablePath...)
if err != nil {
if variables.IsNotFoundError(err) {
log.Info("Skipping NFD handler, cluster does not specify request NFDaddon deployment")
log.V(5).
Info("Skipping NFD handler, cluster does not specify request NFDaddon deployment")
return
}
log.Error(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (c *ServiceLoadBalancerHandler) AfterControlPlaneInitialized(
c.variablePath...)
if err != nil {
if variables.IsNotFoundError(err) {
log.
log.V(5).
Info(
"Skipping ServiceLoadBalancer, field is not specified",
"error",
Expand Down
Loading