-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-ipfs.jsonnet
48 lines (45 loc) · 1.12 KB
/
docker-ipfs.jsonnet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
local kube = import "kube.libsonnet";
local utils = import "utils.libsonnet";
{
namespace:: {
metadata+: {namespace: "ipfs"},
},
svc: kube.Service("registry") + $.namespace {
target_pod: $.registry.spec.template,
spec+: {
type: "NodePort",
ports: [{
name: "registry",
targetPort: "registry",
port: 5000,
nodePort: 30508,
}],
},
},
registry: kube.Deployment("registry") + $.namespace {
spec+: {
template+: {
spec+: {
nodeSelector+: utils.archSelector("amd64"),
containers_+: {
registry: kube.Container("registry") {
image: "anguslees/ipdr:latest", // renovate
command: ["ipdr", "server"],
args_+: {
// Unsupported - despite docs
//"ipfs-gateway": "http://api.ipfs:5001/",
},
ports_+: {
registry: {containerPort: 5000, protocol: "TCP"},
},
readinessProbe: {
httpGet: {path: "/health", port: 5000},
},
livenessProbe: self.readinessProbe,
},
},
},
},
},
},
}