Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 3, 2024
1 parent 4d7cf86 commit c8ff715
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
with:
module_name: ircbot
secrets:
TRANSPIRE_CI_PAT: ${{ secrets.TRANSPIRE_CI_PAT }}
TRANSPIRE_CI_PAT: ${{ secrets.TRANSPIRE_CI_PAT }}
33 changes: 19 additions & 14 deletions .transpire.py
Original file line number Diff line number Diff line change
@@ -1,41 +1,46 @@
from pathlib import Path

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

name = "ircbot"
name = 'ircbot'
auto_sync = True


def dep_patches(dep):
dep.obj.spec.template.spec.dns_policy = "ClusterFirst"
dep.obj.spec.template.spec.dns_config = {"searches": ["ocf.berkeley.edu"]}
dep.obj.spec.template.spec.dns_policy = 'ClusterFirst'
dep.obj.spec.template.spec.dns_config = {'searches': ['ocf.berkeley.edu']}

dep.obj.spec.template.spec.volumes = [
{"name": "config", "secret": {"secretName": "ircbot"}},
{'name': 'config', 'secret': {'secretName': 'ircbot'}},
]

dep.obj.spec.template.spec.containers[0].volume_mounts = [
{"name": "config", "mountPath": "/etc/ocf-ircbot"},
{'name': 'config', 'mountPath': '/etc/ocf-ircbot'},
]


def images():
yield Image(name="ircbot", path=Path("/"))
yield Image(name='ircbot', path=Path('/'))


def objects():
secret = Secret(
name="ircbot",
name='ircbot',
string_data={
"ocf-ircbot.conf": "",
'ocf-ircbot.conf': '',
},
)
yield secret.build()

dep_bot = Deployment(
name=name,
image=get_image_tag("ircbot"),
image=get_image_tag('ircbot'),
ports=[8888],
)
# TODO: Switch this to .patch() API.
Expand All @@ -52,7 +57,7 @@ def objects():

ing_bot = Ingress.from_svc(
svc=svc_bot,
host="ircbot.ocf.berkeley.edu",
path_prefix="/",
host='ircbot.ocf.berkeley.edu',
path_prefix='/',
)
yield ing_bot.build()
yield ing_bot.build()

0 comments on commit c8ff715

Please sign in to comment.