-
Notifications
You must be signed in to change notification settings - Fork 485
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
update crio regex for intra-pod workload attestation #4946
Conversation
Signed-off-by: Christopher Johnson <[email protected]>
Signed-off-by: Christopher Johnson <[email protected]>
Thank you very much for sending this @critterjohnson - we assigned @azdagron who is doing some related work right now. He should touch back here in the next week or two with an update. Thanks for your patience |
@azdagron any updates here? I saw y'all moved the milestone for the cgroups issue to 1.9.3. Of course this is part of that larger issue, but this is a good band-aid for this use case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @critterjohnson. This looks good and I'm glad it solves your edge case.
The work to more fully support cgroups v2 will almost completely replace our algorithm used to determine the container ID. When I have a PR ready, I'd love for you to give it a go in your environment.
Hmm, looks like this breaks existing unit tests.
There is a check that a given cgroup only matches one regex. Matching more than one regex isn't actually problematic unless the match would yield a different set of results, but the code isn't that smart (yet). Since both this PR and the cgroups v2 support work that is under way are both slated for 1.9.3, one option is to just wait to see if that cgroups v2 work covers this case sufficiently. Otherwise, we'll need to change the code to relax a little like i described above. |
Or we could tighten the regex a little. I'll take a look this weekend; I had this passing unit tests locally originally but they're failing now. |
Thanks again for putting this fix together @critterjohnson. I was finally able to get #5076 opened to more robustly handle cgroups v2 support. This fix should no longer be necessary. So I'll go ahead and close out the PR. Do you think you'd have time to test #5076 against your crio setup? You'd need to check it out and build an agent image. Then, to enable it, you have to turn on the new support in the agent configuration for the "k8s" WorkloadAttestor plugin.
If enabled, you should see a line like the following on startup:
|
@azdagron Would love to try this on our env - I'll do it next week. Thanks! |
@critterjohnson awesome! For what it's worth, the nightly image has been built with the change, so it should be a little easier to test with. |
Pull Request check list
Affected functionality
This PR updates the
cgroup
regex for workloads in the same pod as the agent. It affects thek8s
WorkloadAttestor.Description of change
This PR updates the
cgroup
regex for workloads in the same pod as the agent. Without this, any containers in the the agent's pod cannot verify with the agent.Which issue this PR fixes
fixes #4917