Skip to content

Commit a9155aa

Browse files
committed
tweaks
1 parent cfcb481 commit a9155aa

File tree

3 files changed

+6
-15
lines changed

3 files changed

+6
-15
lines changed

CONTRIBUTING.md

-10
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,6 @@ The following should be installed in your working environment:
1414
## Basic Overview
1515
The main entrypoint for the operator is `main.go`
1616

17-
The AppWrapper custom resources are defined under the `api` dir:
18-
- See `appwraper_types.go`
19-
20-
The AppWrapper resource templates can be found under `config/internal`:
21-
- Sorted under `appwrapper` subdirs
22-
23-
The code for AppWrapper resource reconcilliation can be found in the `controllers` dir:
24-
- See `appwrapper_controller.go`
25-
2617
## Building and Deployment
2718
If changes are made in the `api` dir, run: `make manifests`
2819
- This will generate new CRDs and associated files
@@ -53,7 +44,6 @@ The CodeFlare Operator currently has unit tests and pre-commit checks
5344
- Note that both are required for CI to pass on pull requests
5445

5546
To write and inspect unit tests:
56-
- AppWrapper unit tests under `appwrapper_controller_test.go` in the `controllers` dir
5747
- Unit test functions are defined in `suite_test.go` (with utils in `util/util.go`) in the `controllers dir`
5848
- Test cases defined under `controllers/testdata`
5949

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ CodeFlare Stack Compatibility Matrix
99
| Component | Version |
1010
|--------------------------|------------------------------------------------------------------------------------------|
1111
| CodeFlare Operator | [v1.2.0](https://github.com/project-codeflare/codeflare-operator/releases/tag/v1.2.0) |
12-
| AppWrapper | [v0.6.4](https://github.com/project-codeflare/appwrapper/releases/tag/v0.6.3) |
12+
| AppWrapper | [v0.7.2](https://github.com/project-codeflare/appwrapper/releases/tag/v0.7.2) |
1313
| CodeFlare-SDK | [v0.14.0](https://github.com/project-codeflare/codeflare-sdk/releases/tag/v0.14.0) |
1414
| KubeRay | [v1.0.0](https://github.com/opendatahub-io/kuberay/releases/tag/v1.0.0) |
1515
<!-- Compatibility Matrix end -->

main.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -194,13 +194,14 @@ func main() {
194194
exitOnError(err, "Could not determine if RayCluster CR present on cluster.")
195195
}
196196

197-
v, err = HasAPIResourceForGVK(kubeClient.DiscoveryClient, kueue.GroupVersion.WithKind("Workload"))
198-
if v {
197+
v1, err1 := HasAPIResourceForGVK(kubeClient.DiscoveryClient, kueue.GroupVersion.WithKind("Workload"))
198+
v2, err2 := HasAPIResourceForGVK(kubeClient.DiscoveryClient, mcadv1beta2.GroupVersion.WithKind("AppWrapper"))
199+
if v1 && v2 {
199200
// Ascynchronous because controllers need to wait for certificate to be ready for webhooks to work
200201
go awctrl.SetupControllers(ctx, mgr, cfg.AppWrapper, certsReady, setupLog)
201202
exitOnError(awctrl.SetupIndexers(ctx, mgr, cfg.AppWrapper), "unable to setup indexers")
202-
} else if err != nil {
203-
exitOnError(err, "Could not determine if Workload CR present on cluster.")
203+
} else if err1 != nil || err2 != nil {
204+
exitOnError(err, "Could not determine if AppWrapper and Workload CRs present on cluster.")
204205
}
205206

206207
exitOnError(awctrl.SetupProbeEndpoints(mgr, certsReady), "unable to setup probe endpoints")

0 commit comments

Comments
 (0)