Skip to content

Commit 7e8c066

Browse files
committed
Merge branch 'main' of github.com:demeter-run/ext-cardano-ogmios
2 parents 7b25d29 + 867172e commit 7e8c066

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

operator/yaml/crd.yaml

+10-7
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ metadata:
55
spec:
66
group: demeter.run
77
names:
8-
categories: []
8+
categories:
9+
- demeter-port
910
kind: OgmiosPort
1011
plural: ogmiosports
11-
shortNames: []
12+
shortNames:
13+
- opt
1214
singular: ogmiosport
1315
scope: Namespaced
1416
versions:
@@ -28,6 +30,9 @@ spec:
2830
- jsonPath: .status.authToken
2931
name: Auth Token
3032
type: string
33+
- jsonPath: .spec.throughputTier
34+
name: Throughput Tier
35+
type: string
3136
name: v1alpha1
3237
schema:
3338
openAPIV3Schema:
@@ -36,18 +41,16 @@ spec:
3641
spec:
3742
properties:
3843
network:
39-
enum:
40-
- mainnet
41-
- preprod
42-
- preview
43-
- sanchonet
44+
type: string
45+
throughputTier:
4446
type: string
4547
version:
4648
format: uint8
4749
minimum: 0.0
4850
type: integer
4951
required:
5052
- network
53+
- throughputTier
5154
- version
5255
type: object
5356
status:

operator/yaml/port.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ metadata:
1111
spec:
1212
network: "mainnet"
1313
version: 1
14-
14+
throughputTier: "0"

proxy/src/config.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ pub struct Config {
88
pub proxy_tiers_poll_interval: Duration,
99
pub prometheus_addr: String,
1010
pub ogmios_port: u16,
11+
pub ogmios_dns: String,
1112
pub ssl_crt_path: PathBuf,
1213
pub ssl_key_path: PathBuf,
1314
}
@@ -39,6 +40,7 @@ impl Config {
3940
.expect("OGMIOS_PORT must be set")
4041
.parse()
4142
.expect("OGMIOS_PORT must a number"),
43+
ogmios_dns: env::var("OGMIOS_DNS").expect("OGMIOS_DNS must be set"),
4244
}
4345
}
4446
}

proxy/src/proxy.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,11 @@ impl ProxyRequest {
281281
let network = captures.get(2)?.as_str().to_string();
282282
let version = captures.get(3)?.as_str().to_string();
283283

284-
let instance = format!("ogmios-{network}-{version}:{}", state.config.ogmios_port);
284+
let instance = format!(
285+
"ogmios-{network}-{version}.{}:{}",
286+
state.config.ogmios_dns, state.config.ogmios_port
287+
);
288+
285289
let namespace = state.config.proxy_namespace.clone();
286290

287291
let protocol = get_header(hyper_req, UPGRADE.as_str())

0 commit comments

Comments
 (0)