Skip to content

Commit

Permalink
fix admission policy: need to exampt appwrapper-owned controller reso…
Browse files Browse the repository at this point in the history
…urces (#32)
  • Loading branch information
dgrove-oss authored Aug 7, 2024
1 parent cb74599 commit a31a8ab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions setup.k8s-v1.30/admission-policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ spec:
apiVersions: ["v1"]
operations: ["CREATE", "UPDATE"]
resources: ["rayjobs","rayclusters"]
matchConditions:
- name: exclude-appwrapper-owned
expression: "!(has(object.metadata.ownerReferences) && object.metadata.ownerReferences.exists(o, o.apiVersion=='workload.codeflare.dev/v1beta2'&&o.kind=='AppWrapper'&&o.controller))"
validations:
- expression: "has(object.metadata.labels) && 'kueue.x-k8s.io/queue-name' in object.metadata.labels && object.metadata.labels['kueue.x-k8s.io/queue-name'] != ''"
message: "All non-AppWrapper workloads must have a 'kueue.x-k8s.io/queue-name' label with non-empty value."
Expand Down

0 comments on commit a31a8ab

Please sign in to comment.