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

chore: Move proxy out of feature #14

Merged
merged 1 commit into from
Feb 19, 2024
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
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.
Loading