-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.transpire.py
47 lines (36 loc) · 916 Bytes
/
.transpire.py
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
from pathlib import Path
from transpire.resources import Deployment, Ingress, Service, Secret
from transpire.types import Image
from transpire.utils import get_image_tag
name = "ocfdocs"
def objects():
dep = Deployment(
name=name,
image=get_image_tag("ocfdocs"),
ports=[15000],
)
svc = Service(
name=name,
selector=dep.get_selector(),
port_on_pod=15000,
port_on_svc=80,
)
ing = Ingress.from_svc(
svc=svc,
# TODO: Define domain name
host="mkdocs.ocf.berkeley.edu",
path_prefix="/",
)
# TODO: Secrets
sec = Secret(
name=name,
string_data={
"OUTLINE_API_KEY": "",
},
)
yield dep.build()
yield svc.build()
yield ing.build()
yield sec.build()
def images():
yield Image(name="ocfdocs", path=Path("/"), registry="ghcr")