Skip to content

feat: make secrets provider optional#16

Merged
veerendra2 merged 3 commits intomainfrom
13-decouple-secrets-manager
Apr 11, 2026
Merged

feat: make secrets provider optional#16
veerendra2 merged 3 commits intomainfrom
13-decouple-secrets-manager

Conversation

@veerendra2
Copy link
Copy Markdown
Owner

@veerendra2 veerendra2 commented Apr 8, 2026

Summary

  • Decouple secrets manager so ComposeFlux can run without a secrets provider configured
  • Consolidate 3 secrets-related fields in CommonConfig into a single embedded secrets.Config
  • Change GIT_DEPLOY_KEY_SECRET_REF default from SSH_PRIVATE_KEY to empty (opt-in)
  • Update documentation to reflect optional secrets provider

Test plan

  • Run without --secrets-provider — should start without errors
  • Run with --secrets-provider=bitwarden — should work as before
  • Run without provider but with --deploy-key-secret-ref set — should fail with clear error
  • go build ./... and go vet ./... pass

🤖 Generated with Claude Code

Decouple secrets manager from core functionality so users can run
ComposeFlux without configuring a secrets provider.

- Consolidate 3 secrets fields in CommonConfig into single embedded secrets.Config
- Make secrets provider optional (enum allows empty, default "")
- Return nil client from secrets.New() when no provider configured
- Add nil guard in cacheLoadSecrets() and before sClient.Get()
- Change DeployKeySecretRef default from "SSH_PRIVATE_KEY" to "" (opt-in)
- Update documentation to reflect optional secrets provider
- Add .prettierrc.yaml for markdown formatting

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@veerendra2 veerendra2 linked an issue Apr 8, 2026 that may be closed by this pull request
1 task
@veerendra2 veerendra2 requested a review from Copilot April 8, 2026 19:47
@veerendra2 veerendra2 added build Builds dev docker image labels Apr 8, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR decouples secrets management from core operation so ComposeFlux can run without a configured secrets provider, while consolidating secrets-related CLI/config fields into a single secrets.Config and updating docs accordingly.

Changes:

  • Make secrets provider optional (secrets client can be nil when unconfigured) and guard secrets-loading paths.
  • Consolidate secrets configuration into secrets.Config and update CLI validation/initialization logic.
  • Switch GIT_DEPLOY_KEY_SECRET_REF default to empty (opt-in) and refresh documentation + formatting/tooling.

Reviewed changes

Copilot reviewed 17 out of 19 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
README.md Updates feature bullets/formatting to describe secrets as optional.
pkg/source/git.go Makes deploy key secret ref opt-in by defaulting to empty.
pkg/secrets/client.go Introduces optional Provider in secrets config and updates client factory behavior.
pkg/secrets/bitwarden.go Minor formatting/alignment in config struct fields.
internal/reconcile/run.go Simplifies startup log line.
internal/reconcile/reconcile.go Flattens reconciler config by removing nested Timers struct.
internal/reconcile/cache.go Skips secrets fetch when no secrets client is configured.
go.sum Dependency checksum updates due to module bumps.
go.mod Adjusts Go version directive and bumps several dependencies.
docs/Introduction.md Updates narrative/formatting and removes “secrets required” implication.
docs/index.md Updates summary bullets to describe secrets as optional.
docs/how-to-guides/Infisical.md Reflows text and clarifies deploy-key guidance.
docs/how-to-guides/GithubDeployKeys.md Updates guidance for opt-in deploy key fetching and provider requirement.
docs/how-to-guides/Bitwarden.md Reflows text and clarifies deploy-key guidance.
docs/GettingStarted.md Marks secrets provider as optional; updates env var tables and examples.
docs/Development.md Reflows documentation about CGO/Bitwarden SDK requirements.
cmd/composeflux/common.go Embeds secrets.Config, updates validation, and makes secrets client optional with nil-safe cleanup.
AGENTS.md Updates documentation to describe secrets as optional and bumps stated Go version.
.prettierrc.yaml Adds Prettier configuration for consistent prose wrapping.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/secrets/client.go
Comment thread AGENTS.md
@veerendra2 veerendra2 marked this pull request as ready for review April 10, 2026 14:54
@veerendra2 veerendra2 removed the build Builds dev docker image label Apr 11, 2026
@veerendra2 veerendra2 merged commit a98a7be into main Apr 11, 2026
1 of 2 checks passed
@veerendra2 veerendra2 deleted the 13-decouple-secrets-manager branch April 11, 2026 13:19
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.

Decouple secrets manager

2 participants