aboutsummaryrefslogtreecommitdiffstats
path: root/arthur/exts/kubernetes/pods.py
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2024-03-31 21:33:47 +0100
committerGravatar Joe Banks <[email protected]>2024-03-31 21:33:47 +0100
commit48401347d692cc507e4441cd3c0607d51c072d20 (patch)
tree3111ece071bc4232c1bb32a9ce6bc9a0d153ecda /arthur/exts/kubernetes/pods.py
parentTruncate messages that hit the message length limit (diff)
limit pod logs command to dev-ops channel
Diffstat (limited to 'arthur/exts/kubernetes/pods.py')
-rw-r--r--arthur/exts/kubernetes/pods.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/arthur/exts/kubernetes/pods.py b/arthur/exts/kubernetes/pods.py
index cbf164a..0a82fb9 100644
--- a/arthur/exts/kubernetes/pods.py
+++ b/arthur/exts/kubernetes/pods.py
@@ -11,6 +11,7 @@ from tabulate import tabulate
from arthur.apis.kubernetes import pods
from arthur.bot import KingArthur
+from arthur.config import CONFIG
from arthur.utils import generate_error_message
MAX_MESSAGE_LENGTH = 2000
@@ -97,6 +98,7 @@ class Pods(commands.Cog):
return None
@pods_cmd.command(name="logs", aliases=["log", "tail"])
+ @commands.check(lambda ctx: ctx.channel.id == CONFIG.devops_channel_id)
async def pods_logs(
self, ctx: commands.Context, pod_name: str, namespace: str = "default", lines: int = 15
) -> None: