fix(helm): use appVersion as default image tag instead of latest#895
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✅ Files skipped from review due to trivial changes (4)
📝 WalkthroughWalkthroughHelm chart bumped (version 0.2.0, appVersion v0.8.1); added helper to choose image tag from Values or Chart.AppVersion; deployment template now uses that helper and removes a duplicated container; image.tag default set to empty and pullPolicy default changed to IfNotPresent; README and schema updated. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
1d2164b to
2b87270
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@install/helm-repo/argocd-agent-agent/templates/agent-deployment.yaml`:
- Around line 246-248: The container block in the Deployment template defines
name, image and imagePullPolicy twice (the second set uses "{{
.Values.image.repository }}:{{ include "argocd-agent-agent.defaultTag" . }}" and
{{ .Values.image.pullPolicy }}), causing duplicate YAML keys; remove the
redundant definitions (the name/image/imagePullPolicy lines at the later
location) so only the original declarations (the ones near the top of the
container spec) remain, leaving the container definition with a single name,
image, and imagePullPolicy (refer to the container block and the include
"argocd-agent-agent.defaultTag" usage to locate the duplicates).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c934fadd-5d58-427c-9fa6-bce0a7f1c2cc
📒 Files selected for processing (5)
install/helm-repo/argocd-agent-agent/Chart.yamlinstall/helm-repo/argocd-agent-agent/templates/_helpers.tplinstall/helm-repo/argocd-agent-agent/templates/agent-deployment.yamlinstall/helm-repo/argocd-agent-agent/values.schema.jsoninstall/helm-repo/argocd-agent-agent/values.yaml
install/helm-repo/argocd-agent-agent/templates/agent-deployment.yaml
Outdated
Show resolved
Hide resolved
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #895 +/- ##
=======================================
Coverage 46.55% 46.55%
=======================================
Files 122 122
Lines 17456 17456
=======================================
Hits 8127 8127
Misses 8585 8585
Partials 744 744 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thanks @enbiyagoral! The Helm documentation needs to be updated, too. You can either install helm-docs locally or wait for PR #896 to be merged, and run |
Done! Installed helm-docs locally and regenerated the README. |
Signed-off-by: Enbiya Goral <100806254+enbiyagoral@users.noreply.github.com>
Signed-off-by: Enbiya Goral <100806254+enbiyagoral@users.noreply.github.com>
Signed-off-by: Enbiya Goral <100806254+enbiyagoral@users.noreply.github.com>
3dec7ba to
aa7fa21
Compare
Summary
The agent Helm chart hardcodes
image.tagtolatestandappVersionis stuck at0.4.1(project is atv0.8.1). This makes deployments non-deterministic andhelm listshows incorrect version info.This PR aligns the agent chart's image tag handling with the official argo-cd Helm chart pattern (
argo-cd.defaultTag):defaultTaghelper that falls back toChart.AppVersionwhenimage.tagis emptyimage.tagdefault from"latest"to""soappVersionis usedpullPolicyfromAlwaystoIfNotPresentappVersiontov0.8.1and chart version to0.2.0values.schema.jsondefaultsBehavior
argocd-agent:latestargocd-agent:v0.8.1--set image.tag=customargocd-agent:customargocd-agent:customhelm listAPP VERSION0.4.1v0.8.1Test plan
helm templaterendersv0.8.1as default taghelm template --set image.tag=customoverride worksimagePullPolicyrenders asIfNotPresentSummary by CodeRabbit
Chores
Documentation