Skip to content

Commit

Permalink
template grafana-agent-config (#273)
Browse files Browse the repository at this point in the history
* template grafana-agent-config

* fix incorrect grafana agent secret namespace

* add common format scraped namespaces
  • Loading branch information
QuentinBisson committed Dec 17, 2024
1 parent 211f3b6 commit f6772ea
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 222 deletions.
8 changes: 8 additions & 0 deletions pkg/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,11 @@ func FormatScrapedNamespaces(lc loggedcluster.Interface, namespaces []string) st

return "[]"
}

func FormatScrapedNamespaces(lc loggedcluster.Interface, namespaces []string) string {
if IsWorkloadCluster(lc) {
return fmt.Sprintf("[\"%s\"]", strings.Join(namespaces, "\", \""))
}

return "[]"
}
1 change: 0 additions & 1 deletion pkg/resource/events-logger-config/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package eventsloggerconfig
import (
"context"
"reflect"

"github.com/pkg/errors"
v1 "k8s.io/api/core/v1"
apimachineryerrors "k8s.io/apimachinery/pkg/api/errors"
Expand Down
1 change: 0 additions & 1 deletion pkg/resource/events-logger-secret/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package eventsloggersecret
import (
"context"
"reflect"

"github.com/pkg/errors"
v1 "k8s.io/api/core/v1"
apimachineryerrors "k8s.io/apimachinery/pkg/api/errors"
Expand Down
144 changes: 0 additions & 144 deletions pkg/resource/grafana-agent-config/grafana-agent-config.go

This file was deleted.

76 changes: 0 additions & 76 deletions pkg/resource/grafana-agent-secret/grafana-agent-secret.go

This file was deleted.

0 comments on commit f6772ea

Please sign in to comment.