knative / serving-operator

DEPRECATED: Development continues in https://github.com/knative/operator/
Apache License 2.0
39 stars 45 forks source link

Print log message when start deleting resources #372

Closed nak3 closed 4 years ago

nak3 commented 4 years ago

Proposed Changes

This patch makes a tiny change to add log message when operator deletes resources.

Currently there are no logs so it is difficult to debug when resources are not deleted.

After this patch:

{"level":"info","ts":"2020-03-23T05:36:28.296Z","logger":"serving-operator.knativeserving-controller","caller":"knativeserving/knativeserving_controller.go:249","msg":"Deleting resources","commit":"d558b3a","knative.dev/controller":"knativeserving-controller"}

/lint

Release Note

NONE
nak3 commented 4 years ago

Some more context.

I am looking into the issue about the resource deletion issue. The CI produced following error:

    --- FAIL: TestKnativeServingDeployment/delete (11.26s)
        verify.go:216: The ClusterRole knative-serving-admin failed to be deleted: <nil>

But no clue in the logs and no "Deleting" message from manifestival. So, this patch prints the logs to see if operator triggered the delete func or not.

jcrossley3 commented 4 years ago

But no clue in the logs and no "Deleting" message from manifestival.

Just an FYI, but manifestival will typically only delete those resources in the manifest the garbage collector fails to reap when the "owning" KS resource is deleted. There is a race condition there, obviously, which shouldn't be a problem but will explain why you might not see any "Deleting" message.

knative-prow-robot commented 4 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jcrossley3, nak3

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: - ~~[OWNERS](https://github.com/knative/serving-operator/blob/master/OWNERS)~~ [jcrossley3] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment