File tree 23 files changed +337
-25
lines changed
23 files changed +337
-25
lines changed Original file line number Diff line number Diff line change 55
55
- name : Setup and start KinD cluster
56
56
uses : ./common/github-actions/kind
57
57
58
+ - name : Deploy Kueue
59
+ run : |
60
+ make kueue-e2e
61
+
58
62
- name : Deploy CodeFlare stack
59
63
id : deploy
60
64
run : |
Original file line number Diff line number Diff line change 54
54
- name : Setup and start KinD cluster
55
55
uses : ./common/github-actions/kind
56
56
57
+ - name : Deploy Kueue
58
+ run : |
59
+ make kueue-e2e
60
+
57
61
- name : Install OLM
58
62
run : |
59
63
kubectl create -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/${OLM_VERSION}/crds.yaml
Original file line number Diff line number Diff line change @@ -12,11 +12,14 @@ VERSION ?= v0.0.0-dev
12
12
BUNDLE_VERSION ?= $(VERSION:v%=% )
13
13
14
14
# APPWRAPPER_VERSION defines the default version of the AppWrapper controller
15
- APPWRAPPER_VERSION ?= v0.6.4
15
+ APPWRAPPER_VERSION ?= v0.7.0
16
16
APPWRAPPER_REPO ?= github.com/project-codeflare/appwrapper
17
17
# Upstream AppWrapper is currently only creating release tags of the form `vX.Y.Z` (i.e the version)
18
18
APPWRAPPER_CRD ?= ${APPWRAPPER_REPO}/config/crd?ref=${APPWRAPPER_VERSION}
19
19
20
+ # KUEUE_VERSION defines the default version of Kueue (used for testing)
21
+ KUEUE_VERSION ?= v0.6.1
22
+
20
23
# KUBERAY_VERSION defines the default version of the KubeRay operator (used for testing)
21
24
KUBERAY_VERSION ?= v1.0.0
22
25
@@ -375,6 +378,10 @@ test-e2e: manifests fmt vet ## Run e2e tests.
375
378
kind-e2e : # # Set up e2e KinD cluster
376
379
test/e2e/kind.sh
377
380
381
+ .PHONY : kueue-e2e
382
+ kueue-e2e : # # Deploy Kueue
383
+ KUEUE_VERSION=$(KUEUE_VERSION ) test/e2e/kueue.sh
384
+
378
385
.PHONY : setup-e2e
379
386
setup-e2e : # # Set up e2e tests.
380
387
KUBERAY_VERSION=$(KUBERAY_VERSION ) test/e2e/setup.sh
Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ The e2e tests can be executed locally by running the following commands:
33
33
``` bash
34
34
# Create a KinD cluster
35
35
make kind-e2e
36
+ # Deploy Kueue
37
+ make kueue-e2e
36
38
# Install the CRDs
37
39
make install
38
40
```
Original file line number Diff line number Diff line change 1
1
apiVersion : kustomize.config.k8s.io/v1beta1
2
2
kind : Kustomization
3
3
resources :
4
- - github.com/project-codeflare/appwrapper/config/crd?ref=v0.6.4
4
+ - github.com/project-codeflare/appwrapper/config/crd?ref=v0.7.0
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ apiVersion: apiextensions.k8s.io/v1
2
2
kind : CustomResourceDefinition
3
3
metadata :
4
4
annotations :
5
- cert-manager.io/inject-ca-from : CERTIFICATE_NAMESPACE/CERTIFICATE_NAME
6
5
controller-gen.kubebuilder.io/version : v0.14.0
7
6
name : appwrappers.workload.codeflare.dev
8
7
spec :
@@ -212,6 +211,10 @@ spec:
212
211
phase :
213
212
description : Phase of the AppWrapper object
214
213
type : string
214
+ resettingCount :
215
+ description : Retries counts the number of times the AppWrapper has entered the Resetting Phase
216
+ format : int32
217
+ type : integer
215
218
type : object
216
219
type : object
217
220
served : true
Original file line number Diff line number Diff line change @@ -5,3 +5,15 @@ resources:
5
5
- crd-appwrapper.yml
6
6
7
7
# +kubebuilder:scaffold:crdkustomizeresource
8
+
9
+ patches :
10
+ # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
11
+ # patches here are for enabling the conversion webhook for each CRD
12
+ - path : patches/webhook_in_appwrappers.yaml
13
+ # +kubebuilder:scaffold:crdkustomizewebhookpatch
14
+
15
+ # [WEBHOOK] To enable webhook, uncomment the following section
16
+ # the following config is for teaching kustomize how to do kustomization for CRDs.
17
+
18
+ configurations :
19
+ - kustomizeconfig.yaml
Original file line number Diff line number Diff line change
1
+ # This file is for teaching kustomize how to substitute name and namespace reference in CRD
2
+ nameReference :
3
+ - kind : Service
4
+ version : v1
5
+ fieldSpecs :
6
+ - kind : CustomResourceDefinition
7
+ version : v1
8
+ group : apiextensions.k8s.io
9
+ path : spec/conversion/webhook/clientConfig/service/name
10
+
11
+ namespace :
12
+ - kind : CustomResourceDefinition
13
+ version : v1
14
+ group : apiextensions.k8s.io
15
+ path : spec/conversion/webhook/clientConfig/service/namespace
16
+ create : false
17
+
18
+ varReference :
19
+ - path : metadata/annotations
Original file line number Diff line number Diff line change
1
+ # The following patch enables a conversion webhook for the CRD
2
+ apiVersion : apiextensions.k8s.io/v1
3
+ kind : CustomResourceDefinition
4
+ metadata :
5
+ name : appwrappers.workload.codeflare.dev
6
+ spec :
7
+ conversion :
8
+ strategy : Webhook
9
+ webhook :
10
+ clientConfig :
11
+ service :
12
+ namespace : system
13
+ name : webhook-service
14
+ path : /convert
15
+ conversionReviewVersions :
16
+ - v1
Original file line number Diff line number Diff line change @@ -17,8 +17,17 @@ bases:
17
17
- ../crd
18
18
- ../rbac
19
19
- ../manager
20
+ - ../internalcert
21
+ # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
22
+ # crd/kustomization.yaml
23
+ - ../webhook
20
24
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
21
25
# - ../prometheus
22
26
27
+ patches :
28
+ # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
29
+ # crd/kustomization.yaml
30
+ - path : manager_webhook_patch.yaml
31
+
23
32
resources :
24
33
- metrics_service.yaml
Original file line number Diff line number Diff line change
1
+ apiVersion : apps/v1
2
+ kind : Deployment
3
+ metadata :
4
+ name : manager
5
+ namespace : system
6
+ spec :
7
+ template :
8
+ spec :
9
+ containers :
10
+ - name : manager
11
+ ports :
12
+ - containerPort : 9443
13
+ name : webhook-server
14
+ protocol : TCP
15
+ volumeMounts :
16
+ - mountPath : /tmp/k8s-webhook-server/serving-certs
17
+ name : cert
18
+ readOnly : true
19
+ volumes :
20
+ - name : cert
21
+ secret :
22
+ defaultMode : 420
23
+ secretName : webhook-server-cert
Original file line number Diff line number Diff line change
1
+ resources :
2
+ - secret.yaml
Original file line number Diff line number Diff line change
1
+ apiVersion : v1
2
+ kind : Secret
3
+ metadata :
4
+ name : webhook-server-cert
5
+ namespace : system
Original file line number Diff line number Diff line change 47
47
valueFrom :
48
48
fieldRef :
49
49
fieldPath : metadata.namespace
50
- # TODO: Disabling webhooks is a temporary hack. Webhooks are required for Kueue integration.
51
- - name : ENABLE_WEBHOOKS
52
- value : " false"
53
50
ports :
54
51
- containerPort : 8080
55
52
protocol : TCP
Original file line number Diff line number Diff line change @@ -19,16 +19,21 @@ rules:
19
19
- update
20
20
- watch
21
21
- apiGroups :
22
- - batch
22
+ - admissionregistration.k8s.io
23
23
resources :
24
- - jobs
24
+ - mutatingwebhookconfigurations
25
+ - validatingwebhookconfigurations
25
26
verbs :
26
- - create
27
- - delete
27
+ - get
28
28
- list
29
- - patch
30
29
- update
31
30
- watch
31
+ - apiGroups :
32
+ - apiextensions.k8s.io
33
+ resources :
34
+ - customresourcedefinitions
35
+ verbs :
36
+ - list
32
37
- apiGroups :
33
38
- apps
34
39
resources :
@@ -55,6 +60,17 @@ rules:
55
60
- subjectaccessreviews
56
61
verbs :
57
62
- create
63
+ - apiGroups :
64
+ - batch
65
+ resources :
66
+ - jobs
67
+ verbs :
68
+ - create
69
+ - delete
70
+ - list
71
+ - patch
72
+ - update
73
+ - watch
58
74
- apiGroups :
59
75
- config.openshift.io
60
76
resources :
@@ -157,6 +173,41 @@ rules:
157
173
- create
158
174
- patch
159
175
- update
176
+ - apiGroups :
177
+ - kueue.x-k8s.io
178
+ resources :
179
+ - resourceflavors
180
+ - workloadpriorityclasses
181
+ verbs :
182
+ - get
183
+ - list
184
+ - watch
185
+ - apiGroups :
186
+ - kueue.x-k8s.io
187
+ resources :
188
+ - workloads
189
+ verbs :
190
+ - create
191
+ - delete
192
+ - get
193
+ - list
194
+ - patch
195
+ - update
196
+ - watch
197
+ - apiGroups :
198
+ - kueue.x-k8s.io
199
+ resources :
200
+ - workloads/finalizers
201
+ verbs :
202
+ - update
203
+ - apiGroups :
204
+ - kueue.x-k8s.io
205
+ resources :
206
+ - workloads/status
207
+ verbs :
208
+ - get
209
+ - patch
210
+ - update
160
211
- apiGroups :
161
212
- machine.openshift.io
162
213
resources :
@@ -182,6 +233,14 @@ rules:
182
233
- patch
183
234
- update
184
235
- watch
236
+ - apiGroups :
237
+ - scheduling.k8s.io
238
+ resources :
239
+ - priorityclasses
240
+ verbs :
241
+ - get
242
+ - list
243
+ - watch
185
244
- apiGroups :
186
245
- storage.k8s.io
187
246
resources :
Original file line number Diff line number Diff line change
1
+ resources :
2
+ - manifests.yaml
3
+ - service.yaml
4
+
5
+ configurations :
6
+ - kustomizeconfig.yaml
Original file line number Diff line number Diff line change
1
+ # the following config is for teaching kustomize where to look at when substituting nameReference.
2
+ # It requires kustomize v2.1.0 or newer to work properly.
3
+ nameReference :
4
+ - kind : Service
5
+ version : v1
6
+ fieldSpecs :
7
+ - kind : MutatingWebhookConfiguration
8
+ group : admissionregistration.k8s.io
9
+ path : webhooks/clientConfig/service/name
10
+ - kind : ValidatingWebhookConfiguration
11
+ group : admissionregistration.k8s.io
12
+ path : webhooks/clientConfig/service/name
13
+
14
+ namespace :
15
+ - kind : MutatingWebhookConfiguration
16
+ group : admissionregistration.k8s.io
17
+ path : webhooks/clientConfig/service/namespace
18
+ create : true
19
+ - kind : ValidatingWebhookConfiguration
20
+ group : admissionregistration.k8s.io
21
+ path : webhooks/clientConfig/service/namespace
22
+ create : true
Original file line number Diff line number Diff line change
1
+ ---
2
+ apiVersion : admissionregistration.k8s.io/v1
3
+ kind : MutatingWebhookConfiguration
4
+ metadata :
5
+ name : mutating-webhook-configuration
6
+ webhooks :
7
+ - admissionReviewVersions :
8
+ - v1
9
+ clientConfig :
10
+ service :
11
+ name : webhook-service
12
+ namespace : system
13
+ path : /mutate-workload-codeflare-dev-v1beta2-appwrapper
14
+ failurePolicy : Fail
15
+ name : mappwrapper.kb.io
16
+ rules :
17
+ - apiGroups :
18
+ - workload.codeflare.dev
19
+ apiVersions :
20
+ - v1beta2
21
+ operations :
22
+ - CREATE
23
+ resources :
24
+ - appwrappers
25
+ sideEffects : None
26
+ ---
27
+ apiVersion : admissionregistration.k8s.io/v1
28
+ kind : ValidatingWebhookConfiguration
29
+ metadata :
30
+ name : validating-webhook-configuration
31
+ webhooks :
32
+ - admissionReviewVersions :
33
+ - v1
34
+ clientConfig :
35
+ service :
36
+ name : webhook-service
37
+ namespace : system
38
+ path : /validate-workload-codeflare-dev-v1beta2-appwrapper
39
+ failurePolicy : Fail
40
+ name : vappwrapper.kb.io
41
+ rules :
42
+ - apiGroups :
43
+ - workload.codeflare.dev
44
+ apiVersions :
45
+ - v1beta2
46
+ operations :
47
+ - CREATE
48
+ - UPDATE
49
+ resources :
50
+ - appwrappers
51
+ sideEffects : None
You can’t perform that action at this time.
0 commit comments