-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for watching multiple namespaces
Previously, MontoringStack was only able to watch resources in the same namespace as the stack itself. This commit improves that by allowing user to configure a namespaceSelector in the stack which allows the stack to watch resources created in namespaces matching that label selector. The changes involve * converting the prometheus role to a cluster role * creating a cluster-role-binding allowing prometheus to watch resources in other namespaces if a namespaceSelector is configured Signed-off-by: Sunil Thaha <[email protected]>
- Loading branch information
Showing
13 changed files
with
546 additions
and
121 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,4 @@ spec: | |
retention: 1d | ||
resourceSelector: | ||
matchLabels: | ||
system: foo | ||
app: demo |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: monitoring.rhobs/v1alpha1 | ||
kind: MonitoringStack | ||
metadata: | ||
name: multi-ns | ||
labels: | ||
thanos-querier: the-querier | ||
spec: | ||
logLevel: debug | ||
retention: 2h | ||
resourceSelector: | ||
matchLabels: | ||
app: demo | ||
namespaceSelector: | ||
matchLabels: | ||
monitoring.rhobs/stack: multi-ns |
This file contains 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
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Oops, something went wrong.