Datasets:
File size: 579 Bytes
df0899b | 1 2 3 4 5 6 7 8 9 10 11 12 13 | variables:
- name: sharingHostIPC
expression: |
has(variables.anyObject.spec.hostIPC) ? variables.anyObject.spec.hostIPC : false
- name: sharingHostPID
expression: |
has(variables.anyObject.spec.hostPID) ? variables.anyObject.spec.hostPID : false
- name: sharingNamespace
expression: |
variables.sharingHostIPC || variables.sharingHostPID
validations:
- expression: '(has(request.operation) && request.operation == "UPDATE") || !variables.sharingNamespace'
messageExpression: '"Sharing the host namespace is not allowed: " + variables.anyObject.metadata.name' |