canonical / tempo-coordinator-k8s-operator

https://charmhub.io/tempo-coordinator-k8s
Apache License 2.0
0 stars 0 forks source link

translate tempo config to pydantic models #5

Closed michaeldmitry closed 3 months ago

michaeldmitry commented 3 months ago

Issue

tempo configurations are in the form of raw dicts.

Solution

Translate all currently used tempo config to pydantic models.

Testing instructions

For coordinator to work and push tempo configuration to workers, it needs an s3 integration. To workaround the issue and not need an actual s3 instance, we can use Facade charm for mocking s3 interface.

Deploy tempo k8s operator (used for validation)

juju deploy tempo-k8s tempo --resource tempo-image=grafana/tempo:2.4.0 --channel=latest/edge

Deploy tempo coordinator

cwd to tempo-coordinator-k8s-operator

charmcraft pack
juju deploy ./tempo-coordinator-k8s_ubuntu-22.04-amd64.charm 

Deploy Facade

cwd to tempo-coordinator-k8s-operator

juju deploy facade s3-facade --channel=latest/edge
juju integrate s3-facade:provide-s3 tempo-coordinator-k8s:s3
juju run s3-facade/0 update --params ./tests/manual/facades/s3.yaml

Deploy tempo worker

cwd to tempo-worker-k8s-operator

git fetch
git checkout coordinator-integration
charmcraft pack
juju deploy ./tempo-worker-k8s_ubuntu-22.04-amd64.charm  tempo-worker --resource tempo-image=docker.io/ubuntu/tempo:2-22.04

Integrate cluster

 juju integrate tempo-coordinator-k8s tempo-worker

Validation

1- coordinator and worker should both be in active/idle 2- kubectl exec -it tempo-worker-0 -n -c tempo -- cat /etc/tempo/tempo.yaml 3- kubectl exec -it tempo-0 -n -c tempo -- cat /etc/tempo/tempo.yaml 4- Both config files should match apart from storage options, as s3 would be used in coordinator instead of local storage

TLS Validation

Repeat above steps after juju integrate ssc tempo-coordinator-k8s

github-advanced-security[bot] commented 3 months ago

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.