-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the ability to get config remotely #805
Conversation
ca27d88
to
880032f
Compare
3a8f374
to
43162c2
Compare
Not working because the secret management templates are tied specifically to destinations Signed-off-by: Pete Wall <pete.wall@grafana.com>
Signed-off-by: Pete Wall <pete.wall@grafana.com>
Signed-off-by: Pete Wall <pete.wall@grafana.com>
Signed-off-by: Pete Wall <pete.wall@grafana.com>
Signed-off-by: Pete Wall <pete.wall@grafana.com>
Signed-off-by: Pete Wall <pete.wall@grafana.com>
Signed-off-by: Pete Wall <pete.wall@grafana.com>
Signed-off-by: Pete Wall <pete.wall@grafana.com>
Signed-off-by: Pete Wall <pete.wall@grafana.com>
Signed-off-by: Pete Wall <pete.wall@grafana.com>
Signed-off-by: Pete Wall <pete.wall@grafana.com>
Signed-off-by: Pete Wall <pete.wall@grafana.com>
6e93ca3
to
b9af9d3
Compare
usernameKey: "username" | ||
# -- Raw config for accessing the password. | ||
# @section -- Collectors - Alloy Metrics | ||
usernameFrom: "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these get used somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, because this line:
username = {{ include "secrets.read" (dict "object" . "key" "auth.username" "nonsensitive" true) }}
Actually does a ton.
If your values are:
auth: { username = "myuser" }
Then, this will create a K8s secret, with username: myuser
and then the alloy config references that secret.
If your values are:
auth: { username = "myuser" }
secret: { embed = true }
Then the string "myuser" is set in the alloy config and no secret is created.
Finally, if your values are:
auth: { usernameFrom = env("MY_USERAME") }
Then it injects the raw string env("MY_USERAME") as the value for the username.
All of this is handled by the template functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not even mentioning these values:
auth: { usernameKey = "user" }
secret: { create = false, name = mysecret }
Which then references another pre-created secret with a custom key in that secret.
Notes to reviewers:
The only files I'd like you to review are:
So much of the rest are just: