Skip to content

Commit

Permalink
Merge pull request #768 from abaruni/topic/badnan/quota-webhook-cel-fix
Browse files Browse the repository at this point in the history
🐛 Correctly handle optional, nillable path in CEL expression
  • Loading branch information
akutz authored Oct 24, 2024
2 parents 38b38ba + a8ec872 commit 7941a83
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion config/webhook/storage_quota_webhook_configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,8 @@ webhooks:
- virtualmachines
sideEffects: None
matchConditions:
- expression: oldObject.spec.advanced.bootDiskCapacity != object.spec.advanced.bootDiskCapacity
- expression: has(object.spec.advanced) && has(object.spec.advanced.bootDiskCapacity)
&& ((!has(oldObject.spec.advanced) || !has(oldObject.spec.advanced.bootDiskCapacity))
|| (has(oldObject.spec.advanced) && has(oldObject.spec.advanced.bootDiskCapacity)
&& object.spec.advanced.bootDiskCapacity != oldObject.spec.advanced.bootDiskCapacity))
name: boot-disk-change

0 comments on commit 7941a83

Please sign in to comment.