Skip to content

Commit

Permalink
fix(utxorpc): update utxorpc module to upstream
Browse files Browse the repository at this point in the history
Signed-off-by: Ales Verbic <[email protected]>
  • Loading branch information
verbotenj committed Feb 23, 2025
1 parent e7ac1a0 commit 5a75e6d
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 77 deletions.
27 changes: 13 additions & 14 deletions stage3/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions stage3/env.auto.tfvars.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,11 @@
# enable_cardano_ogmios = false
# enable_cardano_kupo = false
# enable_cardano_utxorpc = false
# kupo_proxy_blue_extra_annotations = {
# "external-dns.alpha.kubernetes.io/cloudflare-proxied" = "true"
# "external-dns.alpha.kubernetes.io/hostname" = "proxy-blue.kupo.dmtr.host"
# }
# kupo_proxy_green_extra_annotations = {
# "external-dns.alpha.kubernetes.io/cloudflare-proxied" = "true"
# "external-dns.alpha.kubernetes.io/hostname" = "proxy-green.kupo.dmtr.host"
# }
23 changes: 13 additions & 10 deletions stage3/kupo.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ module "ext_cardano_kupo_crds" {
}

module "ext_cardano_kupo" {
source = "git::https://github.com/demeter-run/ext-cardano-kupo.git//bootstrap"
# source = "git::https://github.com/demeter-run/ext-cardano-kupo.git//bootstrap"
source = "git::https://github.com/blinklabs-io/demeter-ext-cardano-kupo.git//bootstrap?ref=feat/add-extra-annotations"
for_each = toset([for n in toset(["v1"]) : n if var.enable_cardano_kupo])
namespace = "ftr-kupo-${each.key}"
cloud_provider = var.cloud_provider
Expand All @@ -52,15 +53,17 @@ module "ext_cardano_kupo" {
# per_min_dcus = local.kupo_v1_per_min_dcus
# per_request_dcus = local.kupo_v1_per_request_dcus
# track_dcu_usage = local.kupo_v1_track_dcu_usage
api_key_salt = local.kupo_v1_api_key_salt
ingress_class = local.kupo_v1_ingress_class
extension_subdomain = local.kupo_v1_extension_subdomain
dns_zone = local.kupo_v1_dns_zone
proxy_green_image_tag = local.kupo_v1_proxy_green_image_tag
proxy_green_replicas = local.kupo_v1_proxy_green_replicas
proxy_blue_image_tag = local.kupo_v1_proxy_blue_image_tag
proxy_blue_replicas = local.kupo_v1_proxy_blue_replicas
proxy_resources = local.kupo_v1_proxy_resources
api_key_salt = local.kupo_v1_api_key_salt
ingress_class = local.kupo_v1_ingress_class
extension_subdomain = local.kupo_v1_extension_subdomain
dns_zone = local.kupo_v1_dns_zone
proxy_green_extra_annotations = var.kupo_proxy_green_extra_annotations
proxy_green_image_tag = local.kupo_v1_proxy_green_image_tag
proxy_green_replicas = local.kupo_v1_proxy_green_replicas
proxy_blue_extra_annotations = var.kupo_proxy_blue_extra_annotations
proxy_blue_image_tag = local.kupo_v1_proxy_blue_image_tag
proxy_blue_replicas = local.kupo_v1_proxy_blue_replicas
proxy_resources = local.kupo_v1_proxy_resources
cells = {
"cell1" = {
pvc = {
Expand Down
69 changes: 16 additions & 53 deletions stage3/utxorpc.tf
Original file line number Diff line number Diff line change
@@ -1,39 +1,15 @@
locals {
// Defaults for UtxoRPC
utxorpc_defaults = {
namespace = "ext-utxorpc-m0"
dns_zone = "dmtr.host"
operator_image_tag = "0ecf1644a0554d3c34f4256b6765c80a02986e15"
networks = ["cardano-mainnet", "cardano-preprod", "cardano-preview"]
cloudflared_image_tag = "latest"
cloudflared_replicas = 0
cloudflared_resources = {
limits = {
cpu = "2"
memory = "500Mi"
}
requests = {
cpu = "50m"
memory = "500Mi"
}
namespace = "ext-utxorpc-m0"
dns_zone = "dmtr.host"
operator_image_tag = "0ecf1644a0554d3c34f4256b6765c80a02986e15"
networks = ["cardano-mainnet", "cardano-preprod", "cardano-preview"]
extension_url_per_network = {
"cardano-mainnet" = "utxorpc-m0.demeter.run"
"cardano-preprod" = "utxorpc-preprod.demeter.run"
"cardano-preview" = "utxorpc-preview.demeter.run"
}
cloudflared_tolerations = [
{
effect = "NoSchedule"
key = "demeter.run/compute-profile"
operator = "Exists"
},
{
effect = "NoSchedule"
key = "demeter.run/compute-arch"
operator = "Exists"
},
{
effect = "NoSchedule"
key = "demeter.run/availability-sla"
operator = "Exists"
}
]
proxies_image_tag = "7941eec9a681ace6fdaeb7e18d9fb2b26d3cfae3"
proxies_replicas = 1
proxies_resources = {
Expand Down Expand Up @@ -64,12 +40,9 @@ locals {
operator = "Exists"
}
]
cloudflared_tunnel_id = "default-tunnel-id"
cloudflared_tunnel_secret = "default-tunnel-secret"
cloudflared_account_tag = "default-account-tag"
dolos_version = "sha-e0f42cf"
extension_subdomain = "utxorpc"
api_key_salt = "this is a random generated key and must be shared..."
dolos_version = "sha-e0f42cf"
extension_subdomain = "utxorpc"
api_key_salt = "this is a random generated key and must be shared..."
}
}

Expand All @@ -82,28 +55,18 @@ module "ext_cardano_utxorpc" {
source = "git::https://github.com/demeter-run/ext-cardano-utxorpc//bootstrap/"
for_each = toset([for n in toset(["v1"]) : n if var.enable_cardano_utxorpc])

operator_image_tag = local.utxorpc_defaults.operator_image_tag
extension_subdomain = local.utxorpc_defaults.extension_subdomain
dns_zone = local.utxorpc_defaults.dns_zone
api_key_salt = local.utxorpc_defaults.api_key_salt
namespace = local.utxorpc_defaults.namespace
networks = local.utxorpc_defaults.networks
operator_image_tag = local.utxorpc_defaults.operator_image_tag
extension_url_per_network = local.utxorpc_defaults.extension_url_per_network
api_key_salt = local.utxorpc_defaults.api_key_salt
namespace = local.utxorpc_defaults.namespace
networks = local.utxorpc_defaults.networks

network_addresses = {
# "cardano-mainnet" : "relay.utxorpc-m0.demeter.run:3000"
# "cardano-preprod" : "relay.utxorpc-m0.demeter.run:3001"
# "cardano-preview" : "relay.utxorpc-m0.demeter.run:3002"
}

// Cloudflared
cloudflared_tunnel_id = local.utxorpc_defaults.cloudflared_tunnel_id
cloudflared_tunnel_secret = local.utxorpc_defaults.cloudflared_tunnel_secret
cloudflared_account_tag = local.utxorpc_defaults.cloudflared_account_tag
cloudflared_image_tag = local.utxorpc_defaults.cloudflared_image_tag
cloudflared_replicas = local.utxorpc_defaults.cloudflared_replicas
cloudflared_resources = local.utxorpc_defaults.cloudflared_resources
cloudflared_tolerations = local.utxorpc_defaults.cloudflared_tolerations

// Proxies
proxies_image_tag = local.utxorpc_defaults.proxies_image_tag
proxies_replicas = local.utxorpc_defaults.proxies_replicas
Expand Down
12 changes: 12 additions & 0 deletions stage3/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,18 @@ variable "enable_cardano_kupo" {
default = false
}

variable "kupo_proxy_blue_extra_annotations" {
description = "Extra annotations for the proxy blue service"
type = map(string)
default = {}
}

variable "kupo_proxy_green_extra_annotations" {
description = "Extra annotations for the proxy green service"
type = map(string)
default = {}
}

variable "kupo_v1_api_key_salt" {
description = "shared salt used for generating API keys"
default = ""
Expand Down

0 comments on commit 5a75e6d

Please sign in to comment.