Skip to content

Commit

Permalink
feat: use transpire
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-ni committed Oct 8, 2023
1 parent 8796abf commit 37a3c2a
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 50 deletions.
36 changes: 36 additions & 0 deletions .transpire.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
from pathlib import Path

from transpire.resources import Deployment, Ingress, Service
from transpire.types import Image
from transpire.utils import get_image_tag

name = "ocfstatic"


def objects():
dep = Deployment(
name="ocfstatic",
image=get_image_tag("ocfstatic"),
ports=[80],
)

svc = Service(
name="ocfstatic",
selector=dep.get_selector(),
port_on_pod=80,
port_on_svc=80,
)

ing = Ingress.from_svc(
svc=svc,
host="new.ocf.berkeley.edu",
path_prefix="/",
)

yield dep.build()
yield svc.build()
yield ing.build()


def images():
yield Image(name="ocfstatic", path=Path("/"))
50 changes: 0 additions & 50 deletions kubernetes/ocfstatic.yml.erb

This file was deleted.

0 comments on commit 37a3c2a

Please sign in to comment.