Skip to content

Commit

Permalink
Add basic example for Tempo (#9)
Browse files Browse the repository at this point in the history
* Add Tempo example #8

* Apply changes requested in the code review

Signed-off-by: Israel Blancas <[email protected]>

* Fix indentation

* Remove usage of minio and add a new name to the instance

* Apply changes requested in code review

---------

Signed-off-by: Israel Blancas <[email protected]>
  • Loading branch information
iblancasa authored May 17, 2023
1 parent 8b96a98 commit 827e7f9
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 10 deletions.
20 changes: 10 additions & 10 deletions opentelemetry/sidecar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,25 @@ The collector is configured to run as a sidecar in the cluster. This means that
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: otel-collector
namespace: otel-collector-example
name: otel-collector
namespace: otel-collector-example
rules:
- apiGroups: ["", "config.openshift.io"]
resources: ["pods", "namespaces", "infrastructures"]
verbs: ["get", "watch", "list"]
resources: ["pods", "namespaces", "infrastructures"]
verbs: ["get", "watch", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: otel-collector
name: otel-collector
subjects:
- kind: ServiceAccount
name: <SERVICE ACCOUNT NAME>
namespace: otel-collector-example
name: otel-collector-deployment
namespace: otel-collector-example
roleRef:
kind: ClusterRole
name: otel-collector
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: otel-collector
apiGroup: rbac.authorization.k8s.io
EOF
```
These resources are needed to make the `resourcedetection` work properly on OpenShift.
18 changes: 18 additions & 0 deletions tempo/noauth/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Tempo deployment

This is an example to deploy a Tempo instance using the Tempo Operator. It doesn't have authorization nor multitenancy enabled.

## How to run
1. Create an Object storage instance using [OpenShift Data Foundation](https://access.redhat.com/documentation/en-us/red_hat_openshift_data_foundation/).
1. Create an Object Storage secret with keys as follows:
```console
kubectl create secret generic tempostack-odf \
--from-literal=bucket="<BUCKET_NAME>" \
--from-literal=endpoint="https://s3.openshift-storage.svc" \
--from-literal=access_key_id="<ACCESS_KEY_ID>" \
--from-literal=access_key_secret="<ACCESS_KEY_SECRET>"
```
1. Deploy the Tempo instance in the `tempo-example` OpenShift Project:
```sh
kubectl create -f tempo.yaml
```
22 changes: 22 additions & 0 deletions tempo/noauth/tempo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: project.openshift.io/v1
kind: Project
metadata:
name: tempo-example
---
apiVersion: tempo.grafana.com/v1alpha1
kind: TempoStack
metadata:
name: simple
namespace: tempo-example
spec:
storage:
secret:
# Name of the secret with the information to access the object storage
name: tempostack-odf
type: s3
storageSize: 1Gi
template:
queryFrontend:
jaegerQuery:
# Enable the Jaeger UI
enabled: true

0 comments on commit 827e7f9

Please sign in to comment.