refactor: simplify alloy installation by only requiring k8s secrets#378
Draft
refactor: simplify alloy installation by only requiring k8s secrets#378
Conversation
bb7fb01 to
7a476ba
Compare
Signed-off-by: Bruno De Assis Marques <bruno.marques@swirldslabs.com>
7a476ba to
2462c6d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
ExternalSecretandClusterSecretStoreresources; all remote passwords are now sourced from thegrafana-alloy-secretsK8s secret using keys likePROMETHEUS_PASSWORD_<NAME>andLOKI_PASSWORD_<NAME>. [1] [2] [3] [4]RequiredSecrets()method toConfigBuilderto programmatically determine required secret keys for remotes, and updated tests to validate this convention. [1] [2]Taskfile and local development workflow improvements:
Taskfile.yamlto 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:
--cluster-secret-storeflag, and improved install command documentation to reflect the new workflow. [1] [2]Code and test cleanup:
internal/alloy/render_test.goto validate secret key conventions and ensure only the conventional secret is required.Documentation updates:
Related Issues