Skip to content

fix(cli): keep updated install vault encrypted - #622

Open
NautiluX wants to merge 6 commits into
mainfrom
fix/update-install-config-vault-encryption
Open

fix(cli): keep updated install vault encrypted#622
NautiluX wants to merge 6 commits into
mainfrom
fix/update-install-config-vault-encryption

Conversation

@NautiluX

@NautiluX NautiluX commented Jul 30, 2026

Copy link
Copy Markdown
Member

Summary

  • keep prod.vault.yaml SOPS-encrypted after oms update install-config
  • centralize encrypted vault output in InstallConfigManager and reuse the existing SOPS encryption helper
  • route temporary-file creation, writes, permissions, cleanup, and replacement through the FileIO abstraction
  • replace the encrypted target only after successful encryption, preserving the original vault on failure
  • share --postgres-server interpretation between init and update: primary hostname in install mode, server address in external mode
  • update generated command documentation

Tests

  • go test ./internal/util ./internal/installer ./internal/installer/vault ./cli/cmd -count=1
  • success coverage verifies the updated vault remains encrypted and decryptable
  • failure coverage uses in-memory file operations and verifies the original vault is unchanged

ClickUp: https://app.clickup.com/t/24560134/869e71neh

NautiluX and others added 2 commits July 30, 2026 08:25
Signed-off-by: NautiluX <2600004+NautiluX@users.noreply.github.com>
Comment thread cli/cmd/update_install_config.go
Comment thread cli/cmd/update_install_config.go Outdated
Comment thread cli/cmd/update_install_config.go Outdated

vaultData, err := icg.GetVault().Marshal()
if err != nil {
return fmt.Errorf("failed to marshal vault.yaml: %w", err)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this should mention the actual filename, not vault.yaml

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The shared marshaling error now includes the actual target filename via filepath.Base(vaultPath).

Comment thread internal/installer/vault/vault_encryption.go Outdated
Comment thread internal/installer/config_manager.go Outdated
Comment thread internal/installer/config_manager_test.go
Comment thread internal/installer/config_manager.go Outdated
Comment thread internal/installer/config_manager.go Outdated
Comment thread internal/installer/config_manager.go Outdated
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