Skip to content

Commit

Permalink
Add tempo operator
Browse files Browse the repository at this point in the history
The Tempo operator exposes the Jaeger UI,
enabling the viewing of traces exclusively in the dev environment.
  • Loading branch information
rrajashe committed Jul 16, 2024
1 parent 601270a commit b84264f
Show file tree
Hide file tree
Showing 11 changed files with 179 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ resources:
- spacerequest-cleaner
- mintmaker
- tracing-workload-otel-collector
- tempo
components:
- ../../../k-components/inject-infra-deployments-repo-details
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- tempo.yaml
components:
- ../../../../k-components/deploy-to-member-cluster-merge-generator
41 changes: 41 additions & 0 deletions argo-cd-apps/base/member/infra-deployments/tempo/tempo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: tempo
spec:
generators:
- merge:
mergeKeys:
- nameNormalized
generators:
- clusters:
values:
sourceRoot: components/tracing/tempo
environment: development
clusterDir: ""
- list:
elements: []
template:
metadata:
name: tempo-{{nameNormalized}}
spec:
project: default
source:
repoURL: https://github.com/redhat-appstudio/infra-deployments.git
targetRevision: main
path: '{{values.sourceRoot}}/{{values.environment}}/{{values.clusterDir}}'
destination:
namespace: tempo-operator
server: '{{server}}'
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
retry:
limit: 50
backoff:
duration: 10s
factor: 2
maxDuration: 3m
7 changes: 6 additions & 1 deletion argo-cd-apps/overlays/development/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,9 @@ patches:
target:
kind: ApplicationSet
version: v1alpha1
name: tracing-workload-otel-collector
name: tracing-workload-otel-collector
- path: development-overlay-patch.yaml
target:
kind: ApplicationSet
version: v1alpha1
name: tempo
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,10 @@ kind: ApplicationSet
metadata:
name: workspaces
$patch: delete
---
# Tempo is excluded from the production
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: tempo
$patch: delete
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,9 @@ metadata:
name: gitops
$patch: delete
---

# Tempo is excluded from the staging
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: tempo
$patch: delete
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
config:
exporters:
otlphttp:
endpoint: tempo-tempo-jaegerui:4318
debug:
verbosity: basic
extensions:
Expand Down Expand Up @@ -42,6 +44,7 @@ config:
traces:
exporters:
- debug
- otlphttp
processors:
- memory_limiter
- attributes/collector-info
Expand Down
6 changes: 6 additions & 0 deletions components/tracing/tempo/development/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- tempo-operator.yaml
- storage-resources.yaml
- tempo.yaml
50 changes: 50 additions & 0 deletions components/tracing/tempo/development/storage-resources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Storage Class for Grafana Tempo monolithic instance
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: tempo-nfs-storage
annotations:
argocd.argoproj.io/sync-wave: "0"
provisioner: storage.io/nfs
reclaimPolicy: Delete
allowVolumeExpansion: true
---
# Persistent Volume for Grafana Tempo monolithic instance
kind: PersistentVolume
apiVersion: v1
metadata:
name: tempo-pv
annotations:
argocd.argoproj.io/sync-wave: "0"
spec:
capacity:
storage: 15Gi
nfs:
server: 172.17.0.2
path: /tmp
accessModes:
- ReadWriteOnce # Supported access mode for EBS Storage
claimRef:
kind: PersistentVolumeClaim
name: tempo-pvc
namespace: tempo-operator
persistentVolumeReclaimPolicy: Retain
storageClassName: tempo-nfs-storage
volumeMode: Filesystem
---
# Persistent Volume Claim for Grafana Tempo monolithic instance
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: tempo-pvc
namespace: tempo-operator
annotations:
argocd.argoproj.io/sync-wave: "0"
spec:
storageClassName: tempo-nfs-storage
volumeName: tempo-pv
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi # Adjust size as needed
37 changes: 37 additions & 0 deletions components/tracing/tempo/development/tempo-operator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Namespace for Grafana Tempo Operator
apiVersion: v1
kind: Namespace
metadata:
name: tempo-operator
annotations:
argocd.argoproj.io/sync-wave: "-2"
spec: {}
---
# Grafana Tempo Operator Group
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: tempo-operator
namespace: tempo-operator
annotations:
argocd.argoproj.io/sync-wave: "-2"
spec:
upgradeStrategy: Default
---
# Subscription for tempo-operator
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: tempo-product
namespace: tempo-operator
annotations:
argocd.argoproj.io/sync-wave: "-1"
argocd.argoproj.io/sync-options: Replace=true
labels:
operators.coreos.com/tempo-product.tempo-operator: ""
spec:
channel: stable
installPlanApproval: Automatic
name: tempo-product
source: redhat-operators
sourceNamespace: openshift-marketplace
16 changes: 16 additions & 0 deletions components/tracing/tempo/development/tempo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: tempo.grafana.com/v1alpha1
kind: TempoMonolithic
metadata:
name: tempo
namespace: tempo-operator
annotations:
argocd.argoproj.io/sync-wave: "1"
spec:
storage:
traces:
backend: pv
size: 10Gi
jaegerui:
enabled: true
route:
enabled: true

0 comments on commit b84264f

Please sign in to comment.