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

Commit d17a7a6

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent ae11004 commit d17a7a6

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ jobs:
1111
with:
1212
module_name: ircbot
1313
secrets:
14-
TRANSPIRE_CI_PAT: ${{ secrets.TRANSPIRE_CI_PAT }}
14+
TRANSPIRE_CI_PAT: ${{ secrets.TRANSPIRE_CI_PAT }}

.transpire.py

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,46 @@
11
from pathlib import Path
22

3-
from transpire.resources import Deployment, Ingress, Secret, Service
3+
from transpire.resources import Deployment
4+
from transpire.resources import Ingress
5+
from transpire.resources import Secret
6+
from transpire.resources import Service
47
from transpire.types import Image
5-
from transpire.utils import get_image_tag, get_revision
8+
from transpire.utils import get_image_tag
9+
from transpire.utils import get_revision
610

7-
name = "ircbot"
11+
name = 'ircbot'
812
auto_sync = True
913

14+
1015
def dep_patches(dep):
11-
dep.obj.spec.template.spec.dns_policy = "ClusterFirst"
12-
dep.obj.spec.template.spec.dns_config = {"searches": ["ocf.berkeley.edu"]}
16+
dep.obj.spec.template.spec.dns_policy = 'ClusterFirst'
17+
dep.obj.spec.template.spec.dns_config = {'searches': ['ocf.berkeley.edu']}
1318

1419
dep.obj.spec.template.spec.volumes = [
15-
{"name": "config", "secret": {"secretName": "ircbot"}},
20+
{'name': 'config', 'secret': {'secretName': 'ircbot'}},
1621
]
1722

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

2227

2328
def images():
24-
yield Image(name="ircbot", path=Path("/"))
29+
yield Image(name='ircbot', path=Path('/'))
2530

2631

2732
def objects():
2833
secret = Secret(
29-
name="ircbot",
34+
name='ircbot',
3035
string_data={
31-
"ocf-ircbot.conf": "",
36+
'ocf-ircbot.conf': '',
3237
},
3338
)
3439
yield secret.build()
3540

3641
dep_bot = Deployment(
3742
name=name,
38-
image=get_image_tag("ircbot"),
43+
image=get_image_tag('ircbot'),
3944
ports=[8888],
4045
)
4146
# TODO: Switch this to .patch() API.
@@ -52,7 +57,7 @@ def objects():
5257

5358
ing_bot = Ingress.from_svc(
5459
svc=svc_bot,
55-
host="ircbot.ocf.berkeley.edu",
56-
path_prefix="/",
60+
host='ircbot.ocf.berkeley.edu',
61+
path_prefix='/',
5762
)
58-
yield ing_bot.build()
63+
yield ing_bot.build()

0 commit comments

Comments
 (0)