Skip to content

Default base image config#802

Open
ada333 wants to merge 11 commits into
kubeflow:mainfrom
ada333:default-base-image-config
Open

Default base image config#802
ada333 wants to merge 11 commits into
kubeflow:mainfrom
ada333:default-base-image-config

Conversation

@ada333
Copy link
Copy Markdown
Collaborator

@ada333 ada333 commented May 19, 2026

This PR solves #727

Adds env var (DEFAULT_BASE_IMAGE) and settings (with settings having priority) support of configuring default base image for all steps.

So now the resolution of image for each step should have this order:
per-step specified image > jupyterlab setting > env var > hardcoded default python 3.12

Also now in image dialog the default image should be visible:
image

Also I noticed some unused legacy code mainly in podutils.py and Commands.ts and took a chance to delete it since the functions were never called and I think we will not have use for them.

also I had to adjust gitignore because it was ignoring the lib/ folder in which we have lot of utils

ada333 and others added 6 commits May 19, 2026 14:26
Signed-off-by: Adam Maly <amaly@redhat.com>
Signed-off-by: Adam Maly <amaly@redhat.com>
Signed-off-by: Adam Maly <amaly@redhat.com>
Signed-off-by: Adam Maly <amaly@redhat.com>
Signed-off-by: Adam Maly <amaly@redhat.com>
Copy link
Copy Markdown
Collaborator

@jesuino jesuino left a comment

Choose a reason for hiding this comment

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

Hello Adam,

Thanks for your work on this. Here are a few suggested small changes. Please let me know what you think.

Comment thread labextension/schema/kale-settings.json Outdated
Comment thread labextension/src/widgets/hooks/useNotebookLoader.ts Outdated
Comment thread labextension/src/widgets/hooks/useNotebookMetadataPersistence.ts
if (metadata.base_image === '') {
metadata.base_image = DefaultState.metadata.base_image;
}
metadata.base_image = resolvedDefaultBaseImage;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What if user had already a base_image in place, wouldn't this be overriding the user setting?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I did this on purpose, I think we should not consider the default base image from metadata.
It would be confusing for user if he sets some default image in the settings or by env var, but because he is using maybe an old notebook with base_image in metadata the settings or the env var never apply.

Signed-off-by: Adam Maly <amaly@redhat.com>
@google-oss-prow
Copy link
Copy Markdown

[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 jesuino. For more information see the Kubernetes Code Review Process.

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

Details 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

@ada333
Copy link
Copy Markdown
Collaborator Author

ada333 commented May 26, 2026

@jesuino thanks for the review. I fixed most of the things and left one comment that should answer your review question.

Copy link
Copy Markdown
Collaborator

@jesuino jesuino left a comment

Choose a reason for hiding this comment

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

Hello @ada333 Thanks for the changes, would you please fix the merge conflicts?

One last thing is that I think that the DEFAULT_BASE_IMAGE from constants.ts is not being used anymore, would you please check it and if it is not used remove it?

Thanks!

ada333 and others added 3 commits May 27, 2026 13:04
Signed-off-by: Adam Maly <amaly@redhat.com>
Signed-off-by: Adam David Maly <42520598+ada333@users.noreply.github.com>
Signed-off-by: Adam Maly <amaly@redhat.com>
@google-oss-prow google-oss-prow Bot added size/XL and removed size/L labels May 27, 2026
Signed-off-by: Adam Maly <amaly@redhat.com>
@ada333 ada333 requested a review from jesuino May 27, 2026 11:26
@ada333
Copy link
Copy Markdown
Collaborator Author

ada333 commented May 27, 2026

@jesuino thanks for review, I resolved the conflicts and deleted the constant.

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.

2 participants