-
Notifications
You must be signed in to change notification settings - Fork 76
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
Use Context to pass Logger #550
Use Context to pass Logger #550
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got a few suggestions - I think this will be a big improvement and I'm looking forward to it!
I ran the smoke tests with and without this PR to compare the logs. They'll not be identical but it's a helpful comparison; at the very least, nothing looks obviously broken! With this PR: time=2025-02-10T14:26:47.306Z level=INFO msg="successfully loaded default package from filesystem" id=cert-manager-debian-bookworm-20230311.0-678d423fad6fb240 path=/packages/cert-manager-package-debian.json
time=2025-02-10T14:26:47.306Z level=INFO msg="registering webhook endpoints"
time=2025-02-10T14:26:47.306Z level=INFO msg="Registering a validating webhook" logger=controller-runtime/builder GVK="trust.cert-manager.io/v1alpha1, Kind=Bundle" path=/validate-trust-cert-manager-io-v1alpha1-bundle
time=2025-02-10T14:26:47.306Z level=INFO msg="Registering webhook" path=/validate-trust-cert-manager-io-v1alpha1-bundle logger=controller-runtime/webhook
time=2025-02-10T14:26:47.306Z level=INFO msg="Starting metrics server" logger=controller-runtime/metrics
time=2025-02-10T14:26:47.306Z level=INFO msg="starting server" name="health probe" addr=[::]:6060
time=2025-02-10T14:26:47.306Z level=INFO msg="Serving metrics server" logger=controller-runtime/metrics bindAddress=0.0.0.0:9402 secure=false
time=2025-02-10T14:26:47.306Z level=INFO msg="Starting webhook server" logger=controller-runtime/webhook
time=2025-02-10T14:26:47.306Z level=INFO msg="Updated current TLS certificate" logger=controller-runtime/certwatcher
time=2025-02-10T14:26:47.306Z level=INFO msg="Serving webhook server" logger=controller-runtime/webhook host=0.0.0.0 port=6443
time=2025-02-10T14:26:47.307Z level=INFO msg="Starting certificate poll+watcher" logger=controller-runtime/certwatcher interval=10s
time=2025-02-10T14:26:47.307Z level=INFO msg="attempting to acquire leader lease cert-manager/trust-manager-leader-election..."
time=2025-02-10T14:26:47.308Z level=INFO msg="successfully acquired lease cert-manager/trust-manager-leader-election"
time=2025-02-10T14:26:47.309Z level=DEBUG+3 msg="trust-manager-c454c5c49-k8524_db66a876-b9f9-48d6-8189-9adc90db44e2 became leader" logger=events type=Normal object="{Kind:Lease Namespace:cert-manager Name:trust-manager-leader-election UID:54da2f92-0ef4-41e6-b6bf-e1bd8fdb25ab APIVersion:coordination.k8s.io/v1 ResourceVersion:752 FieldPath:}" reason=LeaderElection
time=2025-02-10T14:26:47.309Z level=INFO msg="Starting EventSource" controller=bundles source="kind source: *v1.PartialObjectMetadata"
time=2025-02-10T14:26:47.309Z level=INFO msg="Starting EventSource" controller=bundles source="kind source: *v1alpha1.Bundle"
time=2025-02-10T14:26:47.309Z level=INFO msg="Starting EventSource" controller=bundles source="kind source: *v1.Namespace"
time=2025-02-10T14:26:47.309Z level=INFO msg="Starting EventSource" controller=bundles source="kind source: *v1.ConfigMap"
time=2025-02-10T14:26:47.309Z level=INFO msg="Starting EventSource" controller=bundles source="kind source: *v1.Secret"
time=2025-02-10T14:26:47.309Z level=INFO msg="Starting EventSource" controller=bundles source="kind source: *v1.PartialObjectMetadata"
time=2025-02-10T14:26:47.410Z level=INFO msg="Starting Controller" controller=bundles
time=2025-02-10T14:26:47.410Z level=INFO msg="Starting workers" controller=bundles "worker count"=1
time=2025-02-10T14:27:04.012Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-qqnx7 UID:f07c33b8-4d3f-47b5-91e5-25eecff2a7c3 APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:798 FieldPath:}" reason=Synced
time=2025-02-10T14:27:04.013Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-qqnx7 UID:f07c33b8-4d3f-47b5-91e5-25eecff2a7c3 APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:798 FieldPath:}" reason=Synced
time=2025-02-10T14:27:04.018Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-qqnx7 UID:f07c33b8-4d3f-47b5-91e5-25eecff2a7c3 APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:798 FieldPath:}" reason=Synced
time=2025-02-10T14:27:04.018Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-qqnx7 UID:f07c33b8-4d3f-47b5-91e5-25eecff2a7c3 APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:798 FieldPath:}" reason=Synced
time=2025-02-10T14:27:05.817Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-qqnx7 UID:f07c33b8-4d3f-47b5-91e5-25eecff2a7c3 APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:806 FieldPath:}" reason=Synced
time=2025-02-10T14:27:05.817Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-qqnx7 UID:f07c33b8-4d3f-47b5-91e5-25eecff2a7c3 APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:806 FieldPath:}" reason=Synced
time=2025-02-10T14:27:07.025Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-qqnx7 UID:f07c33b8-4d3f-47b5-91e5-25eecff2a7c3 APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:806 FieldPath:}" reason=Synced
time=2025-02-10T14:27:07.026Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-qqnx7 UID:f07c33b8-4d3f-47b5-91e5-25eecff2a7c3 APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:806 FieldPath:}" reason=Synced
time=2025-02-10T14:27:08.226Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-qqnx7 UID:f07c33b8-4d3f-47b5-91e5-25eecff2a7c3 APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:833 FieldPath:}" reason=Synced
time=2025-02-10T14:27:08.226Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-qqnx7 UID:f07c33b8-4d3f-47b5-91e5-25eecff2a7c3 APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:833 FieldPath:}" reason=Synced
time=2025-02-10T14:27:08.229Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-qqnx7 UID:f07c33b8-4d3f-47b5-91e5-25eecff2a7c3 APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:833 FieldPath:}" reason=Synced
time=2025-02-10T14:27:08.229Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-qqnx7 UID:f07c33b8-4d3f-47b5-91e5-25eecff2a7c3 APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:833 FieldPath:}" reason=Synced
time=2025-02-10T14:27:09.903Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-qqnx7 UID:f07c33b8-4d3f-47b5-91e5-25eecff2a7c3 APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:846 FieldPath:}" reason=Synced
time=2025-02-10T14:27:09.903Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-qqnx7 UID:f07c33b8-4d3f-47b5-91e5-25eecff2a7c3 APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:846 FieldPath:}" reason=Synced
time=2025-02-10T14:27:11.047Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-qqnx7 UID:f07c33b8-4d3f-47b5-91e5-25eecff2a7c3 APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:854 FieldPath:}" reason=Synced
time=2025-02-10T14:27:11.047Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-qqnx7 UID:f07c33b8-4d3f-47b5-91e5-25eecff2a7c3 APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:854 FieldPath:}" reason=Synced
time=2025-02-10T14:27:12.415Z level=DEBUG+3 msg="Successfully synced Bundle to namespaces that match this label selector: foo=bar" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-qqnx7 UID:f07c33b8-4d3f-47b5-91e5-25eecff2a7c3 APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:863 FieldPath:}" reason=Synced
time=2025-02-10T14:27:12.415Z level=DEBUG+3 msg="Successfully synced Bundle to namespaces that match this label selector: foo=bar" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-qqnx7 UID:f07c33b8-4d3f-47b5-91e5-25eecff2a7c3 APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:863 FieldPath:}" reason=Synced
time=2025-02-10T14:27:12.634Z level=DEBUG+3 msg="Successfully synced Bundle to namespaces that match this label selector: foo=bar" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-qqnx7 UID:f07c33b8-4d3f-47b5-91e5-25eecff2a7c3 APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:863 FieldPath:}" reason=Synced
time=2025-02-10T14:27:12.634Z level=DEBUG+3 msg="Successfully synced Bundle to namespaces that match this label selector: foo=bar" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-qqnx7 UID:f07c33b8-4d3f-47b5-91e5-25eecff2a7c3 APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:863 FieldPath:}" reason=Synced
time=2025-02-10T14:27:13.014Z level=DEBUG+3 msg="Successfully synced Bundle to namespaces that match this label selector: foo=bar" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-qqnx7 UID:f07c33b8-4d3f-47b5-91e5-25eecff2a7c3 APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:880 FieldPath:}" reason=Synced
time=2025-02-10T14:27:13.014Z level=DEBUG+3 msg="Successfully synced Bundle to namespaces that match this label selector: foo=bar" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-qqnx7 UID:f07c33b8-4d3f-47b5-91e5-25eecff2a7c3 APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:880 FieldPath:}" reason=Synced
time=2025-02-10T14:27:14.036Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-74bmh UID:c504608c-d10a-4363-a64d-af6169d7db2a APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:897 FieldPath:}" reason=Synced
time=2025-02-10T14:27:14.036Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-74bmh UID:c504608c-d10a-4363-a64d-af6169d7db2a APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:897 FieldPath:}" reason=Synced
time=2025-02-10T14:27:14.039Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-74bmh UID:c504608c-d10a-4363-a64d-af6169d7db2a APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:897 FieldPath:}" reason=Synced
time=2025-02-10T14:27:14.040Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-74bmh UID:c504608c-d10a-4363-a64d-af6169d7db2a APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:897 FieldPath:}" reason=Synced
time=2025-02-10T14:27:14.657Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-74bmh UID:c504608c-d10a-4363-a64d-af6169d7db2a APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:905 FieldPath:}" reason=Synced
time=2025-02-10T14:27:14.657Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-74bmh UID:c504608c-d10a-4363-a64d-af6169d7db2a APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:905 FieldPath:}" reason=Synced
time=2025-02-10T14:27:16.227Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-74bmh UID:c504608c-d10a-4363-a64d-af6169d7db2a APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:905 FieldPath:}" reason=Synced
time=2025-02-10T14:27:16.227Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-74bmh UID:c504608c-d10a-4363-a64d-af6169d7db2a APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:905 FieldPath:}" reason=Synced
time=2025-02-10T14:27:17.446Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-74bmh UID:c504608c-d10a-4363-a64d-af6169d7db2a APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:930 FieldPath:}" reason=Synced
time=2025-02-10T14:27:17.446Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-74bmh UID:c504608c-d10a-4363-a64d-af6169d7db2a APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:930 FieldPath:}" reason=Synced
time=2025-02-10T14:27:17.449Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-74bmh UID:c504608c-d10a-4363-a64d-af6169d7db2a APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:930 FieldPath:}" reason=Synced
time=2025-02-10T14:27:17.450Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-74bmh UID:c504608c-d10a-4363-a64d-af6169d7db2a APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:930 FieldPath:}" reason=Synced
time=2025-02-10T14:27:19.134Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-74bmh UID:c504608c-d10a-4363-a64d-af6169d7db2a APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:946 FieldPath:}" reason=Synced
time=2025-02-10T14:27:19.135Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-74bmh UID:c504608c-d10a-4363-a64d-af6169d7db2a APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:946 FieldPath:}" reason=Synced
time=2025-02-10T14:27:20.270Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-74bmh UID:c504608c-d10a-4363-a64d-af6169d7db2a APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:954 FieldPath:}" reason=Synced
time=2025-02-10T14:27:20.270Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-74bmh UID:c504608c-d10a-4363-a64d-af6169d7db2a APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:954 FieldPath:}" reason=Synced
time=2025-02-10T14:27:21.634Z level=DEBUG+3 msg="Successfully synced Bundle to namespaces that match this label selector: foo=bar" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-74bmh UID:c504608c-d10a-4363-a64d-af6169d7db2a APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:963 FieldPath:}" reason=Synced
time=2025-02-10T14:27:21.634Z level=DEBUG+3 msg="Successfully synced Bundle to namespaces that match this label selector: foo=bar" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-74bmh UID:c504608c-d10a-4363-a64d-af6169d7db2a APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:963 FieldPath:}" reason=Synced
time=2025-02-10T14:27:21.856Z level=DEBUG+3 msg="Successfully synced Bundle to namespaces that match this label selector: foo=bar" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-74bmh UID:c504608c-d10a-4363-a64d-af6169d7db2a APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:983 FieldPath:}" reason=Synced
time=2025-02-10T14:27:21.857Z level=DEBUG+3 msg="Successfully synced Bundle to namespaces that match this label selector: foo=bar" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-74bmh UID:c504608c-d10a-4363-a64d-af6169d7db2a APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:983 FieldPath:}" reason=Synced
time=2025-02-10T14:27:22.233Z level=DEBUG+3 msg="Successfully synced Bundle to namespaces that match this label selector: foo=bar" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-74bmh UID:c504608c-d10a-4363-a64d-af6169d7db2a APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:983 FieldPath:}" reason=Synced
time=2025-02-10T14:27:22.233Z level=DEBUG+3 msg="Successfully synced Bundle to namespaces that match this label selector: foo=bar" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-74bmh UID:c504608c-d10a-4363-a64d-af6169d7db2a APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:983 FieldPath:}" reason=Synced Without this PR: time=2025-02-10T15:01:53.760Z level=INFO msg="successfully loaded default package from filesystem" id=cert-manager-debian-bookworm-20230311.0-678d423fad6fb240 path=/packages/cert-manager-package-debian.json
time=2025-02-10T15:01:53.760Z level=INFO msg="registering webhook endpoints"
time=2025-02-10T15:01:53.760Z level=INFO msg="Registering a validating webhook" logger=controller-runtime/builder GVK="trust.cert-manager.io/v1alpha1, Kind=Bundle" path=/validate-trust-cert-manager-io-v1alpha1-bundle
time=2025-02-10T15:01:53.760Z level=INFO msg="Registering webhook" path=/validate-trust-cert-manager-io-v1alpha1-bundle logger=controller-runtime/webhook
time=2025-02-10T15:01:53.760Z level=INFO msg="Starting metrics server" logger=controller-runtime/metrics
time=2025-02-10T15:01:53.760Z level=INFO msg="starting server" name="health probe" addr=[::]:6060
time=2025-02-10T15:01:53.760Z level=INFO msg="Starting webhook server" logger=controller-runtime/webhook
time=2025-02-10T15:01:53.760Z level=INFO msg="attempting to acquire leader lease cert-manager/trust-manager-leader-election..."
time=2025-02-10T15:01:53.760Z level=INFO msg="Updated current TLS certificate" logger=controller-runtime/certwatcher
time=2025-02-10T15:01:53.760Z level=INFO msg="Serving webhook server" logger=controller-runtime/webhook host=0.0.0.0 port=6443
time=2025-02-10T15:01:53.760Z level=INFO msg="Serving metrics server" logger=controller-runtime/metrics bindAddress=0.0.0.0:9402 secure=false
time=2025-02-10T15:01:53.760Z level=INFO msg="Starting certificate poll+watcher" logger=controller-runtime/certwatcher interval=10s
time=2025-02-10T15:01:53.763Z level=INFO msg="successfully acquired lease cert-manager/trust-manager-leader-election"
time=2025-02-10T15:01:53.763Z level=DEBUG+3 msg="trust-manager-c454c5c49-sgs6m_e70dec3e-efdd-438b-aeb5-643add956f18 became leader" logger=events type=Normal object="{Kind:Lease Namespace:cert-manager Name:trust-manager-leader-election UID:c8914115-ccdb-44e0-bac5-f3375c8f9b28 APIVersion:coordination.k8s.io/v1 ResourceVersion:739 FieldPath:}" reason=LeaderElection
time=2025-02-10T15:01:53.764Z level=INFO msg="Starting EventSource" controller=bundles source="kind source: *v1.PartialObjectMetadata"
time=2025-02-10T15:01:53.764Z level=INFO msg="Starting EventSource" controller=bundles source="kind source: *v1.ConfigMap"
time=2025-02-10T15:01:53.764Z level=INFO msg="Starting EventSource" controller=bundles source="kind source: *v1alpha1.Bundle"
time=2025-02-10T15:01:53.764Z level=INFO msg="Starting EventSource" controller=bundles source="kind source: *v1.Secret"
time=2025-02-10T15:01:53.764Z level=INFO msg="Starting EventSource" controller=bundles source="kind source: *v1.Namespace"
time=2025-02-10T15:01:53.764Z level=INFO msg="Starting EventSource" controller=bundles source="kind source: *v1.PartialObjectMetadata"
time=2025-02-10T15:01:53.869Z level=INFO msg="Starting Controller" controller=bundles
time=2025-02-10T15:01:53.869Z level=INFO msg="Starting workers" controller=bundles "worker count"=1
time=2025-02-10T15:02:10.867Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-b9wjk UID:d7ddaede-e4c8-4ab6-80a8-f167fc31768b APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:785 FieldPath:}" reason=Synced
time=2025-02-10T15:02:10.867Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-b9wjk UID:d7ddaede-e4c8-4ab6-80a8-f167fc31768b APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:785 FieldPath:}" reason=Synced
time=2025-02-10T15:02:10.873Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-b9wjk UID:d7ddaede-e4c8-4ab6-80a8-f167fc31768b APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:785 FieldPath:}" reason=Synced
time=2025-02-10T15:02:10.873Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-b9wjk UID:d7ddaede-e4c8-4ab6-80a8-f167fc31768b APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:785 FieldPath:}" reason=Synced
time=2025-02-10T15:02:12.285Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-b9wjk UID:d7ddaede-e4c8-4ab6-80a8-f167fc31768b APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:795 FieldPath:}" reason=Synced
time=2025-02-10T15:02:12.285Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-b9wjk UID:d7ddaede-e4c8-4ab6-80a8-f167fc31768b APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:795 FieldPath:}" reason=Synced
time=2025-02-10T15:02:13.870Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-b9wjk UID:d7ddaede-e4c8-4ab6-80a8-f167fc31768b APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:795 FieldPath:}" reason=Synced
time=2025-02-10T15:02:13.870Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-b9wjk UID:d7ddaede-e4c8-4ab6-80a8-f167fc31768b APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:795 FieldPath:}" reason=Synced
time=2025-02-10T15:02:15.078Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-b9wjk UID:d7ddaede-e4c8-4ab6-80a8-f167fc31768b APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:822 FieldPath:}" reason=Synced
time=2025-02-10T15:02:15.078Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-b9wjk UID:d7ddaede-e4c8-4ab6-80a8-f167fc31768b APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:822 FieldPath:}" reason=Synced
time=2025-02-10T15:02:16.766Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-b9wjk UID:d7ddaede-e4c8-4ab6-80a8-f167fc31768b APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:833 FieldPath:}" reason=Synced
time=2025-02-10T15:02:16.766Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-b9wjk UID:d7ddaede-e4c8-4ab6-80a8-f167fc31768b APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:833 FieldPath:}" reason=Synced
time=2025-02-10T15:02:17.901Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-b9wjk UID:d7ddaede-e4c8-4ab6-80a8-f167fc31768b APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:841 FieldPath:}" reason=Synced
time=2025-02-10T15:02:17.901Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-b9wjk UID:d7ddaede-e4c8-4ab6-80a8-f167fc31768b APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:841 FieldPath:}" reason=Synced
time=2025-02-10T15:02:19.270Z level=DEBUG+3 msg="Successfully synced Bundle to namespaces that match this label selector: foo=bar" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-b9wjk UID:d7ddaede-e4c8-4ab6-80a8-f167fc31768b APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:850 FieldPath:}" reason=Synced
time=2025-02-10T15:02:19.270Z level=DEBUG+3 msg="Successfully synced Bundle to namespaces that match this label selector: foo=bar" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-b9wjk UID:d7ddaede-e4c8-4ab6-80a8-f167fc31768b APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:850 FieldPath:}" reason=Synced
time=2025-02-10T15:02:19.496Z level=DEBUG+3 msg="Successfully synced Bundle to namespaces that match this label selector: foo=bar" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-b9wjk UID:d7ddaede-e4c8-4ab6-80a8-f167fc31768b APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:850 FieldPath:}" reason=Synced
time=2025-02-10T15:02:19.496Z level=DEBUG+3 msg="Successfully synced Bundle to namespaces that match this label selector: foo=bar" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-b9wjk UID:d7ddaede-e4c8-4ab6-80a8-f167fc31768b APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:850 FieldPath:}" reason=Synced
time=2025-02-10T15:02:19.871Z level=DEBUG+3 msg="Successfully synced Bundle to namespaces that match this label selector: foo=bar" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-b9wjk UID:d7ddaede-e4c8-4ab6-80a8-f167fc31768b APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:869 FieldPath:}" reason=Synced
time=2025-02-10T15:02:19.872Z level=DEBUG+3 msg="Successfully synced Bundle to namespaces that match this label selector: foo=bar" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-b9wjk UID:d7ddaede-e4c8-4ab6-80a8-f167fc31768b APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:869 FieldPath:}" reason=Synced
time=2025-02-10T15:02:20.100Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-s9vcd UID:b325c602-45da-46cd-bc8d-bb2789e4db8d APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:884 FieldPath:}" reason=Synced
time=2025-02-10T15:02:20.100Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-s9vcd UID:b325c602-45da-46cd-bc8d-bb2789e4db8d APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:884 FieldPath:}" reason=Synced
time=2025-02-10T15:02:20.103Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-s9vcd UID:b325c602-45da-46cd-bc8d-bb2789e4db8d APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:884 FieldPath:}" reason=Synced
time=2025-02-10T15:02:20.103Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-s9vcd UID:b325c602-45da-46cd-bc8d-bb2789e4db8d APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:884 FieldPath:}" reason=Synced
time=2025-02-10T15:02:20.495Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-s9vcd UID:b325c602-45da-46cd-bc8d-bb2789e4db8d APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:892 FieldPath:}" reason=Synced
time=2025-02-10T15:02:20.496Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-s9vcd UID:b325c602-45da-46cd-bc8d-bb2789e4db8d APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:892 FieldPath:}" reason=Synced
time=2025-02-10T15:02:22.317Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-s9vcd UID:b325c602-45da-46cd-bc8d-bb2789e4db8d APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:892 FieldPath:}" reason=Synced
time=2025-02-10T15:02:22.317Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-s9vcd UID:b325c602-45da-46cd-bc8d-bb2789e4db8d APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:892 FieldPath:}" reason=Synced
time=2025-02-10T15:02:23.516Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-s9vcd UID:b325c602-45da-46cd-bc8d-bb2789e4db8d APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:915 FieldPath:}" reason=Synced
time=2025-02-10T15:02:23.516Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-s9vcd UID:b325c602-45da-46cd-bc8d-bb2789e4db8d APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:915 FieldPath:}" reason=Synced
time=2025-02-10T15:02:23.519Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-s9vcd UID:b325c602-45da-46cd-bc8d-bb2789e4db8d APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:915 FieldPath:}" reason=Synced
time=2025-02-10T15:02:23.519Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-s9vcd UID:b325c602-45da-46cd-bc8d-bb2789e4db8d APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:915 FieldPath:}" reason=Synced
time=2025-02-10T15:02:25.188Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-s9vcd UID:b325c602-45da-46cd-bc8d-bb2789e4db8d APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:932 FieldPath:}" reason=Synced
time=2025-02-10T15:02:25.188Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-s9vcd UID:b325c602-45da-46cd-bc8d-bb2789e4db8d APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:932 FieldPath:}" reason=Synced
time=2025-02-10T15:02:25.193Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-s9vcd UID:b325c602-45da-46cd-bc8d-bb2789e4db8d APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:932 FieldPath:}" reason=Synced
time=2025-02-10T15:02:25.193Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-s9vcd UID:b325c602-45da-46cd-bc8d-bb2789e4db8d APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:932 FieldPath:}" reason=Synced
time=2025-02-10T15:02:26.336Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-s9vcd UID:b325c602-45da-46cd-bc8d-bb2789e4db8d APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:940 FieldPath:}" reason=Synced
time=2025-02-10T15:02:26.336Z level=DEBUG+3 msg="Successfully synced Bundle to all namespaces" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-s9vcd UID:b325c602-45da-46cd-bc8d-bb2789e4db8d APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:940 FieldPath:}" reason=Synced
time=2025-02-10T15:02:27.706Z level=DEBUG+3 msg="Successfully synced Bundle to namespaces that match this label selector: foo=bar" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-s9vcd UID:b325c602-45da-46cd-bc8d-bb2789e4db8d APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:949 FieldPath:}" reason=Synced
time=2025-02-10T15:02:27.706Z level=DEBUG+3 msg="Successfully synced Bundle to namespaces that match this label selector: foo=bar" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-s9vcd UID:b325c602-45da-46cd-bc8d-bb2789e4db8d APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:949 FieldPath:}" reason=Synced
time=2025-02-10T15:02:27.924Z level=DEBUG+3 msg="Successfully synced Bundle to namespaces that match this label selector: foo=bar" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-s9vcd UID:b325c602-45da-46cd-bc8d-bb2789e4db8d APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:966 FieldPath:}" reason=Synced
time=2025-02-10T15:02:27.924Z level=DEBUG+3 msg="Successfully synced Bundle to namespaces that match this label selector: foo=bar" logger=events type=Normal object="{Kind:Bundle Namespace: Name:test-bundle-s9vcd UID:b325c602-45da-46cd-bc8d-bb2789e4db8d APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:966 FieldPath:}" reason=Synced
time=2025-02-10T15:02:28.106Z level=ERROR msg="failed sync bundle to target namespace" controller=bundles namespace="" name=test-bundle-s9vcd reconcileID=4c4029f4-8b40-407b-a7e9-dc2413e8754f target=trust-test-smoke-random-namespace-77mgm/test-bundle-s9vcd err="failed to patch ConfigMap trust-test-smoke-random-namespace-77mgm/test-bundle-s9vcd: configmaps \"test-bundle-s9vcd\" is forbidden: unable to create new content in namespace trust-test-smoke-random-namespace-77mgm because it is being terminated"
time=2025-02-10T15:02:28.106Z level=DEBUG+3 msg="Failed to sync target ConfigMap in Namespace \"trust-test-smoke-random-namespace-77mgm\": failed to patch ConfigMap trust-test-smoke-random-namespace-77mgm/test-bundle-s9vcd: configmaps \"test-bundle-s9vcd\" is forbidden: unable to create new content in namespace trust-test-smoke-random-namespace-77mgm because it is being terminated" logger=events type=Warning object="{Kind:Bundle Namespace: Name:test-bundle-s9vcd UID:b325c602-45da-46cd-bc8d-bb2789e4db8d APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:966 FieldPath:}" reason=SyncConfigMapTargetFailed
time=2025-02-10T15:02:28.107Z level=DEBUG+3 msg="Failed to sync target ConfigMap in Namespace \"trust-test-smoke-random-namespace-77mgm\": failed to patch ConfigMap trust-test-smoke-random-namespace-77mgm/test-bundle-s9vcd: configmaps \"test-bundle-s9vcd\" is forbidden: unable to create new content in namespace trust-test-smoke-random-namespace-77mgm because it is being terminated" logger=events type=Warning object="{Kind:Bundle Namespace: Name:test-bundle-s9vcd UID:b325c602-45da-46cd-bc8d-bb2789e4db8d APIVersion:trust.cert-manager.io/v1alpha1 ResourceVersion:966 FieldPath:}" reason=SyncConfigMapTargetFailed
time=2025-02-10T15:02:28.107Z level=ERROR msg="Reconciler error" controller=bundles namespace="" name=test-bundle-s9vcd reconcileID=4c4029f4-8b40-407b-a7e9-dc2413e8754f err="failed to apply bundle status patch: bundles.trust.cert-manager.io \"test-bundle-s9vcd\" not found" |
Signed-off-by: Erik Godding Boye <egboye@gmail.com>
8779ee4
to
cb0119d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
Thanks for this, really great improvement!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: SgtCoDFish The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
As noted in #442 (comment), it seems like we prefer to use the Context to pass around the logger. I've also been annoyed by this when attempting to refactor code. 🦄
This PR removes all use of Logger as fields in structs - except for the CertPool, which will probably be refactored out of this repository to a more reusable module.
This change will most certainly change the looks of trust-manager logs. Instead of creating a many sub-loggers, we now rely on controller-runtime to initialize the logger supplied with Context. To my experience it does a pretty good job enriching the structured logger with relevant key/value pairs.