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

Remove Helm diffs output for "info" zap log level #5307

Merged
merged 1 commit into from
Oct 14, 2021
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
17 changes: 17 additions & 0 deletions changelog/fragments/zap-verbosity.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# entries is a list of entries to include in
# release notes and/or the migration guide
entries:
- description: >
Helm operator reconciliation diffs are now logged only at the zap
debug level.

# kind is one of:
# - addition
# - change
# - deprecation
# - removal
# - bugfix
kind: "removal"

# Is this a breaking change?
breaking: false
6 changes: 3 additions & 3 deletions internal/helm/controller/reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func (r HelmOperatorReconciler) Reconcile(ctx context.Context, request reconcile
log.Info("Release not found")
} else {
log.Info("Uninstalled release")
if log.V(0).Enabled() && uninstalledRelease != nil {
if log.V(1).Enabled() && uninstalledRelease != nil {
fmt.Println(diff.Generate(uninstalledRelease.Manifest, ""))
}
if !wait {
Expand Down Expand Up @@ -252,7 +252,7 @@ func (r HelmOperatorReconciler) Reconcile(ctx context.Context, request reconcile
}

log.Info("Installed release")
if log.V(0).Enabled() {
if log.V(1).Enabled() {
fmt.Println(diff.Generate("", installedRelease.Manifest))
}
log.V(1).Info("Config values", "values", installedRelease.Config)
Expand Down Expand Up @@ -315,7 +315,7 @@ func (r HelmOperatorReconciler) Reconcile(ctx context.Context, request reconcile
}

log.Info("Upgraded release", "force", force)
if log.V(0).Enabled() {
if log.V(1).Enabled() {
fmt.Println(diff.Generate(previousRelease.Manifest, upgradedRelease.Manifest))
}
log.V(1).Info("Config values", "values", upgradedRelease.Config)
Expand Down