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

Extract image SHAs from status.containerStatuses as well as spec.containers #395

Merged

Conversation

KevinMGranger
Copy link
Collaborator

@KevinMGranger KevinMGranger commented Mar 15, 2022

Behavior Changes

The deploytime exporter will now check a pod's status.containerStatuses for image IDs as well.

Linked Issues?

resolves #330

Testing Instructions

I'm planning on adding a simple mock for our deploytime exporter as well, which will have some images that don't have the ID in their spec.

@redhat-cop/mdt

Remaining Work

  • I need to see if pod.status.containerStatuses might list sidecars from MutatingAdmissionControllers (e.g. from Istio / Service Mesh), which we wouldn't want to count. It's also possible that those are already included in spec.containers, which would be a separate issue.
  • add a unit test / address new unit test failures
  • [ ] I need to add the mock as mentioned above.

@KevinMGranger KevinMGranger added the kind/feature Categorizes issue or PR as related to a new feature. label Mar 15, 2022
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 15, 2022
@openshift-ci
Copy link

openshift-ci bot commented Mar 15, 2022

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@KevinMGranger
Copy link
Collaborator Author

Yes, sidecars will show up and be counted in the deploytime metric. This happens in both the spec and the status.

However, this is a tricky problem to solve overall-- a commit in a repo could change some config-as-code that affects the sidecar, meaning the metric would be valid.

In any case, since this is an existing issue, that's separate from this PR.

@etsauer
Copy link
Collaborator

etsauer commented Apr 1, 2022

Bump. Any updates on this?

@KevinMGranger
Copy link
Collaborator Author

@etsauer the update is that I had a nice vacation and am back to working on this today. All that's left is to add / check the mocked API for testing this, and investigate the unit test failure that CI turned up.

@etsauer
Copy link
Collaborator

etsauer commented Apr 4, 2022

@KevinMGranger 🤣 welcome back!

KevinMGranger added a commit to KevinMGranger/pelorus that referenced this pull request Apr 4, 2022
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 4, 2022
@KevinMGranger
Copy link
Collaborator Author

I forgot that we only have mocks for committime for now.

Mocking this can come later-- the unit test should be sufficient.

@KevinMGranger KevinMGranger marked this pull request as ready for review April 4, 2022 19:58
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 4, 2022
@KevinMGranger
Copy link
Collaborator Author

Hmm, looks like our python version pinning is complaining about the new version. @mpryc, is there a reason we restricted the patch version of the python version?

@mpryc
Copy link
Collaborator

mpryc commented Apr 5, 2022

@KevinMGranger there is not, I think it's safe to include the removal of patch in this PR.

Copy link
Collaborator

@etsauer etsauer left a comment

Choose a reason for hiding this comment

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

LGTM

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 6, 2022
@openshift-ci
Copy link

openshift-ci bot commented Apr 6, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: etsauer, KevinMGranger

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 [KevinMGranger,etsauer]

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

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. feature kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for other image references in deploytime exporter
3 participants