Hi HashiCorp community !
I need some heads-up with Nomad ingress-gateway. So i have the following:
- edge-proxy job:
job “edge-proxy” {
datacenters = [“local”]
namespace = “default”
group “ingress-gateway” {
network {
mode = “host”
port “inbound-http” {
static = 8081
to = 8081
}
}
service {
name = “ingress-gateway”
port = “8081”
connect {
gateway {
proxy {}
ingress {
listener {
port = 8081
protocol = “tcp”
service {
name = “grafana”
}
}
}
}
}
}
}
}
- Grafana job
job “grafana” {
datacenters = [“local”]
namespace = “default”
constraint {
attribute = “${node.class}”
operator = “=”
value = “generic”
}
group “grafana” {
network {
mode = "bridge"
port "grafana" {
to = "3000"
}
}
volume "grafana-vol" {
type = "csi"
attachment_mode = "file-system"
access_mode = "single-node-writer"
read_only = false
source = "grafana-vol"
}
service {
name = "grafana"
port = "grafana"
tags = ["envoy-http"]
meta {
url = "grafana.soleks.com"
}
connect {
sidecar_service {
proxy {
upstreams {
destination_name = "mysql"
local_bind_port = 3306
}
upstreams {
destination_name = "prometheus"
local_bind_port = 9090
}
}
}
}
}
task "grafana" {
driver = "docker"
vault {
policies = ["nomad_soleks_infra_ro"]
}
template {
data = file("./templates/grafana.ini")
destination = "alloc/grafana.ini"
}
volume_mount {
volume = "grafana-vol"
destination = "/var/lib/grafana-vol"
read_only = false
}
config {
image = "grafana/grafana-oss:9.2.2-ubuntu"
ports = ["grafana"]
volumes = [
"alloc/grafana.ini:/etc/grafana/grafana.ini"
]
}
resources {
memory = 1024
cpu = 1000
}
}
}
}
Everything works ok, services are registered with consul, i created intentions, but can’t get final result, connecting to host there edge-proxy is running, port 8081 im expecting to get grafana login screen, but it’s not happening. And i can’t find where im wrong.
Help is more then welcome.