-
Notifications
You must be signed in to change notification settings - Fork 8
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
hook: Match on pod name #22
Conversation
Annotations are denylisted due to cri-o/cri-o#8090 and related Signed-off-by: Fabian Deutsch <[email protected]>
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.
Fixes the recent regression, however, a bit ugly because pod match is in shell, not in hook config.
@enp0s3 please review.
@@ -4,9 +4,7 @@ | |||
"path": "/opt/oci-hook-swap.sh" | |||
}, | |||
"when": { | |||
"annotations": { |
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.
Ideally here we match on io.kubernetes.pod.name
but I was not able to make it work with
- "always": true
+ "annotations": {
+ "^io\\.kubernetes\\.pod\\.name$": "^virt-launcher.*"
in hook.json
|
||
if [[ "$CG_PATH" =~ .*"burst".* ]]; | ||
if [[ "$CG_PATH" =~ .*"burst".* && "$POD_NAME" =~ "virt-launcher".* ]]; |
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.
Workaround, because
- "always": true
+ "annotations": {
+ "^io\\.kubernetes\\.pod\\.name$": "^virt-launcher.*"
in hook.json
did not work.
Self-merging to get a working image. |
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.
/approve
@fabiand Great catch!
Annotations are denylisted due to cri-o/cri-o#8090 and related