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

make oauth image and cert generator image configurable via env vars #589

Merged

Conversation

KPostOffice
Copy link
Collaborator

@KPostOffice KPostOffice commented Jul 10, 2024

Issue link

https://issues.redhat.com/browse/RHOAIENG-8552

What changes have been made

I've made the cert generator image and oauthproxy image build time configurable

Verification steps

run operator and verify that the images specified via make build are respected in the resulting RayCluster

Checks

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

Note

There was also discussion about making these configurable at deployment time. I think the only difference would be whether we would need to re-release CFO to update the vs the RHODS/ODH operator. I lean towards leaving it on our end via build args but I'm open to suggestions

Comment on lines 25 to 32
cert-generator-image:
description: 'Image used to generate RayCluster certificates'
required: true
default: 'registry.redhat.io/ubi9:latest'
oauth-proxy-image:
description: 'Image used to run OAuth proxy'
required: true
default: 'registry.redhat.io/openshift4/ose-oauth-proxy:latest'
Copy link
Contributor

Choose a reason for hiding this comment

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

If I remember correctly GitHub doesn't allow more than 10 input parameters for GH action.
Can we use defaults in the build?

Makefile Outdated
Comment on lines 116 to 117
OAUTH_IMAGE ?= registry.redhat.io/openshift4/ose-oauth-proxy:latest
CERT_GENERATOR_IMAGE ?= registry.redhat.io/ubi9:latest
Copy link
Contributor

Choose a reason for hiding this comment

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

SHA is needed for disconnected clusters, so I think it should be preferred.

@KPostOffice KPostOffice force-pushed the rhoaieng-8552 branch 2 times, most recently from 601603b to 63623f5 Compare July 11, 2024 14:37
Comment on lines -101 to +112
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 }}
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 }}
Copy link
Contributor

Choose a reason for hiding this comment

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

AFAIK this change is not needed, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's not, but I left it in to improve readability. The line was extremely long

@sutaakar
Copy link
Contributor

Can you remove https://github.com/project-codeflare/codeflare-operator/blob/main/config/e2e/config.yaml#L10
And inject the image from ^ into env variable for e2e test, I suppose in https://github.com/project-codeflare/codeflare-operator/blob/main/config/e2e/patch_resources.yaml ?

@KPostOffice KPostOffice changed the title make oauth image and cert generator image build time configurable make oauth image and cert generator image configurable via env vars Jul 11, 2024
Copy link

openshift-ci bot commented Jul 12, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sutaakar

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

The pull request process is described 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

@openshift-merge-bot openshift-merge-bot bot merged commit a8b6591 into project-codeflare:main Jul 12, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants