-
Notifications
You must be signed in to change notification settings - Fork 306
priority class for ocp cluster #7948
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
priority class for ocp cluster #7948
Conversation
Code Review by Gemini```diff
--- a/components/kueue/production/kflux-ocp-p01/queue-config/workload-priority-class.yaml
+++ b/components/kueue/production/kflux-ocp-p01/queue-config/workload-priority-class.yaml
@@ -0,0 +1,70 @@
+---
+apiVersion: kueue.x-k8s.io/v1beta1
+kind: WorkloadPriorityClass
+metadata:
+ name: priority-1
+value: 1000
+description: "Priority level 1 (highest)"
+---
+apiVersion: kueue.x-k8s.io/v1beta1
+kind: WorkloadPriorityClass
+metadata:
+ name: priority-2
+value: 900
+description: "Priority level 2"
+---
+apiVersion: kueue.x-k8s.io/v1beta1
+kind: WorkloadPriorityClass
+metadata:
+ name: priority-3
+value: 800
+description: "Priority level 3"
+---
+apiVersion: kueue.x-k8s.io/v1beta1
+kind: WorkloadPriorityClass
+metadata:
+ name: priority-4
+value: 700
+description: "Priority level 4"
+---
+apiVersion: kueue.x-k8s.io/v1beta1
+kind: WorkloadPriorityClass
+metadata:
+ name: priority-5
+value: 600
+description: "Priority level 5"
+---
+apiVersion: kueue.x-k8s.io/v1beta1
+kind: WorkloadPriorityClass
+metadata:
+ name: priority-6
+value: 500
+description: "Priority level 6"
+---
+apiVersion: kueue.x-k8s.io/v1beta1
+kind: WorkloadPriorityClass
+metadata:
+ name: priority-7
+value: 400
+description: "Priority level 7"
+---
+apiVersion: kueue.x-k8s.io/v1beta1
+kind: WorkloadPriorityClass
+metadata:
+ name: priority-8
+value: 300
+description: "Priority level 8"
+---
+apiVersion: kueue.x-k8s.io/v1beta1
+kind: WorkloadPriorityClass
+metadata:
+ name: priority-9
+value: 200
+description: "Priority level 9"
+---
+apiVersion: kueue.x-k8s.io/v1beta1
+kind: WorkloadPriorityClass
+metadata:
+ name: priority-10
+value: 100
+description: "Priority level 10 (lowest)"
+\ No newline at end of file Issue: Missing newline at the end of the file. Suggestion: Add a newline character at the end of the file --- a/components/kueue/production/kflux-ocp-p01/queue-config/workload-priority-class.yaml
+++ b/components/kueue/production/kflux-ocp-p01/queue-config/workload-priority-class.yaml
@@ -68,4 +68,5 @@
kind: WorkloadPriorityClass
metadata:
name: priority-10
-value: 100
-description: "Priority level 10 (lowest)"
\ No newline at end of file
+ value: 100
+ description: "Priority level 10 (lowest)"
+ |
Code Review by Gemini## Code Review
### `components/kueue/production/kflux-ocp-p01/queue-config/kustomization.yaml`
**Improvement:**
For better logical grouping and readability, it is often preferred to list foundational resources like `WorkloadPriorityClass` before other queue configurations or resources that might implicitly depend on them. While not strictly necessary for functionality in this case, reordering can improve clarity.
**Suggested Change:**
```diff
--- a/components/kueue/production/kflux-ocp-p01/queue-config/kustomization.yaml
+++ b/components/kueue/production/kflux-ocp-p01/queue-config/kustomization.yaml
@@ -1,9 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
+- workload-priority-class.yaml
- cluster-queue.yaml
- ../../base/queue-config
-- workload-priority-class.yaml
# ensure that installation starts after the installation of kueue complete
commonAnnotations:
|
Code Review by Gemini### components/kueue/production/kflux-ocp-p01/queue-config/workload-priority-class.yaml
**Issue:** Inconsistent naming convention for `WorkloadPriorityClass` resources. Some names are specific (`konflux-release`, `konflux-tenant-release`, `konflux-default`), while others are generic (`priority-3` through `priority-9`). This can lead to confusion and make it harder to manage the priority levels.
**Improvement:** Standardize the naming convention to improve clarity and consistency.
```diff
--- a/components/kueue/production/kflux-ocp-p01/queue-config/workload-priority-class.yaml
+++ b/components/kueue/production/kflux-ocp-p01/queue-config/workload-priority-class.yaml
@@ -13,37 +13,37 @@
apiVersion: kueue.x-k8s.io/v1beta1
kind: WorkloadPriorityClass
metadata:
- name: priority-3
+ name: konflux-priority-3
value: 800
description: "Priority level 3"
---
apiVersion: kueue.x-k8s.io/v1beta1
kind: WorkloadPriorityClass
metadata:
- name: priority-4
+ name: konflux-priority-4
value: 700
description: "Priority level 4"
---
apiVersion: kueue.x-k8s.io/v1beta1
kind: WorkloadPriorityClass
metadata:
- name: priority-5
+ name: konflux-priority-5
value: 600
description: "Priority level 5"
---
apiVersion: kueue.x-k8s.io/v1beta1
kind: WorkloadPriorityClass
metadata:
- name: priority-6
+ name: konflux-priority-6
value: 500
description: "Priority level 6"
---
apiVersion: kueue.x-k8s.io/v1beta1
kind: WorkloadPriorityClass
metadata:
- name: priority-7
+ name: konflux-priority-7
value: 400
description: "Priority level 7"
---
apiVersion: kueue.x-k8s.io/v1beta1
kind: WorkloadPriorityClass
metadata:
- name: priority-8
+ name: konflux-priority-8
value: 300
description: "Priority level 8"
---
apiVersion: kueue.x-k8s.io/v1beta1
kind: WorkloadPriorityClass
metadata:
- name: priority-9
+ name: konflux-priority-9
value: 200
description: "Priority level 9"
---
|
b4fb31c
to
cd21223
Compare
Code Review by GeminiHere are the suggested changes:
### File: `components/kueue/production/kflux-ocp-p01/kustomization.yaml`
**Issue**: The `ocp-build-workload-priority-class.yaml` file is located in the `queue-config` subdirectory, but it is being referenced directly in this parent `kustomization.yaml`. This will lead to a Kustomize error as the file is not found at this path.
**Suggested change**: Remove the line referencing `ocp-build-workload-priority-class.yaml` from this file.
```diff
--- a/components/kueue/production/kflux-ocp-p01/kustomization.yaml
+++ b/components/kueue/production/kflux-ocp-p01/kustomization.yaml
@@ -1,8 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../base
- queue-config
-- ocp-build-workload-priority-class.yaml
commonAnnotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true File:
|
cd21223
to
75b5470
Compare
Code Review by Gemini--- a/components/kueue/production/kflux-ocp-p01/queue-config/kustomization.yaml
+++ b/components/kueue/production/kflux-ocp-p01/queue-config/kustomization.yaml
@@ -1,9 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- cluster-queue.yaml
- ../../base/queue-config
-- workload-priority-class.yaml
+- ocp-build-workload-priority-class.yaml
# ensure that installation starts after the installation of kueue complete
commonAnnotations: |
75b5470
to
5c9f338
Compare
Code Review by GeminiThere are no bugs or issues found in the provided code changes. The new |
in order for this to work #7958 is needed as well |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ashwindasr, gbenhaim The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
fa432b3
into
redhat-appstudio:main
Create a new priority class for OCP cluster