Skip to content

refactor: relation naming - #115

Merged
SimonRichardson merged 1 commit into
juju:4.0from
SimonRichardson:relation-names
Apr 17, 2026
Merged

refactor: relation naming#115
SimonRichardson merged 1 commit into
juju:4.0from
SimonRichardson:relation-names

Conversation

@SimonRichardson

Copy link
Copy Markdown
Member

The relation names weren't ideal in the grand scheme of usage in the controller snap. Instead, if we naming the correctly it should allow us to add better versioning in the future.


Setup Tempo

Build the charm with charmcraft pack

To make this proper, we need a COS-lite or something similar. I used COS-lite on microk8s and then deployed tempo in the same model.

Once there is a COS-lite with tempo we need to offer the tempo:tracing relation.

$ juju offer tempo:tracing

Controller charm setup

To make this "simple" we can only deploy a local controller charm using IAAS controllers. So we need to bootstrap a IAAS controller (again for simplicity I'm using LXD).

$ juju bootstrap lxd test --bootstrap-base=ubuntu@24.04 --controller-charm-path=./juju-controller_ubuntu@24.04-amd64.charm
$ juju switch controller
$ juju consume cos:admin/lite.tempo
$ juju integrate controller:charm-tracing tempo:tracing

Verify the endpoints are consumed

$ juju ssh -m test:controller controller 0
$ juju_db_repl
repl (controller)> SELECT * FROM charm_tracing_config
key             value
http-endpoint   http://tempo.m.svc.cluster.local:4318
grpc-endpoint   tempo.m.svc.cluster.local:4317

Verify that the information is set as vars:

$ juju debug-hook -m controller controller/0

You might have to trigger a hook invocation with something like juju config -m controller controller identity-provider-url="foo".

root@juju-2bd818-0:/var/lib/juju/agents/unit-controller-0/charm# printenv | grep -E "JUJU_CHARM_TRACE_CONFIG_(H|G)"
JUJU_CHARM_TRACE_CONFIG_HTTP=http://tempo.lite.svc.cluster.local:4318
JUJU_CHARM_TRACE_CONFIG_GRPC=tempo.lite.svc.cluster.local:4317

🎉

The relation names weren't ideal in the grand scheme of usage in the
controller snap. Instead, if we naming the correctly it should allow
us to add better versioning in the future.
@SimonRichardson
SimonRichardson merged commit b02b93e into juju:4.0 Apr 17, 2026
@SimonRichardson
SimonRichardson deleted the relation-names branch April 17, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants