Skip to content

Commit

Permalink
ci: disable tracing in testflight (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
krtk6160 authored Dec 14, 2022
1 parent 3f1c729 commit d8d5c33
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
2 changes: 2 additions & 0 deletions ci/gcp.lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ KUBE_CA_CERT: #@ data.values.concourse_tf_kube_ca_cert
KUBE_TOKEN: #@ data.values.concourse_tf_kube_token
TF_VAR_gcp_project: galoy-infra-testflight
TF_VAR_enable_services: false
TF_VAR_enable_tracing: false

BRANCH: #@ data.values.git_branch
#@ end

Expand Down
5 changes: 5 additions & 0 deletions examples/gcp/services/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ variable "letsencrypt_issuer_email" {
default = "[email protected]"
}

variable "enable_tracing" {
default = "true"
}

data "google_client_config" "default" {
provider = google-beta
}
Expand Down Expand Up @@ -36,4 +40,5 @@ module "services" {
cluster_endpoint = var.cluster_endpoint
cluster_ca_cert = var.cluster_ca_cert
small_footprint = true
enable_tracing = var.enable_tracing
}
2 changes: 1 addition & 1 deletion modules/services/ingress-values.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ controller:
default: true
watchIngressWithoutClass: true
config:
enable-opentracing: "true"
enable-opentracing: ${enable_tracing}
jaeger-service-name: ${service_name}
jaeger-collector-host: ${jaeger_host}
jaeger-propagation-format: "w3c"
Expand Down
7 changes: 4 additions & 3 deletions modules/services/ingress.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ resource "helm_release" "ingress_nginx" {

values = [
templatefile("${path.module}/ingress-values.yml.tmpl", {
service_type = local.local_deploy ? "NodePort" : "LoadBalancer"
jaeger_host = local.jaeger_host
service_name = local.ingress_service_name
service_type = local.local_deploy ? "NodePort" : "LoadBalancer"
jaeger_host = local.jaeger_host
service_name = local.ingress_service_name
enable_tracing = local.enable_tracing
})
]
}
Expand Down
2 changes: 2 additions & 0 deletions modules/services/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ variable "letsencrypt_issuer_email" {}
variable "local_deploy" { default = false }
variable "small_footprint" { default = false }
variable "smoketest_cronjob" { default = false }
variable "enable_tracing" { default = "true" }

locals {
local_deploy = var.local_deploy
Expand All @@ -39,6 +40,7 @@ locals {
jaeger_host = "opentelemetry-collector.${local.otel_namespace}.svc.cluster.local"
ingress_service_name = "${var.name_prefix}-ingress"
small_footprint = var.small_footprint
enable_tracing = var.enable_tracing
}

output "smoketest_kubeconfig" {
Expand Down

0 comments on commit d8d5c33

Please sign in to comment.