Skip to content

Commit

Permalink
Add support for OpenShift management workload partitioning
Browse files Browse the repository at this point in the history
Add annotations for OpenShift management workload partitioning.
Administrators can opt into the feature by annotating the namespace
with workload.openshift.io/allowed: management. Otherwise, these
annotations will have no effect.

Signed-off-by: Andreas Karis <ak.karis@gmail.com>
  • Loading branch information
andreaskaris committed May 7, 2024
1 parent f6f601e commit 1ccb60f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions assets/100-labeler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ data:
app: accelerator-discovery
template:
metadata:
annotations:
target.workload.openshift.io/management: |
{"effect": "PreferredDuringScheduling"}
labels:
app: accelerator-discovery
name: accelerator-discovery
Expand Down
3 changes: 3 additions & 0 deletions assets/200-device-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ data:
app: sriov-device-plugin-daemonset
template:
metadata:
annotations:
target.workload.openshift.io/management: |
{"effect": "PreferredDuringScheduling"}
labels:
app: sriov-device-plugin-daemonset
spec:
Expand Down
2 changes: 2 additions & 0 deletions assets/300-daemon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ data:
# a failure. This annotation works in tandem with the toleration below.
annotations:
scheduler.alpha.kubernetes.io/critical-pod: ""
target.workload.openshift.io/management: |
{"effect": "PreferredDuringScheduling"}
labels:
app: sriov-fec-daemonset
spec:
Expand Down
2 changes: 2 additions & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ spec:
metadata:
annotations:
kubectl.kubernetes.io/default-container: manager
target.workload.openshift.io/management: |
{"effect": "PreferredDuringScheduling"}
labels:
control-plane: controller-manager
spec:
Expand Down
6 changes: 6 additions & 0 deletions spec/openshift-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ Create the project:
```shell
[user@ctrl1 /home]# oc new-project vran-acceleration-operators
```

**Optional:** Annotate the project to enable management workload partitioning:
```
oc annotate namespace vran-acceleration-operators workload.openshift.io/allowed=management
```

Execute following commands on cluster:

Create an operator group and the subscriptions (all the commands are run in the `vran-acceleration-operators` namespace):
Expand Down

0 comments on commit 1ccb60f

Please sign in to comment.