generated from cloudoperators/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[filelog] clusterrole settings and parsing k8s, prom metrics (#191)
* [filelog] clusterrole settings and parsing k8s, prom metrics * make prom configurable * Automatic application of license header * reduce batch size, because of circuitbreaker problem * switch to variables for index, adding k8sevents * add switch for podMonitor * bump chart * bump in plugindefinition --------- Co-authored-by: License Bot <[email protected]>
- Loading branch information
Showing
7 changed files
with
300 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Greenhouse contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: logs-collector | ||
labels: | ||
app: logs-collector | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["pods", "namespaces", "nodes"] | ||
verbs: ["get", "watch", "list"] | ||
- apiGroups: ["apps"] | ||
resources: ["replicasets"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: ["extensions"] | ||
resources: ["replicasets"] | ||
verbs: ["get", "list", "watch"] |
17 changes: 17 additions & 0 deletions
17
opentelemetry-operator/chart/templates/clusterrolebindings.yaml
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,17 @@ | ||
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Greenhouse contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: logs-collector | ||
labels: | ||
app: logs-collector | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: logs-collector | ||
subjects: | ||
- kind: ServiceAccount | ||
name: logs-collector | ||
namespace: otel |
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
10 changes: 10 additions & 0 deletions
10
opentelemetry-operator/chart/templates/serviceaccount.yaml
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,10 @@ | ||
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Greenhouse contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
app: logs-collector | ||
name: logs-collector | ||
namespace: otel |
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,26 @@ | ||
{{/* | ||
SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Greenhouse contributors | ||
SPDX-License-Identifier: Apache-2.0 | ||
*/}} | ||
{{- if index .Values "opentelemetry-operator" "manager" "podMonitor" "enabled" }} | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: PodMonitor | ||
metadata: | ||
annotations: | ||
name: opentelemetry-collector-logs | ||
labels: | ||
prometheus: "{{ .Values.open_telemetry.prometheus }}" | ||
spec: | ||
podMetricsEndpoints: | ||
- interval: 60s | ||
scrapeTimeout: 50s | ||
path: /metrics | ||
scheme: http | ||
port: prometheus | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/component: opentelemetry-collector | ||
app.kubernetes.io/instance: otel.logs | ||
app.kubernetes.io/managed-by: opentelemetry-operator | ||
app.kubernetes.io/part-of: opentelemetry | ||
{- end }} |
Oops, something went wrong.