Skip to content

Commit

Permalink
Increased the helm operator verbosity threshold for release diffs (#5307
Browse files Browse the repository at this point in the history
)

Signed-off-by: Venkat Ramaraju <venky2063@gmail.com>
  • Loading branch information
VenkatRamaraju authored Oct 14, 2021
1 parent eccd240 commit e3005bf
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
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

0 comments on commit e3005bf

Please sign in to comment.