fix: Everything.
This commit is contained in:
+7
-14
@@ -4,9 +4,12 @@ metadata:
|
|||||||
name: tasks
|
name: tasks
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: flush
|
- name: connect
|
||||||
image: git.nyeki.dev/payphone/payphone-tasks:latest
|
image: git.nyeki.dev/payphone/payphone-tasks:latest
|
||||||
command: ["uv", "run", "--no-dev", "tasks.py", "flush"]
|
command: ["uv", "run", "--no-dev", "tasks.py", "connect"]
|
||||||
|
envFrom:
|
||||||
|
- secretRef:
|
||||||
|
name: bot-secrets
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
memory: "250Mi"
|
memory: "250Mi"
|
||||||
@@ -14,19 +17,9 @@ spec:
|
|||||||
limits:
|
limits:
|
||||||
memory: "1Gi"
|
memory: "1Gi"
|
||||||
cpu: "1"
|
cpu: "1"
|
||||||
- name: delete-accounts
|
- name: expire
|
||||||
image: git.nyeki.dev/payphone/payphone-tasks:latest
|
image: git.nyeki.dev/payphone/payphone-tasks:latest
|
||||||
command: ["uv", "run", "--no-dev", "tasks.py", "delete-accounts"]
|
command: ["uv", "run", "--no-dev", "tasks.py", "expire"]
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
memory: "250Mi"
|
|
||||||
cpu: "100m"
|
|
||||||
limits:
|
|
||||||
memory: "1Gi"
|
|
||||||
cpu: "1"
|
|
||||||
- name: hangup-inactive-calls
|
|
||||||
image: git.nyeki.dev/payphone/payphone-tasks:latest
|
|
||||||
command: ["uv", "run", "--no-dev", "tasks.py", "hangup-inactive-calls"]
|
|
||||||
envFrom:
|
envFrom:
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: bot-secrets
|
name: bot-secrets
|
||||||
|
|||||||
+5
-6
@@ -31,17 +31,16 @@ for tag in tags:
|
|||||||
if version > latest_version:
|
if version > latest_version:
|
||||||
latest_version = version
|
latest_version = version
|
||||||
|
|
||||||
print(f"Updating to tag v{version}...")
|
print(f"Updating to tag v{latest_version}...")
|
||||||
|
|
||||||
os.system(f"git pull https://{username}:{password}@git.nyeki.dev/payphone/payphone")
|
os.system(f"git pull https://{username}:{password}@git.nyeki.dev/payphone/payphone")
|
||||||
os.system(
|
os.system(
|
||||||
f"microk8s kubectl set image sts/bot bot=git.nyeki.dev/payphone/payphone-shard:v{version}"
|
f"microk8s kubectl set image sts/bot bot=git.nyeki.dev/payphone/payphone-shard:v{latest_version}"
|
||||||
)
|
)
|
||||||
os.system(
|
os.system(
|
||||||
f"""
|
f"""
|
||||||
microk8s kubectl set image deploy/tasks \
|
microk8s kubectl set image pod/tasks \
|
||||||
flush=git.nyeki.dev/payphone/payphone-shard:v{version} \
|
connect=git.nyeki.dev/payphone/payphone-shard:v{latest_version} \
|
||||||
delete-accounts=git.nyeki.dev/payphone/payphone-shard:v{version} \
|
expire=git.nyeki.dev/payphone/payphone-shard:v{latest_version} \
|
||||||
hangup-inactive-calls=git.nyeki.dev/payphone/payphone-shard:v{version}
|
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user