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

Print the involved object in the event table as resource/name #73894

Merged
merged 1 commit into from
Feb 13, 2019

Conversation

smarterclayton
Copy link
Contributor

The involved object is important and only some events include its
name in the message. Change the Kind column to Object and print
the object in resource/name form to allow copy and paste
to kubectl get. Also move the source field column to the right
of involved object since it is related.

LAST SEEN   TYPE      REASON                TARGET                                       MESSAGE
37m         Normal    Started               pod/packageserver-85c97ff46c-gf47k           Started container
37m         Normal    Created               pod/packageserver-85c97ff46c-gf47k           Created container
37m         Normal    SuccessfulDelete      replicaset/packageserver-5fdc7b6854          Deleted pod: packageserver-5fdc7b6854-bgrwd

/kind bug

NONE

The involved object is important and only some events include its
name in the message. Change the `Kind` column to `Object` and print
the object in `resource/name` form to allow copy and paste
to `kubectl get`. Also move the source field column to the right
of involved object since it is related.
@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Feb 11, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: smarterclayton

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 11, 2019
@smarterclayton
Copy link
Contributor Author

/assign @juanvallejo
/assign @soltysh

@smarterclayton
Copy link
Contributor Author

/retest

@smarterclayton smarterclayton added the sig/cli Categorizes an issue or PR as relevant to SIG CLI. label Feb 13, 2019
@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Feb 13, 2019
Copy link
Contributor

@soltysh soltysh left a comment

Choose a reason for hiding this comment

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

/lgtm

@smarterclayton
Copy link
Contributor Author

/retest

@k8s-ci-robot k8s-ci-robot merged commit 4005025 into kubernetes:master Feb 13, 2019
@@ -1385,15 +1385,21 @@ func printEvent(obj *api.Event, options printers.PrintOptions) ([]metav1beta1.Ta
firstTimestamp = translateTimestampSince(obj.FirstTimestamp)
lastTimestamp = translateTimestampSince(obj.LastTimestamp)
}
var target string
if len(obj.InvolvedObject.Name) > 0 {
target = fmt.Sprintf("%s/%s", strings.ToLower(obj.InvolvedObject.Kind), obj.InvolvedObject.Name)
Copy link
Contributor

Choose a reason for hiding this comment

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

I thought "%s %s" is more friendly to copy/paste

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/cli Categorizes an issue or PR as relevant to SIG CLI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants