Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a274658

Browse files
committedApr 11, 2025
Bump AppWrapper version to 1.1.1
1 parent 6ef824b commit a274658

File tree

7 files changed

+356
-239
lines changed

7 files changed

+356
-239
lines changed
 

‎Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ VERSION ?= v0.0.0-dev
1212
BUNDLE_VERSION ?= $(VERSION:v%=%)
1313

1414
# APPWRAPPER_VERSION defines the default version of the AppWrapper controller
15-
APPWRAPPER_VERSION ?= v1.0.7
15+
APPWRAPPER_VERSION ?= v1.1.1
1616
APPWRAPPER_REPO ?= github.com/project-codeflare/appwrapper
1717
APPWRAPPER_CRD ?= ${APPWRAPPER_REPO}/config/crd?ref=${APPWRAPPER_VERSION}
1818

1919
# KUEUE_VERSION defines the default version of Kueue (used for testing)
20-
KUEUE_VERSION ?= v0.10.2
20+
KUEUE_VERSION ?= v0.11.0
2121

2222
USE_RHOAI ?= true
2323
# KUBERAY_VERSION defines the default version of the KubeRay operator (used for testing)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
resources:
4-
- github.com/project-codeflare/appwrapper/config/crd?ref=v1.0.7
4+
- github.com/project-codeflare/appwrapper/config/crd?ref=v1.1.1

‎config/rbac/role.yaml

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,6 @@ rules:
1414
- patch
1515
- update
1616
- watch
17-
- apiGroups:
18-
- ""
19-
resources:
20-
- namespaces
21-
verbs:
22-
- get
23-
- list
24-
- watch
2517
- apiGroups:
2618
- ""
2719
resources:
@@ -188,58 +180,6 @@ rules:
188180
- patch
189181
- update
190182
- watch
191-
- apiGroups:
192-
- kueue.x-k8s.io
193-
resources:
194-
- clusterqueues
195-
verbs:
196-
- get
197-
- list
198-
- patch
199-
- update
200-
- watch
201-
- apiGroups:
202-
- kueue.x-k8s.io
203-
resources:
204-
- resourceflavors
205-
verbs:
206-
- get
207-
- list
208-
- watch
209-
- apiGroups:
210-
- kueue.x-k8s.io
211-
resources:
212-
- workloadpriorityclasses
213-
verbs:
214-
- get
215-
- list
216-
- watch
217-
- apiGroups:
218-
- kueue.x-k8s.io
219-
resources:
220-
- workloads
221-
verbs:
222-
- create
223-
- delete
224-
- get
225-
- list
226-
- patch
227-
- update
228-
- watch
229-
- apiGroups:
230-
- kueue.x-k8s.io
231-
resources:
232-
- workloads/finalizers
233-
verbs:
234-
- update
235-
- apiGroups:
236-
- kueue.x-k8s.io
237-
resources:
238-
- workloads/status
239-
verbs:
240-
- get
241-
- patch
242-
- update
243183
- apiGroups:
244184
- networking.k8s.io
245185
resources:
@@ -327,14 +267,6 @@ rules:
327267
- patch
328268
- update
329269
- watch
330-
- apiGroups:
331-
- scheduling.k8s.io
332-
resources:
333-
- priorityclasses
334-
verbs:
335-
- get
336-
- list
337-
- watch
338270
- apiGroups:
339271
- scheduling.sigs.k8s.io
340272
resources:

‎go.mod

Lines changed: 52 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -4,76 +4,84 @@ go 1.23.0
44

55
require (
66
github.com/go-logr/logr v1.4.2
7-
github.com/onsi/ginkgo/v2 v2.22.0
8-
github.com/onsi/gomega v1.36.1
7+
github.com/onsi/ginkgo/v2 v2.23.0
8+
github.com/onsi/gomega v1.36.2
99
github.com/open-policy-agent/cert-controller v0.12.0
1010
github.com/opendatahub-io/opendatahub-operator/v2 v2.10.0
1111
github.com/openshift/api v0.0.0-20240904015708-69df64132c91
1212
github.com/openshift/client-go v0.0.0-20240904130219-3795e907a202
13-
github.com/project-codeflare/appwrapper v1.0.7
13+
github.com/project-codeflare/appwrapper v1.1.1
1414
github.com/project-codeflare/codeflare-common v0.0.0-20250321141415-67bb8bd932df
15-
github.com/ray-project/kuberay/ray-operator v1.2.2
15+
github.com/ray-project/kuberay/ray-operator v1.3.1
1616
go.uber.org/zap v1.27.0
17-
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0
18-
k8s.io/api v0.31.4
19-
k8s.io/apiextensions-apiserver v0.31.2
20-
k8s.io/apimachinery v0.31.4
17+
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394
18+
k8s.io/api v0.32.3
19+
k8s.io/apiextensions-apiserver v0.32.3
20+
k8s.io/apimachinery v0.32.3
2121
k8s.io/client-go v11.0.0+incompatible
22-
k8s.io/component-base v0.31.4
22+
k8s.io/component-base v0.32.3
2323
k8s.io/klog/v2 v2.130.1
24-
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8
25-
sigs.k8s.io/controller-runtime v0.19.3
26-
sigs.k8s.io/kueue v0.10.2
24+
k8s.io/utils v0.0.0-20241210054802-24370beab758
25+
sigs.k8s.io/controller-runtime v0.20.3
26+
sigs.k8s.io/kueue v0.11.0
2727
sigs.k8s.io/yaml v1.4.0
2828
)
2929

3030
replace k8s.io/client-go => k8s.io/client-go v0.31.4
3131

32+
replace k8s.io/api => k8s.io/api v0.31.4
33+
34+
replace k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.31.2
35+
36+
replace k8s.io/apimachinery v0.32.3 => k8s.io/apimachinery v0.31.4
37+
38+
replace sigs.k8s.io/controller-runtime v0.20.3 => sigs.k8s.io/controller-runtime v0.19.3
39+
40+
replace sigs.k8s.io/kueue v0.11.0 => sigs.k8s.io/kueue v0.10.1
41+
3242
replace sigs.k8s.io/custom-metrics-apiserver => sigs.k8s.io/custom-metrics-apiserver v1.25.1-0.20230306170449-63d8c93851f3
3343

3444
replace go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp => go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0
3545

3646
replace github.com/jackc/pgx/v4 => github.com/jackc/pgx/v5 v5.5.4
3747

3848
// Workaround deprecation of cluster.Status.State in ray-operator v1.2.2
39-
replace github.com/ray-project/kuberay/ray-operator v1.2.2 => github.com/ray-project/kuberay/ray-operator v1.2.1
49+
replace github.com/ray-project/kuberay/ray-operator v1.3.1 => github.com/ray-project/kuberay/ray-operator v1.2.1
4050

4151
require (
4252
github.com/aymerick/douceur v0.2.0 // indirect
4353
github.com/beorn7/perks v1.0.1 // indirect
44-
github.com/blang/semver/v4 v4.0.0 // indirect
4554
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
4655
github.com/cespare/xxhash/v2 v2.3.0 // indirect
4756
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
48-
github.com/distribution/reference v0.5.0 // indirect
49-
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
50-
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
57+
github.com/distribution/reference v0.6.0 // indirect
58+
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
59+
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
5160
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
5261
github.com/go-logr/zapr v1.3.0 // indirect
53-
github.com/go-openapi/jsonpointer v0.21.0 // indirect
62+
github.com/go-openapi/jsonpointer v0.21.1 // indirect
5463
github.com/go-openapi/jsonreference v0.21.0 // indirect
55-
github.com/go-openapi/swag v0.23.0 // indirect
64+
github.com/go-openapi/swag v0.23.1 // indirect
5665
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
5766
github.com/gogo/protobuf v1.3.2 // indirect
5867
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
5968
github.com/golang/glog v1.2.4 // indirect
6069
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
6170
github.com/golang/protobuf v1.5.4 // indirect
62-
github.com/google/gnostic-models v0.6.8 // indirect
63-
github.com/google/go-cmp v0.6.0 // indirect
71+
github.com/google/gnostic-models v0.6.9 // indirect
72+
github.com/google/go-cmp v0.7.0 // indirect
6473
github.com/google/gofuzz v1.2.0 // indirect
65-
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db // indirect
74+
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect
6675
github.com/google/uuid v1.6.0 // indirect
6776
github.com/gorilla/css v1.0.0 // indirect
6877
github.com/imdario/mergo v0.3.16 // indirect
6978
github.com/jackc/pgx/v5 v5.5.5 // indirect
7079
github.com/josharian/intern v1.0.0 // indirect
7180
github.com/jpillora/backoff v1.0.0 // indirect
7281
github.com/json-iterator/go v1.1.12 // indirect
73-
github.com/klauspost/compress v1.17.9 // indirect
74-
github.com/kubeflow/mpi-operator v0.6.0 // indirect
75-
github.com/kubeflow/training-operator v1.8.1 // indirect
76-
github.com/mailru/easyjson v0.7.7 // indirect
82+
github.com/klauspost/compress v1.18.0 // indirect
83+
github.com/kubeflow/training-operator v1.9.0 // indirect
84+
github.com/mailru/easyjson v0.9.0 // indirect
7785
github.com/microcosm-cc/bluemonday v1.0.18 // indirect
7886
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
7987
github.com/modern-go/reflect2 v1.0.2 // indirect
@@ -83,33 +91,32 @@ require (
8391
github.com/openshift-online/ocm-sdk-go v0.1.411 // indirect
8492
github.com/openshift/custom-resource-status v1.1.2 // indirect
8593
github.com/pkg/errors v0.9.1 // indirect
86-
github.com/prometheus/client_golang v1.20.5 // indirect
94+
github.com/prometheus/client_golang v1.21.1 // indirect
8795
github.com/prometheus/client_model v0.6.1 // indirect
88-
github.com/prometheus/common v0.57.0 // indirect
89-
github.com/prometheus/procfs v0.15.1 // indirect
96+
github.com/prometheus/common v0.63.0 // indirect
97+
github.com/prometheus/procfs v0.16.0 // indirect
9098
github.com/sirupsen/logrus v1.9.3 // indirect
9199
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 // indirect
92-
github.com/spf13/pflag v1.0.5 // indirect
100+
github.com/spf13/pflag v1.0.6 // indirect
93101
github.com/x448/float16 v0.8.4 // indirect
94102
go.uber.org/atomic v1.11.0 // indirect
95103
go.uber.org/multierr v1.11.0 // indirect
96-
golang.org/x/net v0.33.0 // indirect
97-
golang.org/x/oauth2 v0.21.0 // indirect
98-
golang.org/x/sys v0.28.0 // indirect
99-
golang.org/x/term v0.27.0 // indirect
100-
golang.org/x/text v0.21.0 // indirect
101-
golang.org/x/time v0.6.0 // indirect
102-
golang.org/x/tools v0.28.0 // indirect
103-
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
104-
google.golang.org/protobuf v1.35.1 // indirect
104+
golang.org/x/net v0.37.0 // indirect
105+
golang.org/x/oauth2 v0.28.0 // indirect
106+
golang.org/x/sys v0.31.0 // indirect
107+
golang.org/x/term v0.30.0 // indirect
108+
golang.org/x/text v0.23.0 // indirect
109+
golang.org/x/time v0.11.0 // indirect
110+
golang.org/x/tools v0.31.0 // indirect
111+
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
112+
google.golang.org/protobuf v1.36.5 // indirect
105113
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
106114
gopkg.in/inf.v0 v0.9.1 // indirect
107115
gopkg.in/yaml.v2 v2.4.0 // indirect
108116
gopkg.in/yaml.v3 v3.0.1 // indirect
109-
k8s.io/apiserver v0.31.4 // indirect
110-
k8s.io/component-helpers v0.31.4 // indirect
111-
k8s.io/kube-openapi v0.0.0-20240812233141-91dab695df6f // indirect
112-
sigs.k8s.io/jobset v0.7.1 // indirect
113-
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
114-
sigs.k8s.io/structured-merge-diff/v4 v4.4.3 // indirect
117+
k8s.io/kube-openapi v0.0.0-20250304201544-e5f78fe3ede9 // indirect
118+
sigs.k8s.io/jobset v0.8.0 // indirect
119+
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
120+
sigs.k8s.io/randfill v1.0.0 // indirect
121+
sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect
115122
)

‎go.sum

Lines changed: 291 additions & 78 deletions
Large diffs are not rendered by default.

‎main.go

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ import (
6363
"sigs.k8s.io/controller-runtime/pkg/healthz"
6464
"sigs.k8s.io/controller-runtime/pkg/log/zap"
6565
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
66-
kueue "sigs.k8s.io/kueue/apis/kueue/v1beta1"
6766
"sigs.k8s.io/yaml"
6867

6968
routev1 "github.com/openshift/api/route/v1"
@@ -83,7 +82,6 @@ var (
8382
)
8483

8584
const (
86-
workloadAPI = "workloads.kueue.x-k8s.io"
8785
rayclusterAPI = "rayclusters.ray.io"
8886
)
8987

@@ -97,8 +95,6 @@ func init() {
9795
utilruntime.Must(dsciv1.AddToScheme(scheme))
9896
// AppWrapper
9997
utilruntime.Must(awv1beta2.AddToScheme(scheme))
100-
// Kueue
101-
utilruntime.Must(kueue.AddToScheme(scheme))
10298
}
10399

104100
// +kubebuilder:rbac:groups=config.openshift.io,resources=ingresses,verbs=get
@@ -277,38 +273,17 @@ func setupAppWrapperComponents(ctx context.Context, cancel context.CancelFunc, m
277273
return nil
278274
}
279275

280-
// AppWrapper webhook doesn't depend on WorkloadAPI availablity but does need certsReady
281-
go setupAppWrapperWebhooks(mgr, cfg, certsReady)
282-
283-
if isAPIAvailable(ctx, mgr, workloadAPI) {
284-
setupLog.Info("Workload API available, enabling AppWrappers")
285-
go setupAppWrapperController(mgr, cfg, certsReady)
286-
return awctrl.SetupIndexers(ctx, mgr, cfg.AppWrapper.Config)
287-
} else {
288-
// If AppWrappers are enabled and the Workload API becomes available later, initiate an orderly
289-
// restart of the codeflare operator to enable the workload indexer to be setup in the the new instance of the operator.
290-
// It is not possible to add an indexer once the mgr has started so, a restart if the only avenue.
291-
setupLog.Info("Workload API not available, setting up waiter for Workload API availability")
292-
go waitForAPI(ctx, mgr, workloadAPI, func() {
293-
setupLog.Info("Workload API now available, triggering controller restart")
294-
cancel()
295-
})
296-
return nil
297-
}
276+
// AppWrapper webhook and controller need certsReady
277+
go setupAppWrapperControllerAndWebhooks(mgr, cfg, certsReady)
278+
return awctrl.SetupIndexers(ctx, mgr, cfg.AppWrapper.Config)
298279
}
299280

300-
func setupAppWrapperWebhooks(mgr ctrl.Manager, cfg *config.CodeFlareOperatorConfiguration, certsReady chan struct{}) {
281+
func setupAppWrapperControllerAndWebhooks(mgr ctrl.Manager, cfg *config.CodeFlareOperatorConfiguration, certsReady chan struct{}) {
301282
setupLog.Info("Waiting for certificate generation to complete")
302283
<-certsReady
303-
setupLog.Info("Setting up AppWrapper webhooks")
304-
exitOnError(awctrl.SetupWebhooks(mgr, cfg.AppWrapper.Config), "unable to setup AppWrapper webhooks")
305-
}
306-
307-
func setupAppWrapperController(mgr ctrl.Manager, cfg *config.CodeFlareOperatorConfiguration, certsReady chan struct{}) {
308-
setupLog.Info("Waiting for certificate generation to complete")
309-
<-certsReady
310-
setupLog.Info("Setting up AppWrapper controller")
284+
setupLog.Info("Setting up AppWrapper controller and webhooks")
311285
exitOnError(awctrl.SetupControllers(mgr, cfg.AppWrapper.Config), "unable to setup AppWrapper controller")
286+
exitOnError(awctrl.SetupWebhooks(mgr, cfg.AppWrapper.Config), "unable to setup AppWrapper webhooks")
312287
}
313288

314289
// +kubebuilder:rbac:groups="",resources=secrets,verbs=get;list;watch;update

‎pkg/controllers/appwrapper_controller.go

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ package controllers
2323
//+kubebuilder:rbac:groups=workload.codeflare.dev,resources=appwrappers/status,verbs=get;update;patch
2424
//+kubebuilder:rbac:groups=workload.codeflare.dev,resources=appwrappers/finalizers,verbs=update
2525

26+
// permission for events
27+
//+kubebuilder:rbac:groups="",resources=events,verbs=create;watch;update;patch
28+
2629
// permission to edit wrapped resources: pods, services, jobs, podgroups, pytorchjobs, rayclusters
2730
//+kubebuilder:rbac:groups="",resources=pods;services,verbs=get;list;watch;create;update;patch;delete
2831
//+kubebuilder:rbac:groups=apps,resources=deployments;statefulsets,verbs=get;list;watch;create;update;patch;delete
@@ -34,18 +37,5 @@ package controllers
3437
//+kubebuilder:rbac:groups=ray.io,resources=rayjobs,verbs=get;list;watch;create;update;patch;delete
3538
//+kubebuilder:rbac:groups=jobset.x-k8s.io,resources=jobsets,verbs=get;list;watch;create;update;patch;delete
3639

37-
// permissions needed by Kueue's generic reconciller
38-
// +kubebuilder:rbac:groups=scheduling.k8s.io,resources=priorityclasses,verbs=list;get;watch
39-
// +kubebuilder:rbac:groups="",resources=events,verbs=create;watch;update;patch
40-
// +kubebuilder:rbac:groups=kueue.x-k8s.io,resources=workloads,verbs=get;list;watch;create;update;patch;delete
41-
// +kubebuilder:rbac:groups=kueue.x-k8s.io,resources=workloads/status,verbs=get;update;patch
42-
// +kubebuilder:rbac:groups=kueue.x-k8s.io,resources=workloads/finalizers,verbs=update
43-
// +kubebuilder:rbac:groups=kueue.x-k8s.io,resources=resourceflavors,verbs=get;list;watch
44-
// +kubebuilder:rbac:groups=kueue.x-k8s.io,resources=workloadpriorityclasses,verbs=get;list;watch
45-
46-
// permissions needed by Kueue's base webhook
47-
// +kubebuilder:rbac:groups="",resources=namespaces,verbs=get;list;watch
48-
49-
// permission to watch nodes and edit clusterqueues for Autopilot integration
40+
// permission to watch nodes for the Autopilot integration
5041
//+kubebuilder:rbac:groups="",resources=nodes,verbs=get;list;watch
51-
//+kubebuilder:rbac:groups=kueue.x-k8s.io,resources=clusterqueues,verbs=get;list;watch;update;patch

0 commit comments

Comments
 (0)
Please sign in to comment.