Skip to content

fix: preserve ACME email on provider chart upgrade via --reuse-values#70

Open
devalpatel67 wants to merge 1 commit into
mainfrom
fix/reuse-values-on-provider-upgrade
Open

fix: preserve ACME email on provider chart upgrade via --reuse-values#70
devalpatel67 wants to merge 1 commit into
mainfrom
fix/reuse-values-on-provider-upgrade

Conversation

@devalpatel67
Copy link
Copy Markdown
Collaborator

@devalpatel67 devalpatel67 commented May 26, 2026

Summary

  • Follow-up to fix: pass ACME email to akash-provider chart on fresh install #69. upgrade_service.py runs helm upgrade akash-provider without --reuse-values, so unspecified values reset to chart defaults each upgrade.
  • For operators who only supplied cert_manager.acme_email on install (no top-level email: in provider.yaml), this wipes letsEncrypt.acme.email and the provider pod crashes after upgrade with Error: cert issuer: invalid config: invalid email — the same failure mode fix: pass ACME email to akash-provider chart on fresh install #69 fixed for the restart path.
  • Apply --reuse-values to both upgrade paths (akashnet-2 and sandbox/--devel). -f provider.yaml and the explicit --set overrides (bidpricescript, image.tag) still layer on top.

Test plan

  • On a v0.12.0 cluster that was fresh-installed with only cert_manager.acme_email (no provider.config.email): run upgrade_provider, confirm akash-provider-0 restarts cleanly and the entrypoint debug shows the original AP_CERT_ISSUER_EMAIL value preserved.
  • On a cluster that has provider.config.email populated: run upgrade_provider, confirm no regression in image.tag or bidpricescript (both should still update to the new values via the explicit --set flags layered over the reused values).
  • Run upgrade_network on a sandbox cluster: same checks on the --devel path.
  • kubectl -n akash-services get cm akash-provider-letsencrypt -o yaml shows AP_CERT_ISSUER_EMAIL still set after upgrade.

Summary by CodeRabbit

  • Bug Fixes
    • Provider Helm chart upgrades now preserve previously configured values during the upgrade process. This ensures settings established at installation time (such as email configuration) are retained rather than being reset during upgrades.

Review Change Stack

upgrade_service.py runs `helm upgrade akash-provider` without
--reuse-values, so unspecified values reset to chart defaults on
upgrade. For operators who only supplied cert_manager.acme_email
on install (no top-level email in provider.yaml), this wipes
letsEncrypt.acme.email and the provider pod crashes with
"cert issuer: invalid email" after the upgrade.

Same fix as #69 in restart_provider_service, applied to the two
upgrade paths (mainnet and sandbox).
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 23ed43ee-0d18-4146-ad46-7200a741e129

📥 Commits

Reviewing files that changed from the base of the PR and between a5484c4 and 704aaa7.

📒 Files selected for processing (1)
  • application/service/upgrade_service.py

📝 Walkthrough

Walkthrough

The provider Helm chart upgrade command in UpgradeService.upgrade_provider now uses the --reuse-values flag for both akashnet-2 and non-akashnet-2 deployments, with inline comments clarifying that install-time configuration such as letsEncrypt.acme.email is preserved while later -f and --set options can still override values.

Changes

Helm Upgrade Configuration

Layer / File(s) Summary
Helm upgrade with reuse-values flag
application/service/upgrade_service.py
The provider Helm chart upgrade command for both chain ID branches now includes helm upgrade --reuse-values, with comments describing that install-time --set overrides are preserved while subsequent -f and --set values layer on top.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • akash-network/provider-console-api#69: The main PR's switch to helm upgrade --reuse-values for the akash-provider chart preserves install-time --set letsEncrypt.acme.email, which directly complements the retrieved PR's change to inject that ACME email on fresh helm install.

Suggested reviewers

  • jigar-arc10

Poem

🐰 A Helm upgrade hops along so bright,
With --reuse-values held tight!
Install-time config stays in place,
While new overrides join the race.
One flag preserves what came before! 🚀

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely summarizes the main change: adding --reuse-values to the helm upgrade command to preserve ACME email during provider chart upgrades.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/reuse-values-on-provider-upgrade

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant