Skip to content

Commit e0a807b

Browse files
chore: cleanup blockfrost-worker
1 parent 876eb62 commit e0a807b

File tree

2 files changed

+5
-20
lines changed

2 files changed

+5
-20
lines changed

nix/cardano-services/deployments/blockfrost-worker-deployment.nix

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
config,
66
...
77
}: {
8-
templates.blockfrost-worker-deployment = lib.mkIf values.blockfrost-worker.enabled {
9-
apiVersion = "apps/v1";
10-
kind = "Deployment";
8+
resources.deployments.blockfrost-worker = lib.mkIf values.blockfrost-worker.enabled {
119
metadata = {
1210
name = "${config.name}-blockfrost-worker";
1311
labels = utils.appLabels "blockfrost-worker";
@@ -17,23 +15,14 @@
1715
template = {
1816
metadata.labels = utils.appLabels "blockfrost-worker";
1917
spec = {
20-
imagePullSecrets = [
21-
{
22-
name = "dockerconfigjson";
23-
}
24-
];
18+
imagePullSecrets.dockerconfigjson = {};
2519
containers = [
2620
{
2721
inherit (values.cardano-services) image;
2822
inherit (values.blockfrost-worker) resources;
2923
name = "blockfrost-worker";
3024
args = ["start-blockfrost-worker"];
31-
ports = [
32-
{
33-
containerPort = 3000;
34-
name = "http";
35-
}
36-
];
25+
ports.http.containerPort = 3000;
3726
livenessProbe = {
3827
timeoutSeconds = 5;
3928
httpGet = {
@@ -86,12 +75,7 @@
8675
];
8776
}
8877
];
89-
volumes = [
90-
{
91-
name = "tls";
92-
secret.secretName = "postgresql-server-cert";
93-
}
94-
];
78+
volumes.tls.secret.secretName = "postgresql-server-cert";
9579
};
9680
};
9781
};

nix/cardano-services/deployments/provider.resource.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ in {
7272
labels = utils.appLabels name;
7373
};
7474
spec = {
75+
replicas = lib.mkIf (value.replicas != 1) value.replicas;
7576
selector.matchLabels = utils.appLabels name;
7677
template = {
7778
metadata.labels = utils.appLabels name;

0 commit comments

Comments
 (0)