Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Workflow job to update CFO image #398

Merged
merged 15 commits into from
Jan 19, 2024

Conversation

Bobbins228
Copy link
Contributor

@Bobbins228 Bobbins228 commented Nov 8, 2023

Issue link

Closes #392

What changes have been made

Added a job to the release workflow that will update the version of the CFO image to the latest version.
Commit job has been updated to commit *.env files
Updated config/manifests/kustomization.yaml and added image stream files

Verification steps

Test the perl command for updating the image locally
Run make deploy -e IMG=<YOUR_DEV_IMAGE> -e ENV="e2e" for Kubernetes
Run make deploy -e IMG=<YOUR_DEV_IMAGE> for OpenShift

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • Testing is not required for this change

config/manifests/bases/params.yaml Outdated Show resolved Hide resolved
config/manifests/bases/params.env Outdated Show resolved Hide resolved
config/manifests/kustomization.yaml Outdated Show resolved Hide resolved
@VanillaSpoon
Copy link
Contributor

Other than those small adjustments, lgtm. Real nifty change to have it automatically update :)

Copy link
Contributor

@astefanutti astefanutti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may have to adapt the way the image is overwritten in make deploy so it works and the e2e tests pass.

@VanillaSpoon
Copy link
Contributor

VanillaSpoon commented Nov 13, 2023

Hey @Bobbins228

The tests are failing due to kustomize running from default, see ENV variable in the makefile.

When running make deploy, this ensures the build from kustomize is from within the default directory. But with the updates in the pr, you're changes are within /config/manifests, which means for those to update the deployment the ENV would need to be set to manifests.

To see this you can run kustomize build from each of those directories, and see the image updated from building within config/manifests.

^^edit: commented at the same time as @astefanutti , see his :)

Makefile Outdated Show resolved Hide resolved
@astefanutti
Copy link
Contributor

/lgtm

@astefanutti
Copy link
Contributor

@sutaakar you OK with using perl?

@sutaakar
Copy link
Contributor

It is ok for me.
Just thinking about the Notebook ImageStream, whether it may be better to keep it just in ODH/CFO.

@astefanutti
Copy link
Contributor

astefanutti commented Nov 15, 2023

It is ok for me. Just thinking about the Notebook ImageStream, whether it may be better to keep it just in ODH/CFO.

Right, I was actually surprised the deployment in the e2e tests pass, which made me realise it uses the e2e overlay, that depends on the default one, which by-passes that new layer. We should make sure that new one is exercise by the tests. I'll also be used by the one-liner installation.

@astefanutti astefanutti removed the lgtm label Nov 15, 2023
@astefanutti
Copy link
Contributor

astefanutti commented Nov 15, 2023

@Bobbins228 @sutaakar Or we accept that manifests overlay is only for ODH, WDYT?

@sutaakar
Copy link
Contributor

I would prefer having manifest in ODH/CFO though no strong opinion about that.

Copy link

openshift-ci bot commented Nov 16, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from astefanutti. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

@sutaakar sutaakar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot removed the lgtm label Nov 30, 2023
Makefile Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Copy link
Contributor

@sutaakar sutaakar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Dec 20, 2023
@Bobbins228 Bobbins228 requested a review from astefanutti January 2, 2024 09:11
@@ -34,7 +34,7 @@ spec:
containers:
- command:
- /manager
image: controller:latest
image: $(codeflare_operator_controller_image)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be codeflare-operator-controller-image instead of codeflare_operator_controller_image?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The codeflare_operator_controller_image is just a variable for the image in the params file.
We specify the replacement for $(codeflare_operator_controller_image) in the kustomization file

@@ -198,7 +198,7 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified

.PHONY: deploy
deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
cd config/manager && IMAGE=$(IMG) perl -i -pe 's/codeflare-operator-controller-image=(.*)$$/codeflare-operator-controller-image=$$ENV{"IMAGE"}/' params.env
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that change really needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we are using the command to update the params file so that the image variable codeflare-operator-controller-image is updated with the passed IMG

@@ -0,0 +1 @@
codeflare-operator-controller-image=quay.io/opendatahub/codeflare-operator:v1.0.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have an agreement with the ODH operator team to change the name from odh-codeflare-operator-controller-image?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch I haven't informed anyone yet of this change. Will I just drop a message into the ODH DW channel?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

late for the party, but, if i understand this correctly, we are not going to keep CFO in the near future for ODH and RHOAI.
so the changes done in upstream(as project-codeflare) is irrelevant to ODH and RHOAI.
which means, purely from project-codeflare perspective, these changes are not needed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zdtsw The CFO is still going to be part of ODH / RHOAI in the near future. It's possible we'll reconsider that in the future, but at the moment, it's preferable we operate as usual and consider that these changes are needed.

@astefanutti astefanutti merged commit 233de7e into project-codeflare:main Jan 19, 2024
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update automation to update the image version in params.env
5 participants