Skip to content

fix(helm): default image tag to chart appVersion - #29371

Open
koriyoshi2041 wants to merge 2 commits into
BerriAI:litellm_oss_branchfrom
koriyoshi2041:fix-helm-default-image-tag-oss
Open

fix(helm): default image tag to chart appVersion#29371
koriyoshi2041 wants to merge 2 commits into
BerriAI:litellm_oss_branchfrom
koriyoshi2041:fix-helm-default-image-tag-oss

Conversation

@koriyoshi2041

Copy link
Copy Markdown

Problem

Default Helm installs from the OSS branch render image refs like ghcr.io/berriai/litellm-database:main-<appVersion>. Recent stable releases publish the plain app version tag, not main-<version>, so the default Deployment and migrations Job can hit ImagePullBackOff as reported in #29348.

Fix

  • Default the Deployment image tag to .Chart.AppVersion instead of main-<appVersion>.
  • Apply the same default to the migrations Job image.
  • Update the in-tree chart appVersion from the stale v1.80.12 to v1.85.1 and the example override to latest.
  • Add Helm unit tests that cover the unset image.tag path and assert the rendered image does not use a :main- prefix.

This mirrors the main-branch fix from #28710, but applies it to litellm_oss_branch where external PRs are expected to target.

Test

  • make test-unit-helm -> 55 passed
  • helm lint ./deploy/charts/litellm-helm -> passed
  • git diff --check -> passed

Note: with Helm 4 locally, I had to install the existing pinned helm-unittest plugin with --verify=false; after that, the repo's make test-unit-helm command ran successfully.

Risk

Low. This changes only the Helm chart default image tag path and adds chart tests. Explicit image.tag overrides still render unchanged.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@greptile-apps

greptile-apps Bot commented May 31, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes ImagePullBackOff errors on default Helm installs by removing the main- prefix from the fallback image tag in both the Deployment and migrations Job templates, and bumps the chart appVersion to v1.85.1 to align with the latest stable release. New helm-unittest tests are added to assert the rendered image no longer carries a :main- prefix when image.tag is left unset.

  • deployment.yaml and migrations-job.yaml: default image tag changes from printf \"main-%s\" .Chart.AppVersion to .Chart.AppVersion directly, matching how stable release images are published.
  • Chart.yaml: appVersion updated from the stale v1.80.12 to v1.85.1; values.yaml example comment updated from main-latest to latest.
  • New unit tests in both test files verify the fix, though they hardcode the full image string (ghcr.io/berriai/litellm-database:v1.85.1), which will need manual updates on every future appVersion bump.

Confidence Score: 5/5

Safe to merge — changes are limited to Helm chart defaults and test files, with no impact on Python code or runtime behavior. Explicit image.tag overrides are untouched.

The template change is a one-line fix in two files with a clear before/after, and the new tests confirm the regression is covered. The only friction is the hardcoded version string in the test assertions, which will require a manual edit the next time appVersion advances — a minor maintenance point, not a defect.

The two test files (deployment_tests.yaml and migrations-job_tests.yaml) contain hardcoded version strings that will need updating on every future appVersion bump.

Important Files Changed

Filename Overview
deploy/charts/litellm-helm/Chart.yaml Bumps appVersion from v1.80.12 to v1.85.1 to match the latest stable release tag published in the container registry.
deploy/charts/litellm-helm/templates/deployment.yaml Removes the main- prefix from the default image tag fallback; now uses .Chart.AppVersion directly, matching how stable release images are actually tagged.
deploy/charts/litellm-helm/templates/migrations-job.yaml Same main- prefix removal as deployment.yaml, keeping image tag logic consistent between the Deployment and the migrations Job.
deploy/charts/litellm-helm/tests/deployment_tests.yaml Adds a unit test asserting the default image renders as the appVersion tag without a :main- prefix; image value is hardcoded to v1.85.1, so it will break if appVersion is bumped without updating this test.
deploy/charts/litellm-helm/tests/migrations-job_tests.yaml Same new test as deployment_tests.yaml but for the migrations Job; carries the same hardcoded version coupling concern.
deploy/charts/litellm-helm/values.yaml Updates the commented-out example tag override from main-latest to latest to match the new default behavior and avoid confusing users.

Reviews (1): Last reviewed commit: "fix helm default image tag" | Re-trigger Greptile

Comment on lines +9 to +12
- equal:
path: spec.template.spec.containers[0].image
value: ghcr.io/berriai/litellm-database:v1.85.1
- notMatchRegex:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Hardcoded version in equal assertion will break on next appVersion bump

The equal check pins the full image string to ghcr.io/berriai/litellm-database:v1.85.1. When Chart.yaml's appVersion is next incremented, this assertion will fail even though the template logic is correct, requiring a manual test-file update. Since the goal is to prove that the tag equals the chart's appVersion (not a fixed string), the notMatchRegex: :main- check already covers the regression. The same pattern is repeated in migrations-job_tests.yaml.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@codecov

codecov Bot commented May 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@koriyoshi2041
koriyoshi2041 requested a review from a team June 6, 2026 02:34
@Sameerlite

Copy link
Copy Markdown
Contributor

@yuneng-berri Can you take a look?

@koriyoshi2041

koriyoshi2041 commented Jun 20, 2026

Copy link
Copy Markdown
Author

Quick CI triage: the remaining red auth-and-jwt job looks unrelated to this Helm chart change. The three failures are all in tests/proxy_unit_tests/test_custom_tokenizer_bug.py, and the log shows repeated Hugging Face 429s for Xenova/llama-3-tokenizer/resolve/main/tokenizer.json, then LocalEntryNotFoundError because the tokenizer was not in the runner cache.

I tried to rerun the failed job, but GitHub requires repo admin rights for that run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants