Skip to content

Ironbank #16

Merged
merged 5 commits into from
Mar 6, 2026
Merged
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ Developer NOTE: We should automate this configuration.

| Name | Source | Version |
|------|--------|---------|
| <a name="module_images"></a> [images](#module\_images) | git::https://github.e.it.census.gov/terraform-modules/aws-ecr-copy-images.git | tf-upgrade |
| <a name="module_tempo-irsa-role"></a> [tempo-irsa-role](#module\_tempo-irsa-role) | git::https://github.e.it.census.gov/SCT-Engineering/tfmod-custom-iam-role-for-service-account-eks.git | main |
| <a name="module_images"></a> [images](#module\_images) | git::https://github.e.it.census.gov/terraform-modules/aws-ecr-copy-images.git/ | tf-upgrade |
| <a name="module_tempo-irsa-role"></a> [tempo-irsa-role](#module\_tempo-irsa-role) | git::https://github.e.it.census.gov/SCT-Engineering/tfmod-custom-iam-role-for-service-account-eks.git/ | 1.0.1 |
| <a name="module_tempo_s3"></a> [tempo\_s3](#module\_tempo\_s3) | git::https://github.e.it.census.gov/terraform-modules/aws-s3.git//standard | tf-upgrade |

## Resources
Expand All @@ -66,7 +66,7 @@ Developer NOTE: We should automate this configuration.
| <a name="input_namespace"></a> [namespace](#input\_namespace) | The namespace into which tempo will be deployed | `string` | `"tempo"` | no |
| <a name="input_oidc_provider_arn"></a> [oidc\_provider\_arn](#input\_oidc\_provider\_arn) | The ARN in the EKS cluster for the OpenID Connect identity provider. | `string` | n/a | yes |
| <a name="input_profile"></a> [profile](#input\_profile) | AWS config profile used to upload images into ECR | `string` | `""` | no |
| <a name="input_prometheus_namespace"></a> [prometheus\_namespace](#input\_prometheus\_namespace) | Namespace where Prometheus is installed. | `string` | `"prometheus"` | no |
| <a name="input_prometheus_namespace"></a> [prometheus\_namespace](#input\_prometheus\_namespace) | Namespace where Prometheus is installed. | `string` | `"telemetry"` | no |
| <a name="input_prometheus_port"></a> [prometheus\_port](#input\_prometheus\_port) | Port number of Prometheus service, mostly either 80 or 9090 | `string` | `"80"` | no |
| <a name="input_prometheus_svc"></a> [prometheus\_svc](#input\_prometheus\_svc) | Prometheus service name. | `string` | `"prometheus-server"` | no |
| <a name="input_region"></a> [region](#input\_region) | The region holding these resources (for the s3 bucket.) | `string` | n/a | yes |
Expand Down
18 changes: 10 additions & 8 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ locals {
# IRSA Role for Tempo
################################################################################
module "tempo-irsa-role" {
# tflint-ignore: terraform_module_pinned_source
source = "git::https://github.e.it.census.gov/SCT-Engineering/tfmod-custom-iam-role-for-service-account-eks.git?ref=main"
source = "git::https://github.e.it.census.gov/SCT-Engineering/tfmod-custom-iam-role-for-service-account-eks.git/?ref=1.0.1"

role_name = format("%v%v-%v", local.prefixes["eks-role"], var.cluster_name, "tempo")
attach_s3_bucket_owner_policy = true
Expand All @@ -42,6 +41,8 @@ module "tempo-irsa-role" {
# Helm Chart for Tempo
################################################################################
resource "helm_release" "tempo" {
depends_on = [module.tempo-irsa-role, module.images, module.tempo_s3]
atomic = true
chart = "tempo"
version = var.tempo_chart_version
name = "tempo"
Expand All @@ -58,11 +59,12 @@ resource "helm_release" "tempo" {
value = "1"
},
{
name = "tempo.repository"
value = format("%v/%v",
module.images.images[local.tempo_key].dest_registry,
module.images.images[local.tempo_key].dest_repository
)
name = "tempo.registry"
value = module.images.images[local.tempo_key].dest_registry
},
{
name = "tempo.repository"
value = module.images.images[local.tempo_key].dest_repository
},
{
name = "tempo.tag"
Expand All @@ -82,7 +84,7 @@ resource "helm_release" "tempo" {
},
{
name = "tempo.metricsGenerator.remoteWriteUrl"
value = "http://${var.prometheus_svc}.${var.prometheus_namespace}:${var.prometheus_port}/api/v1/write"
value = "http://${var.prometheus_svc}.${var.prometheus_namespace}.svc.cluster.local:${var.prometheus_port}/api/v1/write"
},
{
name = "serviceAccount.annotations.eks\\.amazonaws\\.com/role-arn"
Expand Down
2 changes: 1 addition & 1 deletion tempo_values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tempo:
value: "9411"
metricsGenerator:
enabled: true
remoteWriteUrl: http://prometheus-server.prometheus:80/api/v1/write
remoteWriteUrl: "http://prometheus-server.telemetry.svc.cluster.local:80/api/v1/write"
reportingEnabled: false

serviceAccount:
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ variable "profile" {
variable "prometheus_namespace" {
description = "Namespace where Prometheus is installed."
type = string
default = "prometheus"
default = "telemetry"
}

variable "prometheus_port" {
Expand Down