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

podinfo: Populate workload info #1493

Merged
merged 1 commit into from
Sep 20, 2023
Merged

podinfo: Populate workload info #1493

merged 1 commit into from
Sep 20, 2023

Conversation

michi-covalent
Copy link
Contributor

@michi-covalent michi-covalent commented Sep 19, 2023

  • Add WorkloadType and WorkloadObject fields to PodInfo.
  • Export workload.GetWorkloadMetaFromPod() function so that the operator
    can call it to set WorkloadType and WorkloadObject fields.
  • Update equal() function to take these fields into account.

I opted for defining a new WorkloadObjectMeta type instead of using
metav1.ObjectMeta to avoid generating unnecessary "unknown field" log
messages. See 1 for additional context.

Signed-off-by: Michi Mutsuzaki michi@isovalent.com

@michi-covalent michi-covalent added the release-note/misc This PR makes changes that have no direct user impact. label Sep 19, 2023
@michi-covalent michi-covalent force-pushed the pr/michi/workload branch 5 times, most recently from c493ba0 to 045a3a5 Compare September 19, 2023 20:19
@netlify
Copy link

netlify bot commented Sep 19, 2023

Deploy Preview for tetragon ready!

Name Link
🔨 Latest commit 045a3a5
🔍 Latest deploy log https://app.netlify.com/sites/tetragon/deploys/650a023a61b38a0008ce49bd
😎 Deploy Preview https://deploy-preview-1493--tetragon.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@michi-covalent michi-covalent force-pushed the pr/michi/workload branch 2 times, most recently from 3d8f765 to d058504 Compare September 19, 2023 21:41
@michi-covalent michi-covalent marked this pull request as ready for review September 19, 2023 22:14
@michi-covalent michi-covalent requested a review from a team as a code owner September 19, 2023 22:14
Copy link
Contributor

@lambdanis lambdanis left a comment

Choose a reason for hiding this comment

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

looks good, I have one question.

pkg/process/workload.go Outdated Show resolved Hide resolved
- Add WorkloadType and WorkloadObject fields to PodInfo.
- Export workload.GetWorkloadMetaFromPod() function so that the operator
  can call it to set WorkloadType and WorkloadObject fields.
- Update equal() function to take these fields into account.

I opted for defining a new WorkloadObjectMeta type instead of using
metav1.ObjectMeta to avoid generating unnecessary "unknown field" log
messages. See [1] for additional context.

[1]: kubernetes-sigs/controller-tools#448

Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
Copy link
Contributor

@lambdanis lambdanis left a comment

Choose a reason for hiding this comment

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

:shipit:

@michi-covalent michi-covalent merged commit 067b84a into main Sep 20, 2023
28 checks passed
@michi-covalent michi-covalent deleted the pr/michi/workload branch September 20, 2023 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants