Skip to content

Commit c6b0244

Browse files
astefanuttiopenshift-merge-robot
authored andcommitted
Move AppWrapper API to workload.codeflare.dev group
1 parent bf0fd98 commit c6b0244

14 files changed

+35
-48
lines changed

.yamllint.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ignore: |
2-
bundle/manifests/mcad.ibm.com*
2+
bundle/manifests/*
33
extends: default
44
rules:
55
line-length: disable

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ VERSION ?= v0.0.0-dev
1212
BUNDLE_VERSION ?= $(VERSION:v%=%)
1313

1414
# INSTASCALE_VERSION defines the default version of the InstaScale controller
15-
INSTASCALE_VERSION ?= v0.0.7
15+
INSTASCALE_VERSION ?= dev
1616

1717
# MCAD_VERSION defines the default version of the MCAD controller
18-
MCAD_VERSION ?= v1.34.0
18+
MCAD_VERSION ?= main
1919
# MCAD_REF, MCAD_REPO and MCAD_CRD define the reference to MCAD CRD resources
20-
MCAD_REF ?= release-${MCAD_VERSION}
20+
MCAD_REF ?= dev
2121
MCAD_REPO ?= github.com/project-codeflare/multi-cluster-app-dispatcher
2222
# Upstream MCAD is currently only creating release tags of the form `vX.Y.Z` (i.e the version)
2323
# The image is still published using the MCAD_REF format (i.e release-vX.Y.Z)

config/internal/instascale/clusterrole.yaml.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ rules:
6060
- patch
6161

6262
- apiGroups:
63-
- mcad.ibm.com
63+
- workload.codeflare.dev
6464
resources:
6565
- appwrappers
6666
verbs:

config/internal/mcad/clusterrole_mcad-controller.yaml.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ metadata:
1111
codeflare.codeflare.dev/cr-namespace: {{.Namespace}}
1212
rules:
1313
- apiGroups:
14-
- mcad.ibm.com
14+
- workload.codeflare.dev
1515
resources:
1616
- queuejobs
1717
- schedulingspecs

config/rbac/role.yaml

+17-31
Original file line numberDiff line numberDiff line change
@@ -262,37 +262,6 @@ rules:
262262
- patch
263263
- update
264264
- watch
265-
- apiGroups:
266-
- mcad.ibm.com
267-
resources:
268-
- appwrappers
269-
- appwrappers/finalizers
270-
- appwrappers/status
271-
- queuejobs
272-
- schedulingspecs
273-
verbs:
274-
- create
275-
- delete
276-
- deletecollection
277-
- get
278-
- list
279-
- patch
280-
- update
281-
- watch
282-
- apiGroups:
283-
- mcad.ibm.com
284-
resources:
285-
- appwrappers
286-
- queuejobs
287-
- schedulingspecs
288-
verbs:
289-
- create
290-
- delete
291-
- get
292-
- list
293-
- patch
294-
- update
295-
- watch
296265
- apiGroups:
297266
- policy
298267
resources:
@@ -349,3 +318,20 @@ rules:
349318
- get
350319
- list
351320
- watch
321+
- apiGroups:
322+
- workload.codeflare.dev
323+
resources:
324+
- appwrappers
325+
- appwrappers/finalizers
326+
- appwrappers/status
327+
- queuejobs
328+
- schedulingspecs
329+
verbs:
330+
- create
331+
- delete
332+
- deletecollection
333+
- get
334+
- list
335+
- patch
336+
- update
337+
- watch

controllers/defaults.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ package controllers
55
// ***********************
66

77
const (
8-
MCADImage = "quay.io/project-codeflare/mcad-controller:release-v1.34.0"
9-
InstaScaleImage = "quay.io/project-codeflare/instascale-controller:v0.0.7"
8+
MCADImage = "quay.io/project-codeflare/mcad-controller:dev"
9+
InstaScaleImage = "quay.io/project-codeflare/instascale-controller:dev"
1010
)

controllers/instascale_controller.go

-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ func (r *InstaScaleReconciler) Apply(owner mf.Owner, params *InstaScaleParams, t
8888
// +kubebuilder:rbac:groups=rbac.authorization.k8s.io,resources=roles;rolebindings,verbs=get;list;watch;create;update;patch;delete
8989
// +kubebuilder:rbac:groups=rbac.authorization.k8s.io,resources=clusterroles;clusterrolebindings,verbs=get;list;watch;create;update;delete
9090
// +kubebuilder:rbac:groups=machine.openshift.io,resources=*,verbs=get;list;watch;create;update;patch;delete
91-
// +kubebuilder:rbac:groups=mcad.ibm.com,resources=appwrappers;queuejobs;schedulingspecs,verbs=get;list;watch;create;update;patch;delete
9291
// +kubebuilder:rbac:groups=config.openshift.io,resources=clusterversions,verbs=get;list
9392

9493
// Reconcile is part of the main kubernetes reconciliation loop which aims to

controllers/mcad_controller.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func (r *MCADReconciler) DeleteResource(params *MCADParams, template string, fns
102102
// +kubebuilder:rbac:groups=codeflare.codeflare.dev,resources=mcads,verbs=get;list;watch;create;update;patch;delete
103103
// +kubebuilder:rbac:groups=codeflare.codeflare.dev,resources=mcads/status,verbs=get;update;patch
104104
// +kubebuilder:rbac:groups=codeflare.codeflare.dev,resources=mcads/finalizers,verbs=update
105-
// +kubebuilder:rbac:groups=mcad.ibm.com,resources=queuejobs;schedulingspecs;appwrappers;appwrappers/finalizers;appwrappers/status,verbs=get;list;watch;create;update;patch;delete;deletecollection
105+
// +kubebuilder:rbac:groups=workload.codeflare.dev,resources=queuejobs;schedulingspecs;appwrappers;appwrappers/finalizers;appwrappers/status,verbs=get;list;watch;create;update;patch;delete;deletecollection
106106
// +kubebuilder:rbac:groups=core,resources=pods;lists;namespaces,verbs=get;list;watch;create;update;patch;delete;deletecollection
107107
// +kubebuilder:rbac:groups=core,resources=bindings;pods/binding,verbs=create
108108
// +kubebuilder:rbac:groups=core,resources=kube-scheduler,verbs=get;update

controllers/testdata/instascale_test_results/case_1/clusterrole.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,6 @@ rules:
6363
- delete
6464
- patch
6565
apiGroups:
66-
- mcad.ibm.com
66+
- workload.codeflare.dev
6767
resources:
6868
- appwrappers

go.mod

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
github.com/openshift-eng/openshift-goimports v0.0.0-20230304234052-c70783e636f2
1212
github.com/openshift/api v0.0.0-20230213134911-7ba313770556
1313
github.com/openshift/client-go v0.0.0-20221019143426-16aed247da5c
14-
github.com/project-codeflare/multi-cluster-app-dispatcher v1.34.0
14+
github.com/project-codeflare/multi-cluster-app-dispatcher v1.34.1-0.20230831150053-05b1af83014c
1515
github.com/ray-project/kuberay/ray-operator v0.0.0-20230830082034-e7fbf7d73576
1616
go.uber.org/zap v1.24.0
1717
k8s.io/api v0.26.3
@@ -21,6 +21,8 @@ require (
2121
sigs.k8s.io/structured-merge-diff/v4 v4.2.3
2222
)
2323

24+
replace sigs.k8s.io/custom-metrics-apiserver => sigs.k8s.io/custom-metrics-apiserver v1.25.1-0.20230306170449-63d8c93851f3
25+
2426
require (
2527
github.com/beorn7/perks v1.0.1 // indirect
2628
github.com/cespare/xxhash/v2 v2.1.2 // indirect

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -495,8 +495,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
495495
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
496496
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
497497
github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA=
498-
github.com/project-codeflare/multi-cluster-app-dispatcher v1.34.0 h1:4J3vW+vuCBHyocd3huZy3FJhOw5acaBHFLYwutkTE/E=
499-
github.com/project-codeflare/multi-cluster-app-dispatcher v1.34.0/go.mod h1:gtTl8Tsl+X+bGhqVudLoveINR6IkN+sVvH0J+VZIP40=
498+
github.com/project-codeflare/multi-cluster-app-dispatcher v1.34.1-0.20230831150053-05b1af83014c h1:LjCgRcjtkd9byePczvxGBLjdM22M2BCTB76FoEk2fkU=
499+
github.com/project-codeflare/multi-cluster-app-dispatcher v1.34.1-0.20230831150053-05b1af83014c/go.mod h1:gtTl8Tsl+X+bGhqVudLoveINR6IkN+sVvH0J+VZIP40=
500500
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
501501
github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso=
502502
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=

test/e2e/mnist_pytorch_mcad_job_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ func TestMNISTPyTorchMCAD(t *testing.T) {
137137
},
138138
}
139139

140-
_, err = test.Client().MCAD().McadV1beta1().AppWrappers(namespace.Name).Create(test.Ctx(), aw, metav1.CreateOptions{})
140+
_, err = test.Client().MCAD().WorkloadV1beta1().AppWrappers(namespace.Name).Create(test.Ctx(), aw, metav1.CreateOptions{})
141141
test.Expect(err).NotTo(HaveOccurred())
142142
test.T().Logf("Created MCAD %s/%s successfully", aw.Namespace, aw.Name)
143143

test/e2e/mnist_rayjob_mcad_raycluster_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ func TestMNISTRayJobMCADRayCluster(t *testing.T) {
217217
},
218218
}
219219

220-
aw, err = test.Client().MCAD().McadV1beta1().AppWrappers(namespace.Name).Create(test.Ctx(), aw, metav1.CreateOptions{})
220+
aw, err = test.Client().MCAD().WorkloadV1beta1().AppWrappers(namespace.Name).Create(test.Ctx(), aw, metav1.CreateOptions{})
221221
test.Expect(err).NotTo(HaveOccurred())
222222
test.T().Logf("Created MCAD %s/%s successfully", aw.Namespace, aw.Name)
223223

test/support/mcad.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626

2727
func AppWrapper(t Test, namespace *corev1.Namespace, name string) func(g gomega.Gomega) *mcadv1beta1.AppWrapper {
2828
return func(g gomega.Gomega) *mcadv1beta1.AppWrapper {
29-
aw, err := t.Client().MCAD().McadV1beta1().AppWrappers(namespace.Name).Get(t.Ctx(), name, metav1.GetOptions{})
29+
aw, err := t.Client().MCAD().WorkloadV1beta1().AppWrappers(namespace.Name).Get(t.Ctx(), name, metav1.GetOptions{})
3030
g.Expect(err).NotTo(gomega.HaveOccurred())
3131
return aw
3232
}

0 commit comments

Comments
 (0)