Skip to content

Commit d022ef4

Browse files
committed
address smaller review comments
1 parent 5d5adb0 commit d022ef4

File tree

6 files changed

+40
-29
lines changed

6 files changed

+40
-29
lines changed

.github/workflows/project-codeflare-release.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ on:
1919
kuberay-version:
2020
description: 'Tested version of KubeRay (for example: v0.0.0)'
2121
required: true
22+
kueue-version:
23+
description: 'Tested version of Kueue (for example: v0.0.0)'
24+
required: true
2225
is-stable:
2326
description: 'Select if the built images should be tagged as stable'
2427
required: true
@@ -48,13 +51,14 @@ jobs:
4851
echo "CodeFlare SDK Version: ${{ github.event.inputs.codeflare-sdk-version }}"
4952
echo "Tested AppWrapper Version: ${{ github.event.inputs.appwrapper-version }}"
5053
echo "Tested KubeRay Version: ${{ github.event.inputs.kuberay-version }}"
54+
echo "Tested Kueue Version: ${{ github.event.inputs.kueue-version }}"
5155
echo "Is Stable: ${{ github.event.inputs.is-stable }}"
5256
echo "CodeFlare Repository Organization: ${{ github.event.inputs.codeflare-repository-organization }}"
5357
echo "Quay Organization: ${{ github.event.inputs.quay-organization }}"
5458
echo "Community Operators Prod Organization: ${{ github.event.inputs.community-operators-prod-organization }}"
5559
5660
release-codeflare-sdk:
57-
needs: [check-appwrapper-version, check-kuberay-version]
61+
needs: [check-appwrapper-version, check-kuberay-version, check-kueue-version]
5862
runs-on: ubuntu-latest
5963

