Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

helm/v3: propogate main application logger to client #232

Merged
merged 1 commit into from
Jan 21, 2020

Conversation

stefansedich
Copy link
Contributor

The Helm V3 code was passing in klog.Infof for the logger which meant that we were missing out on formatting the internal helm logs using our configured logger and the users logging preferences.

This change creates a logging function to mimic klog.Infof and simply routes it to our logger as an info level log.

Example of logs being consistent across both our components and the internal helm logs.

ts=2020-01-21T18:43:25.501926825Z caller=operator.go:307 component=operator info="enqueuing release" resource=opa:helmrelease/jupyterhub
ts=2020-01-21T18:43:25.603914422Z caller=release.go:353 component=release release=podinfo-child targetNamespace=opa resource=opa:helmrelease/jupyterhub helmVersion=v3 info="performing dry-run upgrade to see if release has diverged"
ts=2020-01-21T18:43:25.606268155Z caller=helm.go:167 component=helm version=v3 info="preparing upgrade for podinfo-child"
ts=2020-01-21T18:43:26.00569832Z caller=helm.go:167 component=helm version=v3 info="performing update for podinfo-child"
ts=2020-01-21T18:43:26.010283371Z caller=helm.go:167 component=helm version=v3 info="dry run for podinfo-child"

Closes #226

Copy link
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Stefan 💯

@hiddeco hiddeco changed the title Propogate main application logger to Helm V3 client helm/v3: propogate main application logger to client Jan 21, 2020
@hiddeco hiddeco merged commit 2d59385 into fluxcd:master Jan 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

helm/v3: support configuring log format
2 participants