Closed condaatje closed 1 month ago
it's possible I'm doing something wrong here
Hi, the main issue seems to be that nonsensitive
expects a string or a secret, but you're passing in an array (["argocd", "tailscale"]
). It looks like things should be OK if you remove that call to nonsensitive:
discovery.kubernetes "pod" {
role = "pod"
namespaces {
own_namespace = true
// https://grafana.com/docs/alloy/latest/get-started/configuration-syntax/expressions/function_calls/
names = json_decode(remote.kubernetes.configmap.grafana_cloud.data["loki-target-namespaces"])
}
}
awesome, that worked nicely. thanks!
What's wrong?
when importing a list of namespaces via configmap, alloy config throws an error
Steps to reproduce
create a configmap like so:
then try to import the list of namespaces in the alloy config like so:
config reloader spits out the following error:
System information
kubernetes
Software version
latest version of alloy
Configuration
Logs