robusta-dev / kubernetes-chatgpt-bot

A ChatGPT bot for Kubernetes issues.
923 stars 103 forks source link

ChatGPT works in one sink and it doesn't work in another #26

Open Bobses opened 4 months ago

Bobses commented 4 months ago

I set up the second Slack channel (pd-alerts), where are sent only alerts from the apps namespace. I receive the alerts from the desired namespace there, but the AskChatGPT button doesn't work (nothing happens). At the same time, in the main sink (the first Slack channel), I can use ChatGPT. This behavior is strange: ChatGPT works in one sink and it doesn't work in another.

This is my configuration:

sinksConfig:
- slack_sink:
    name: main_slack_sink
    slack_channel: robusta-test
    api_key: rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
- slack_sink:
    name: pd_slack_sink
    slack_channel: pd-alerts
    api_key: rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr    
    scope:
      include:
        - namespace: apps
Bobses commented 4 months ago

The issue was solved by @arikalon1 - the second sink has a scope, but the ChatGPT output doesn’t contain the namespace apps so it’s excluded.

The proper configuration for the second sink is:

scope:
  include:
    - namespace: apps
    - identifier: "ChatGPT Wisdom"

Everything works fine now.

Thank you!