Skip to content

Commit

Permalink
Update tempo to 2.5.0 (#958)
Browse files Browse the repository at this point in the history
* Update tempo to 2.5.0

Signed-off-by: Pavol Loffay <[email protected]>

* Upgrade procedure to tempo 2.5.0

Signed-off-by: Pavol Loffay <[email protected]>

* Fix

Signed-off-by: Pavol Loffay <[email protected]>

* Fix monolithic

Signed-off-by: Pavol Loffay <[email protected]>

* Fix

Signed-off-by: Pavol Loffay <[email protected]>

* Fix

Signed-off-by: Pavol Loffay <[email protected]>

* Fix

Signed-off-by: Pavol Loffay <[email protected]>

* Fix

Signed-off-by: Pavol Loffay <[email protected]>

---------

Signed-off-by: Pavol Loffay <[email protected]>
  • Loading branch information
pavolloffay authored Jul 4, 2024
1 parent 76d4720 commit 53d479a
Show file tree
Hide file tree
Showing 10 changed files with 291 additions and 15 deletions.
20 changes: 20 additions & 0 deletions .chloggen/bump-tempo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking

# The name of the component, or a single word describing the area of concern, (e.g. operator, github action)
component: operator

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Update Tempo to 2.5.0

# One or more tracking issues related to the change
issues: [958]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: |
Upstream Tempo 2.5.0 image switched user from `root` to `tempo` (10001:10001) and ownership of `/var/tempo`.
Therefore ingester's `/var/tempo/wal` created by previous deployment using Tempo 2.4.1 needs to be updated and
changed ownership. The operator upgrades the `/var/tempo` ownership by deploying a `job` with `securityContext.runAsUser(0)`
and it runs `chown -R /var/tempo 10001:10001`.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ COPY . .

# Build
ARG OPERATOR_VERSION
ARG TEMPO_VERSION
RUN make build

# Use distroless as minimal base image to package the manager binary
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Current Operator version
OPERATOR_VERSION ?= 0.10.0
TEMPO_VERSION ?= 2.4.1
TEMPO_QUERY_VERSION ?= 2.4.1
TEMPO_VERSION ?= 2.5.0
TEMPO_QUERY_VERSION ?= 2.5.0
TEMPO_GATEWAY_VERSION ?= main-2024-05-29-ca8d2de
TEMPO_GATEWAY_OPA_VERSION ?= main-2024-04-29-914c13f
OAUTH_PROXY_VERSION=4.12
Expand Down Expand Up @@ -159,7 +159,7 @@ run: manifests generate ## Run a controller from your host.

.PHONY: docker-build
docker-build: ## Build docker image with the manager.
docker buildx build --load --platform linux/${ARCH} --build-arg OPERATOR_VERSION -t ${IMG} .
docker buildx build --load --platform linux/${ARCH} --build-arg OPERATOR_VERSION --build-arg TEMPO_VERSION -t ${IMG} .

.PHONY: docker-push
docker-push: ## Push docker image with the manager.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ metadata:
capabilities: Deep Insights
categories: Logging & Tracing,Monitoring
containerImage: ghcr.io/grafana/tempo-operator/tempo-operator:v0.10.0
createdAt: "2024-06-28T12:21:20Z"
createdAt: "2024-07-04T12:01:25Z"
description: Create and manage deployments of Tempo, a high-scale distributed
tracing backend.
operatorframework.io/cluster-monitoring: "true"
Expand Down Expand Up @@ -1190,6 +1190,15 @@ spec:
- deployments/finalizers
verbs:
- update
- apiGroups:
- batch
resources:
- jobs
verbs:
- create
- get
- list
- watch
- apiGroups:
- config.openshift.io
resources:
Expand All @@ -1198,6 +1207,13 @@ spec:
- get
- list
- watch
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- list
- watch
- apiGroups:
- grafana.integreatly.org
resources:
Expand Down Expand Up @@ -1366,9 +1382,9 @@ spec:
- --config=controller_manager_config.yaml
env:
- name: RELATED_IMAGE_TEMPO
value: docker.io/grafana/tempo:2.4.1
value: docker.io/grafana/tempo:2.5.0
- name: RELATED_IMAGE_TEMPO_QUERY
value: docker.io/grafana/tempo-query:2.4.1
value: docker.io/grafana/tempo-query:2.5.0
- name: RELATED_IMAGE_TEMPO_GATEWAY
value: quay.io/observatorium/api:main-2024-05-29-ca8d2de
- name: RELATED_IMAGE_TEMPO_GATEWAY_OPA
Expand Down Expand Up @@ -1513,9 +1529,9 @@ spec:
provider:
name: Grafana Tempo Operator SIG
relatedImages:
- image: docker.io/grafana/tempo:2.4.1
- image: docker.io/grafana/tempo:2.5.0
name: tempo
- image: docker.io/grafana/tempo-query:2.4.1
- image: docker.io/grafana/tempo-query:2.5.0
name: tempo-query
- image: quay.io/observatorium/api:main-2024-05-29-ca8d2de
name: tempo-gateway
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ metadata:
capabilities: Deep Insights
categories: Logging & Tracing,Monitoring
containerImage: ghcr.io/grafana/tempo-operator/tempo-operator:v0.10.0
createdAt: "2024-06-28T12:21:19Z"
createdAt: "2024-07-04T12:01:24Z"
description: Create and manage deployments of Tempo, a high-scale distributed
tracing backend.
operatorframework.io/cluster-monitoring: "true"
Expand Down Expand Up @@ -1200,6 +1200,15 @@ spec:
- deployments/finalizers
verbs:
- update
- apiGroups:
- batch
resources:
- jobs
verbs:
- create
- get
- list
- watch
- apiGroups:
- config.openshift.io
resources:
Expand All @@ -1208,6 +1217,13 @@ spec:
- get
- list
- watch
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- list
- watch
- apiGroups:
- grafana.integreatly.org
resources:
Expand Down Expand Up @@ -1376,9 +1392,9 @@ spec:
- --config=controller_manager_config.yaml
env:
- name: RELATED_IMAGE_TEMPO
value: docker.io/grafana/tempo:2.4.1
value: docker.io/grafana/tempo:2.5.0
- name: RELATED_IMAGE_TEMPO_QUERY
value: docker.io/grafana/tempo-query:2.4.1
value: docker.io/grafana/tempo-query:2.5.0
- name: RELATED_IMAGE_TEMPO_GATEWAY
value: quay.io/observatorium/api:main-2024-05-29-ca8d2de
- name: RELATED_IMAGE_TEMPO_GATEWAY_OPA
Expand Down Expand Up @@ -1534,9 +1550,9 @@ spec:
provider:
name: Grafana Tempo Operator SIG
relatedImages:
- image: docker.io/grafana/tempo:2.4.1
- image: docker.io/grafana/tempo:2.5.0
name: tempo
- image: docker.io/grafana/tempo-query:2.4.1
- image: docker.io/grafana/tempo-query:2.5.0
name: tempo-query
- image: quay.io/observatorium/api:main-2024-05-29-ca8d2de
name: tempo-gateway
Expand Down
4 changes: 2 additions & 2 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ spec:
- --leader-elect
env:
- name: RELATED_IMAGE_TEMPO
value: docker.io/grafana/tempo:2.4.1
value: docker.io/grafana/tempo:2.5.0
- name: RELATED_IMAGE_TEMPO_QUERY
value: docker.io/grafana/tempo-query:2.4.1
value: docker.io/grafana/tempo-query:2.5.0
- name: RELATED_IMAGE_TEMPO_GATEWAY
value: quay.io/observatorium/api:main-2024-05-29-ca8d2de
- name: RELATED_IMAGE_TEMPO_GATEWAY_OPA
Expand Down
16 changes: 16 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ rules:
- deployments/finalizers
verbs:
- update
- apiGroups:
- batch
resources:
- jobs
verbs:
- create
- get
- list
- watch
- apiGroups:
- config.openshift.io
resources:
Expand All @@ -54,6 +63,13 @@ rules:
- get
- list
- watch
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- list
- watch
- apiGroups:
- grafana.integreatly.org
resources:
Expand Down
4 changes: 4 additions & 0 deletions controllers/tempo/tempostack_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ type TempoStackReconciler struct {
// +kubebuilder:rbac:groups=monitoring.coreos.com,resources=servicemonitors;prometheusrules,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=grafana.integreatly.org,resources=grafanadatasources,verbs=get;list;watch;create;update;patch;delete

// Upgrate for 0.11.0 to Tempo 2.5
// +kubebuilder:rbac:groups="core",resources=persistentvolumeclaims,verbs=list;watch
// +kubebuilder:rbac:groups=batch,resources=jobs,verbs=get;list;watch;create

//+kubebuilder:rbac:groups=tempo.grafana.com,resources=tempostacks,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=tempo.grafana.com,resources=tempostacks/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=tempo.grafana.com,resources=tempostacks/finalizers,verbs=update
Expand Down
Loading

0 comments on commit 53d479a

Please sign in to comment.