Skip to content

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

Merged
NautiluX merged 9 commits into
mainfrom
fix/update-install-config-vault-encryption
Aug 6, 2026
Merged

fix(cli): keep updated install vault encrypted#622
NautiluX merged 9 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
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
@NautiluX
NautiluX requested a review from joka134 August 4, 2026 14:51
@NautiluX

NautiluX commented Aug 4, 2026

Copy link
Copy Markdown
Member Author

Reviewed and tested manually, now validates the postgres options and encrypts the vault.

Comment thread cli/cmd/update_install_config.go Outdated
Comment thread internal/installer/config_manager.go Outdated
Comment thread internal/installer/config_manager.go Outdated
Comment thread internal/installer/config_manager.go Outdated
Comment thread internal/installer/config_manager_test.go Outdated
Comment thread internal/installer/config_manager_test.go Outdated
Comment thread internal/installer/config_manager.go Outdated
Comment thread internal/installer/config_manager.go Outdated
@NautiluX
NautiluX force-pushed the fix/update-install-config-vault-encryption branch 3 times, most recently from b984118 to 6b11cc3 Compare August 5, 2026 11:45
Signed-off-by: NautiluX <2600004+NautiluX@users.noreply.github.com>
@NautiluX
NautiluX requested a review from joka134 August 5, 2026 11:47

@joka134 joka134 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🚀

Comment thread cli/cmd/update_install_config.go
@NautiluX
NautiluX merged commit 008fae2 into main Aug 6, 2026
5 of 6 checks passed
@NautiluX
NautiluX deleted the fix/update-install-config-vault-encryption branch August 6, 2026 09:03
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.

2 participants