Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add catalogue + ingress tempo integrations in COS TF module #253

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion terraform/modules/cos/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ module "ssc" {
}

module "tempo" {
source = "git::https://github.com/canonical/observability//terraform/modules/tempo"
# TODO: remove ref before merging
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder :)

source = "git::https://github.com/canonical/observability//terraform/modules/tempo?ref=TAP-158"
model_name = var.model_name
channel = var.channel
compactor_units = var.tempo_compactor_units
Expand Down Expand Up @@ -288,6 +289,20 @@ resource "juju_integration" "grafana_catalogue" {
}
}

resource "juju_integration" "tempo_catalogue" {
model = var.model_name

application {
name = module.catalogue.app_name
endpoint = module.catalogue.endpoints.catalogue
}

application {
name = module.tempo.app_names.tempo_coordinator
endpoint = module.tempo.endpoints.catalogue
}
}

# Provided by Traefik

resource "juju_integration" "catalogue_ingress" {
Expand Down Expand Up @@ -332,6 +347,20 @@ resource "juju_integration" "loki_ingress" {
}
}

resource "juju_integration" "tempo_ingress" {
model = var.model_name

application {
name = module.traefik.app_name
endpoint = module.traefik.endpoints.traefik_route
}

application {
name = module.tempo.app_names.tempo_coordinator
endpoint = module.tempo.endpoints.ingress
}
}

# Grafana agent

resource "juju_integration" "agent_loki_metrics" {
Expand Down
10 changes: 6 additions & 4 deletions terraform/modules/tempo/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ output "app_names" {
output "endpoints" {
value = {
# Requires
logging = "logging",
ingress = "ingress",
certificates = "certificates",
send-remote-write = "send-remote-write",
logging = "logging",
ingress = "ingress",
certificates = "certificates",
send-remote-write = "send-remote-write",
receive_datasource = "receive-datasource"
catalogue = "catalogue",

# Provides
tempo_cluster = "tempo-cluster"
Expand Down
Loading