Skip to content

feat(infrahub): allow extra arguments on the upgrade job command - #82

Merged
fatih-acar merged 1 commit into
stablefrom
feat/upgrade-job-extra-args
Aug 3, 2026
Merged

fatih-acar merged 1 commit into
stablefrom
feat/upgrade-job-extra-args

Conversation

@BeArchiTek

Copy link
Copy Markdown
Contributor

Summary

The upgrade hook job hardcodes command: ["infrahub", "upgrade"], so none of the upgrade CLI options can be set through the chart. In particular, step 6/6 of the upgrade pipeline (branch rebase) only writes when --rebase-branches is passed, and migrations of type MigrationRequiringRebase leave every open branch unusable until rebased — Helm users currently have to exec into a pod and rerun the command manually after the hook job completes.

Key Changes

  • Operators can now pass arguments to the infrahub upgrade command run by the upgrade job (when upgrade.enabled is true) via a new upgrade.extraArgs value, e.g.:

    upgrade:
      enabled: true
      extraArgs: ["--rebase-branches"]
  • Default rendering is unchanged: extraArgs defaults to [] and no args key is emitted when it is empty.

  • Chart README regenerated (helm-docs) and changelog fragment added.

Related Context

Test Plan

  • helm lint charts/infrahub passes.
  • helm template test charts/infrahub --set upgrade.enabled=true --set 'upgrade.extraArgs={--rebase-branches}' --show-only templates/infrahub-upgrade-job.yaml renders args: [--rebase-branches] on the container.
  • Same render without extraArgs produces the exact output as before this change.

🤖 Generated with Claude Code

The upgrade hook job hardcodes command: ["infrahub", "upgrade"], so none
of the upgrade CLI options can be set through the chart. In particular,
step 6/6 of the upgrade pipeline (branch rebase) only writes when
--rebase-branches is passed, and migrations of type
MigrationRequiringRebase leave every open branch unusable until rebased.
Helm users currently have to exec into a pod and rerun the command
manually after the hook job completes.

Add upgrade.extraArgs (empty by default) rendered as the container args,
e.g. ["--rebase-branches"]. Default rendering is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@fatih-acar
fatih-acar merged commit 3bdb346 into stable Aug 3, 2026
10 checks passed
@fatih-acar
fatih-acar deleted the feat/upgrade-job-extra-args branch August 3, 2026 07:11
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