Skip to content

Commit

Permalink
chore: Move proxy out of feature
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzalezzfelipe committed Feb 19, 2024
1 parent 438586a commit ac58fd3
Show file tree
Hide file tree
Showing 9 changed files with 77 additions and 84 deletions.
68 changes: 68 additions & 0 deletions bootstrap/feature/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,71 @@
locals {
operator_name = "operator"
operator_role = "operator"
operator_port = 9817
operator_addr = "0.0.0.0:${local.operator_port}"
}

variable "namespace" {
type = string
}

variable "image" {
type = string
}

variable "dns_zone" {
type = string
default = "demeter.run"
}

variable "ingress_class" {
type = string
default = "ogmios-v1"
}

variable "api_key_salt" {
type = string
default = "ogmios-salt"
}

variable "dcu_per_frame" {
type = map(string)
default = {
"mainnet" = "10"
"preprod" = "5"
"preview" = "5"
}
}

variable "metrics_delay" {
type = number
default = 30
}

variable "prometheus_url" {
type = string
default = "http://prometheus-operated.demeter-system.svc.cluster.local:9090/api/v1"
}

variable "resources" {
type = object({
limits = object({
cpu = string
memory = string
})
requests = object({
cpu = string
memory = string
})
})
default = {
limits : {
cpu : "50m",
memory : "250Mi"
}
requests : {
cpu : "50m",
memory : "250Mi"
}
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,25 @@ resource "kubernetes_deployment_v1" "ogmios_operator" {
wait_for_rollout = false

metadata {
name = local.name
name = local.operator_name
namespace = var.namespace
labels = {
role = local.role
role = local.operator_role
}
}
spec {
replicas = var.replicas
replicas = 1

selector {
match_labels = {
role = local.role
role = local.operator_role
}
}
template {
metadata {
name = local.name
name = local.operator_name
labels = {
role = local.role
role = local.operator_role
}
}
spec {
Expand Down
76 changes: 0 additions & 76 deletions bootstrap/feature/operator/main.tf

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
resource "kubernetes_service_v1" "operator_service" {
metadata {
name = local.name
name = local.operator_name
namespace = var.namespace
}

spec {
selector = {
role = local.role
role = local.operator_role
}

port {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit ac58fd3

Please sign in to comment.