-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
62ab2f3
commit c9391b6
Showing
6 changed files
with
75 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
[id='setting-priority_{context}'] | ||
= Configuring pod priority | ||
|
||
[role="_abstract"] | ||
Create one or more priority classes to indicate the importance of a pod relative to other pods. | ||
Pods with higher priority are scheduled ahead of pods with lower priority, ensuring prioritization of pods running critical workloads, especially when resources become constrained. | ||
|
||
.Prerequisites | ||
* Have `cluster-admin` access to {k8s}. | ||
|
||
.Procedure | ||
. Define a `PriorityClass` object by specifying its name and value. | ||
+ | ||
|
||
.high-priority.yaml | ||
[source,yaml] | ||
---- | ||
include::yaml/priority_class.yaml[] | ||
---- | ||
. Create the priority class. | ||
+ | ||
[source,options="nowrap",subs=attributes+] | ||
---- | ||
{oc_create} -f high-priority.yaml | ||
---- | ||
|
||
. Reference the priority class name in the pod configuration. | ||
+ | ||
.Infinispan CR | ||
[source,yaml] | ||
---- | ||
include::yaml/priority_class_CR.yaml[] | ||
---- | ||
+ | ||
You must reference an existing priority class name, otherwise the pod is rejected. | ||
|
||
. Apply the changes. | ||
|
||
.PriorityClass fields | ||
[%header,cols=2*] | ||
|=== | ||
| Field | Description | ||
|
||
| `PriorityClassName` | ||
| The name of the priority class. | ||
|
||
| `PriorityClassValue` | ||
| An integer indicating the priority level. The higher the value, the higher the priority. | ||
|
||
| `PriorityClassDescription` | ||
| An optional field for providing context about the priority class. | ||
|=== | ||
|
||
[role="_additional-resources"] | ||
.Additional resources | ||
* link:{pod_priority_reference} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: scheduling.k8s.io/v1 | ||
kind: PriorityClass | ||
metadata: | ||
name: high-priority | ||
value: 1000000 | ||
globalDefault: false | ||
description: "Use this priority class for high priority service pods only." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
kind: Infinispan | ||
... | ||
spec: | ||
scheduling: | ||
affinity: | ||
... | ||
priorityClassName: "high-priority" | ||
... |