6064
steps:
@@ -94,7 +98,7 @@ jobs:
9498
steps:
9599
- name: Release CodeFlare operator
96100
run: |
97-
gh workflow run tag-and-build.yml --repo ${{ github.event.inputs.codeflare-repository-organization }}/codeflare-operator --ref ${{ github.ref }} --field is-stable=${{ github.event.inputs.is-stable }} --field version=${{ github.event.inputs.operator-version }} --field replaces=${{ github.event.inputs.replaces }} --field codeflare-sdk-version=${{ github.event.inputs.codeflare-sdk-version }} --field appwrapper-version=${{ github.event.inputs.appwrapper-version }} --field kuberay-version=${{ github.event.inputs.kuberay-version }} --field quay-organization=${{ github.event.inputs.quay-organization }} --field community-operators-prod-fork-organization=${{ github.event.inputs.codeflare-repository-organization }} --field community-operators-prod-organization=${{ github.event.inputs.community-operators-prod-organization }}
101+
gh workflow run tag-and-build.yml --repo ${{ github.event.inputs.codeflare-repository-organization }}/codeflare-operator --ref ${{ github.ref }} --field is-stable=${{ github.event.inputs.is-stable }} --field version=${{ github.event.inputs.operator-version }} --field replaces=${{ github.event.inputs.replaces }} --field codeflare-sdk-version=${{ github.event.inputs.codeflare-sdk-version }} --field appwrapper-version=${{ github.event.inputs.appwrapper-version }} --field kuberay-version=${{ github.event.inputs.kuberay-version }} --field kueue-version=${{ github.event.inputs.kueue-version }} --field quay-organization=${{ github.event.inputs.quay-organization }} --field community-operators-prod-fork-organization=${{ github.event.inputs.codeflare-repository-organization }} --field community-operators-prod-organization=${{ github.event.inputs.community-operators-prod-organization }}
98102
env:
99103
GITHUB_TOKEN: ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }}
100104
shell: bash
@@ -136,3 +140,17 @@ jobs:
136140
echo "KubeRay release with version ${{ github.event.inputs.kuberay-version }} does not exist. Please select an existing version."
137141
exit 1
138142
fi
143+
144+
check-kueue-version:
145+
runs-on: ubuntu-latest
146+
147+
steps:
148+
- name: Check if Kueue release exists
149+
run: |
150+
status_code=$(curl -s -o /dev/null -w "%{http_code}" https://github.com/kubernetes-sigs/kueue/releases/tag/${{ github.event.inputs.kueue-version }})
151+
if [[ "$status_code" == "200" ]]; then
152+
echo "Kueue release with version ${{ github.event.inputs.kueue-version }} exists and available to use."
153+
else
154+
echo "Kueue release with version ${{ github.event.inputs.kueue-version }} does not exist. Please select an existing version."
155+
exit 1
156+
fi

.github/workflows/tag-and-build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ on:
2424
description: 'Tested version of KubeRay'
2525
required: true
2626
default: 'v0.0.0-dev'
27+
kueue-version:
28+
description: 'Tested version of Kueue'
29+
required: true
30+
default: 'v0.0.0-dev'
2731
is-stable:
2832
description: 'Select if the built image should be tagged as stable'
2933
required: true
@@ -89,6 +93,7 @@ jobs:
8993
sed -i -E "s|(.*CodeFlare-SDK.*\[).*(\].*releases/tag/).*(\).*)|\1${{ github.event.inputs.codeflare-sdk-version }}\2${{ github.event.inputs.codeflare-sdk-version }}\3|" README.md
9094
sed -i -E "s|(.*AppWrapper.*\[).*(\].*releases/tag/).*(\).*)|\1${{ github.event.inputs.appwrapper-version }}\2${{ github.event.inputs.appwrapper-version }}\3|" README.md
9195
sed -i -E "s|(.*KubeRay.*\[).*(\].*releases/tag/).*(\).*)|\1${{ github.event.inputs.kuberay-version }}\2${{ github.event.inputs.kuberay-version }}\3|" README.md
96+
sed -i -E "s|(.*Kueue.*\[).*(\].*releases/tag/).*(\).*)|\1${{ github.event.inputs.kueue-version }}\2${{ github.event.inputs.kueue-version }}\3|" README.md
9297
9398
- name: Adjust AppWrapper dependency in the code
9499
run: |

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ CodeFlare Stack Compatibility Matrix
1010
|------------------------------|---------------------------------------------------------------------------------------------------|
1111
| CodeFlare Operator | [v1.4.1](https://github.com/project-codeflare/codeflare-operator/releases/tag/v1.4.1) |
1212
| CodeFlare-SDK | [v0.16.1](https://github.com/project-codeflare/codeflare-sdk/releases/tag/v0.16.1) |
13-
| KubeRay | [v1.1.0](https://github.com/opendatahub-io/kuberay/releases/tag/v1.1.0) |
1413
| AppWrapper | [v0.11.1](https://github.com/project-codeflare/appwrapper/releases/tag/v0.11.1) |
14+
| KubeRay | [v1.1.0](https://github.com/opendatahub-io/kuberay/releases/tag/v1.1.0) |
15+
| Kueue | [v0.6.2](https://github.com/opendatahub-io/kueue/releases/tag/v0.6.2) |
1516
<!-- Compatibility Matrix end -->
1617

1718
## Development

config/crd/kustomization.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
resources:
55
- crd-appwrapper.yml
66

7-
patches:
7+
#patches:
88
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
99
# patches here are for enabling the conversion webhook for each CRD
10-
- path: patches/webhook_in_appwrappers.yaml
10+
# - path: patches/webhook_in_appwrappers.yaml
1111
#+kubebuilder:scaffold:crdkustomizewebhookpatch
1212

1313
# [WEBHOOK] To enable webhook, uncomment the following section

config/crd/patches/webhook_in_appwrappers.yaml

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

main.go

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -249,29 +249,32 @@ func setupAppWrapperComponents(ctx context.Context, cancel context.CancelFunc, m
249249
}
250250

251251
// AppWrapper webhook doesn't depend on WorkloadAPI availablity but does need certsReady
252-
go func() {
253-
<-certsReady
254-
setupLog.Info("Setting up AppWrapper webhooks")
255-
exitOnError(awctrl.SetupWebhooks(mgr, cfg.AppWrapper.Config), "unable to setup AppWrapper webhooks")
256-
}()
252+
go setupAppWrapperWebhooks(mgr, cfg, certsReady)
257253

258254
if isAPIAvailable(ctx, mgr, workloadAPI) {
259-
setupLog.Info("Workload API available; enabling AppWrappers")
255+
setupLog.Info("Workload API available, enabling AppWrappers")
260256
go setupAppWrapperController(mgr, cfg, certsReady)
261257
return awctrl.SetupIndexers(ctx, mgr, cfg.AppWrapper.Config)
262258
} else {
263259
// If AppWrappers are enabled and the Workload API becomes available later, initiate an orderly
264260
// restart of the codeflare operator to enable the workload indexer to be setup in the the new instance of the operator.
265261
// It is not possible to add an indexer once the mgr has started so, a restart if the only avenue.
266-
setupLog.Info("Workload API not available; setting up waiter for Workload API availability")
262+
setupLog.Info("Workload API not available, setting up waiter for Workload API availability")
267263
go waitForAPI(ctx, mgr, workloadAPI, func() {
268-
setupLog.Info("Workload API now available; triggering controller restart")
264+
setupLog.Info("Workload API now available, triggering controller restart")
269265
cancel()
270266
})
271267
return nil
272268
}
273269
}
274270

271+
func setupAppWrapperWebhooks(mgr ctrl.Manager, cfg *config.CodeFlareOperatorConfiguration, certsReady chan struct{}) {
272+
setupLog.Info("Waiting for certificate generation to complete")
273+
<-certsReady
274+
setupLog.Info("Setting up AppWrapper webhooks")
275+
exitOnError(awctrl.SetupWebhooks(mgr, cfg.AppWrapper.Config), "unable to setup AppWrapper webhooks")
276+
}
277+
275278
func setupAppWrapperController(mgr ctrl.Manager, cfg *config.CodeFlareOperatorConfiguration, certsReady chan struct{}) {
276279
setupLog.Info("Waiting for certificate generation to complete")
277280
<-certsReady

0 commit comments

Comments
 (0)