Skip to content

Commit 263b791

Browse files
authored
KFLUXINFRA-2027: Deploy Kueue policy to production (#7558)
The Kueue policy will create the local queues in the mintmaker namespace and the tenant namespaces. Signed-off-by: Gal Ben Haim <[email protected]>
1 parent e0fd676 commit 263b791

File tree

14 files changed

+87
-9
lines changed

14 files changed

+87
-9
lines changed

components/kueue/production/base/queue-config/kustomization.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
resources:
44
- workload-priority-class.yaml
5-
- mintmaker-local-queue.yaml
65

76
# ensure that installation starts after the installation of kueue complete
87
commonAnnotations:

components/kueue/production/base/queue-config/mintmaker-local-queue.yaml

Lines changed: 0 additions & 8 deletions
This file was deleted.

components/policies/production/kflux-ocp-p01/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ kind: Kustomization
33
resources:
44
- ../base
55
- ../policies/kubearchive/
6+
- ../policies/kueue/

components/policies/production/kflux-prd-rh02/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
resources:
44
- ../base
5+
- ../policies/kueue/

components/policies/production/kflux-prd-rh03/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ kind: Kustomization
33
resources:
44
- ../base
55
- ../policies/kubearchive/
6+
- ../policies/kueue/

components/policies/production/kflux-rhel-p01/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ kind: Kustomization
33
resources:
44
- ../base
55
- ../policies/kubearchive/
6+
- ../policies/kueue/
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
resources:
4+
- queue-config
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
apiVersion: kyverno.io/v1
3+
kind: ClusterPolicy
4+
metadata:
5+
name: bootstrap-tenant-namespace-queue
6+
spec:
7+
rules:
8+
- name: create-local-queue
9+
skipBackgroundRequests: true
10+
match:
11+
any:
12+
- resources:
13+
kinds:
14+
- Namespace
15+
selector:
16+
matchLabels:
17+
konflux-ci.dev/type: tenant
18+
- resources:
19+
kinds:
20+
- Namespace
21+
names:
22+
- mintmaker
23+
generate:
24+
generateExisting: true
25+
synchronize: true
26+
apiVersion: kueue.x-k8s.io/v1beta1
27+
kind: LocalQueue
28+
name: pipelines-queue
29+
namespace: '{{request.object.metadata.name}}'
30+
data:
31+
spec:
32+
clusterQueue: cluster-pipeline-queue
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
resources:
4+
- cluster-policy.yaml
5+
- kyverno-rbac.yaml
6+
7+
# ensure that installation starts after the installation of kueue complete
8+
commonAnnotations:
9+
argocd.argoproj.io/sync-wave: "10"
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
name: kyverno-admission:manage-queue
6+
labels:
7+
rbac.kyverno.io/aggregate-to-admission-controller: "true"
8+
rules:
9+
- apiGroups:
10+
- kueue.x-k8s.io
11+
resources:
12+
- localqueues
13+
verbs:
14+
- list
15+
- get
16+
---
17+
apiVersion: rbac.authorization.k8s.io/v1
18+
kind: ClusterRole
19+
metadata:
20+
name: kyverno-background:manage-queue
21+
labels:
22+
rbac.kyverno.io/aggregate-to-background-controller: "true"
23+
rules:
24+
- apiGroups:
25+
- kueue.x-k8s.io
26+
resources:
27+
- localqueues
28+
verbs:
29+
- create
30+
- get
31+
- list
32+
- delete
33+
- update
34+
- watch

0 commit comments

Comments
 (0)