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

Include pod metadata in must-gather output #185

Merged

Conversation

black-dragon74
Copy link
Member

@black-dragon74 black-dragon74 commented Aug 7, 2024

This PR adds support of fetching the pod metadata
using the kubernetes API.

An additional pod-metadata.json file is created in the report with the dump of entire metadata for the pod.

A much simpler debug log stating the image version being used is printed to the console as well.

The image details are printed to console like:

[must-gather      ] OUT 2024-08-07T15:21:19.386616439Z namespace/openshift-must-gather-8452x created
[must-gather      ] OUT 2024-08-07T15:21:19.39445305Z clusterrolebinding.rbac.authorization.k8s.io/must-gather-jkbhm created
[must-gather      ] OUT 2024-08-07T15:21:19.429835897Z pod for plug-in image quay.io/niryadav/odf-must-gather:infot7 created
[must-gather-2d5hn] POD 2024-08-07T15:21:26.932423529Z volume percentage checker started.....
[must-gather-2d5hn] POD 2024-08-07T15:21:26.968008955Z volume usage percentage 0
[must-gather-2d5hn] POD 2024-08-07T15:21:27.126271465Z must-gather is using image: quay.io/niryadav/odf-must-gather:infot7 <==========================

Since we are fetching the pod details we can also have a JSON file say pod-metadata.json which will be a JSON dump of kubectl get pod <mg-pod>

❯ cat gather-debug.log | grep image
must-gather is using image: quay.io/niryadav/odf-must-gather:infot7

❯ cat pod-metadata.json | grep -o '"image": "[^"]*"' | head -n 1
"image": "quay.io/niryadav/odf-must-gather:infot7"

This feature is requested by BZ: 2290500

Regards

@openshift-ci openshift-ci bot added the approved label Aug 7, 2024
This PR adds support of fetching the pod metadata
using the kubernetes API.

An additional pod-metadata.json file is created in the
report with the dump of entire metadata for the pod.

A much simpler debug log stating the image version being
used is printed to the console as well.

Signed-off-by: Niraj Yadav <[email protected]>
@black-dragon74
Copy link
Member Author

/cherry-pick release-4.17

@openshift-cherrypick-robot

@black-dragon74: once the present PR merges, I will cherry-pick it on top of release-4.17 in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.17

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@black-dragon74 black-dragon74 requested a review from yati1998 August 7, 2024 15:47
@black-dragon74
Copy link
Member Author

@yati1998 PTAL

Copy link
Contributor

openshift-ci bot commented Aug 20, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: black-dragon74, yati1998

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 [black-dragon74,yati1998]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 4dabb34 into red-hat-storage:main Aug 20, 2024
5 checks passed
@openshift-cherrypick-robot

@black-dragon74: new pull request created: #189

In response to this:

/cherry-pick release-4.17

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants