Skip to content

Comments

refactor: simplify alloy installation by only requiring k8s secrets#378

Draft
brunodam wants to merge 1 commit intomainfrom
00376-alloy-on-k8s-secrets
Draft

refactor: simplify alloy installation by only requiring k8s secrets#378
brunodam wants to merge 1 commit intomainfrom
00376-alloy-on-k8s-secrets

Conversation

@brunodam
Copy link
Contributor

Description

This pull request refactors the Alloy stack setup and configuration to simplify secret management for remote endpoints. The main change is that all remote endpoint passwords (for Prometheus and Loki) are now expected in a single Kubernetes secret (grafana-alloy-secrets) using a conventional key naming scheme. This removes the need for ExternalSecret and ClusterSecretStore configuration, clarifies local development workflows, and updates documentation and code to reflect the new convention.

Secret management and configuration simplification:

  • Removed support for ExternalSecret and ClusterSecretStore resources; all remote passwords are now sourced from the grafana-alloy-secrets K8s secret using keys like PROMETHEUS_PASSWORD_<NAME> and LOKI_PASSWORD_<NAME>. [1] [2] [3] [4]
  • Added the RequiredSecrets() method to ConfigBuilder to programmatically determine required secret keys for remotes, and updated tests to validate this convention. [1] [2]

Taskfile and local development workflow improvements:

  • Updated Taskfile.yaml to provide clear instructions for starting the Alloy stack, creating/deleting the K8s secret, and next steps for local testing; added new tasks for secret creation and deletion. [1] [2] [3] [4]

CLI and documentation changes:

  • Updated Alloy CLI flags and help text to clarify the new secret convention, deprecated the --cluster-secret-store flag, and improved install command documentation to reflect the new workflow. [1] [2]

Code and test cleanup:

  • Removed unused code and constants related to ExternalSecret, ClusterSecretStore, and Vault path prefix. [1] [2] [3] [4]
  • Updated tests in internal/alloy/render_test.go to validate secret key conventions and ensure only the conventional secret is required.

Documentation updates:

  • Added clarifying comments and updated documentation throughout the codebase to reflect the new secret management convention.

Related Issues

@brunodam brunodam requested a review from leninmehedy February 21, 2026 00:24
@brunodam brunodam force-pushed the 00376-alloy-on-k8s-secrets branch from bb7fb01 to 7a476ba Compare February 21, 2026 00:30
Signed-off-by: Bruno De Assis Marques <bruno.marques@swirldslabs.com>
@brunodam brunodam force-pushed the 00376-alloy-on-k8s-secrets branch from 7a476ba to 2462c6d Compare February 21, 2026 00:32
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.

Alloy installations depending only on k8s secrets

1 participant