botkube/comm_config.yaml

61 lines
3.0 KiB
YAML
Raw Normal View History

# Channels configuration
communications:
# Settings for Slack
slack:
enabled: false
channel: 'SLACK_CHANNEL'
token: 'SLACK_API_TOKEN'
Add Discord support (#268) #### ISSUE TYPE <!--- Pick one below and delete the rest: --> - Feature Pull Request ##### SUMMARY <!--- Describe the change, including rationale and design decisions --> **Add support for Discord:** This PR, - adds discord bot - adds discord notifier - adds required discord configurations into comm_config.yaml - adds discordgo module into go.mod - adds discord configs into all yaml files <!--- If you are fixing an existing issue, please include "Fixes #nnn" in your PR comment; and describe briefly what the change does. --> <!--- Please list dependencies added with your change also --> Fixes #97 ### Steps For Creation and Integration: 1. Reach https://discordapp.com/developers/applications 2. Create New Application named Botkube and add a bot named **Botkube** into the Application 3. Copy the Application **CLIENT ID** and place it under _Dischord.botid_ in comm-config.yaml 4. Copy Bot **TOKEN** and place it under _Dischord.token_ in comm-config.yaml 5. Generate the URL with suitable permissions using the OAuth2 URL Generator available under OAuth2 section to the add bot to your Discord server ``` https://discordapp.com/oauth2/authorize?&client_id=<YOUR_CLIENT_ID>&scope=bot&permissions=<SET_OF_PERMISSIONS> ``` 6. Paste the generated URL in a new tab, select the discord sever to which you want to add the bot and Authorise Bot addition. 7. Create a new channel and/or copy the **CHANNEL ID** of an existing one that you want to use and place it under _Dischord.channel_ ```yaml # Settings for Discord discord: enabled: true token: 'DISCORD_TOKEN' # BotKube Bot Token botid: 'DISCORD_BOT_ID' # BotKube Application Client ID channel: 'DISCORD_CHANNEL_ID' # Discord Channel id for receiving BotKube alerts notiftype: short # Change notification type short/long you want to receive. notiftype is optional and Default notification type is short (if not specified) ``` #### Note: Follow the first 4 mins of this [Video Tutorial](https://youtu.be/8o25pRbXdFw) to understand the process visually. ### Preview: ![ping](https://user-images.githubusercontent.com/30741615/80600577-3931cf00-8a4a-11ea-9215-a725a0b17256.png) ![pod-create-short](https://user-images.githubusercontent.com/30741615/80600638-55357080-8a4a-11ea-976f-b91e823c93bd.png) ![pod-error-long](https://user-images.githubusercontent.com/30741615/80600803-8dd54a00-8a4a-11ea-90e4-a205e93aba5f.png) ![file-attachment](https://user-images.githubusercontent.com/30741615/80600724-75fdc600-8a4a-11ea-9b10-1b5ac0e79548.png)
2020-10-06 04:37:49 +00:00
notiftype: short # Change notification type short/long you want to receive. notiftype is optional and Default notification type is short (if not specified)
# Settings for Mattermost
mattermost:
enabled: false
Add Discord support (#268) #### ISSUE TYPE <!--- Pick one below and delete the rest: --> - Feature Pull Request ##### SUMMARY <!--- Describe the change, including rationale and design decisions --> **Add support for Discord:** This PR, - adds discord bot - adds discord notifier - adds required discord configurations into comm_config.yaml - adds discordgo module into go.mod - adds discord configs into all yaml files <!--- If you are fixing an existing issue, please include "Fixes #nnn" in your PR comment; and describe briefly what the change does. --> <!--- Please list dependencies added with your change also --> Fixes #97 ### Steps For Creation and Integration: 1. Reach https://discordapp.com/developers/applications 2. Create New Application named Botkube and add a bot named **Botkube** into the Application 3. Copy the Application **CLIENT ID** and place it under _Dischord.botid_ in comm-config.yaml 4. Copy Bot **TOKEN** and place it under _Dischord.token_ in comm-config.yaml 5. Generate the URL with suitable permissions using the OAuth2 URL Generator available under OAuth2 section to the add bot to your Discord server ``` https://discordapp.com/oauth2/authorize?&client_id=<YOUR_CLIENT_ID>&scope=bot&permissions=<SET_OF_PERMISSIONS> ``` 6. Paste the generated URL in a new tab, select the discord sever to which you want to add the bot and Authorise Bot addition. 7. Create a new channel and/or copy the **CHANNEL ID** of an existing one that you want to use and place it under _Dischord.channel_ ```yaml # Settings for Discord discord: enabled: true token: 'DISCORD_TOKEN' # BotKube Bot Token botid: 'DISCORD_BOT_ID' # BotKube Application Client ID channel: 'DISCORD_CHANNEL_ID' # Discord Channel id for receiving BotKube alerts notiftype: short # Change notification type short/long you want to receive. notiftype is optional and Default notification type is short (if not specified) ``` #### Note: Follow the first 4 mins of this [Video Tutorial](https://youtu.be/8o25pRbXdFw) to understand the process visually. ### Preview: ![ping](https://user-images.githubusercontent.com/30741615/80600577-3931cf00-8a4a-11ea-9215-a725a0b17256.png) ![pod-create-short](https://user-images.githubusercontent.com/30741615/80600638-55357080-8a4a-11ea-976f-b91e823c93bd.png) ![pod-error-long](https://user-images.githubusercontent.com/30741615/80600803-8dd54a00-8a4a-11ea-90e4-a205e93aba5f.png) ![file-attachment](https://user-images.githubusercontent.com/30741615/80600724-75fdc600-8a4a-11ea-9b10-1b5ac0e79548.png)
2020-10-06 04:37:49 +00:00
url: 'MATTERMOST_SERVER_URL' # URL where Mattermost is running. e.g https://example.com:9243
token: 'MATTERMOST_TOKEN' # Personal Access token generated by BotKube user
team: 'MATTERMOST_TEAM' # Mattermost Team to configure with BotKube
channel: 'MATTERMOST_CHANNEL' # Mattermost Channel for receiving BotKube alerts
notiftype: short # Change notification type short/long you want to receive. notiftype is optional and Default notification type is short (if not specified)
# Settings for MS Teams
teams:
enabled: false
appID: 'APPLICATION_ID'
appPassword: 'APPLICATION_PASSWORD'
notiftype: short
port: 3978
Add Discord support (#268) #### ISSUE TYPE <!--- Pick one below and delete the rest: --> - Feature Pull Request ##### SUMMARY <!--- Describe the change, including rationale and design decisions --> **Add support for Discord:** This PR, - adds discord bot - adds discord notifier - adds required discord configurations into comm_config.yaml - adds discordgo module into go.mod - adds discord configs into all yaml files <!--- If you are fixing an existing issue, please include "Fixes #nnn" in your PR comment; and describe briefly what the change does. --> <!--- Please list dependencies added with your change also --> Fixes #97 ### Steps For Creation and Integration: 1. Reach https://discordapp.com/developers/applications 2. Create New Application named Botkube and add a bot named **Botkube** into the Application 3. Copy the Application **CLIENT ID** and place it under _Dischord.botid_ in comm-config.yaml 4. Copy Bot **TOKEN** and place it under _Dischord.token_ in comm-config.yaml 5. Generate the URL with suitable permissions using the OAuth2 URL Generator available under OAuth2 section to the add bot to your Discord server ``` https://discordapp.com/oauth2/authorize?&client_id=<YOUR_CLIENT_ID>&scope=bot&permissions=<SET_OF_PERMISSIONS> ``` 6. Paste the generated URL in a new tab, select the discord sever to which you want to add the bot and Authorise Bot addition. 7. Create a new channel and/or copy the **CHANNEL ID** of an existing one that you want to use and place it under _Dischord.channel_ ```yaml # Settings for Discord discord: enabled: true token: 'DISCORD_TOKEN' # BotKube Bot Token botid: 'DISCORD_BOT_ID' # BotKube Application Client ID channel: 'DISCORD_CHANNEL_ID' # Discord Channel id for receiving BotKube alerts notiftype: short # Change notification type short/long you want to receive. notiftype is optional and Default notification type is short (if not specified) ``` #### Note: Follow the first 4 mins of this [Video Tutorial](https://youtu.be/8o25pRbXdFw) to understand the process visually. ### Preview: ![ping](https://user-images.githubusercontent.com/30741615/80600577-3931cf00-8a4a-11ea-9215-a725a0b17256.png) ![pod-create-short](https://user-images.githubusercontent.com/30741615/80600638-55357080-8a4a-11ea-976f-b91e823c93bd.png) ![pod-error-long](https://user-images.githubusercontent.com/30741615/80600803-8dd54a00-8a4a-11ea-90e4-a205e93aba5f.png) ![file-attachment](https://user-images.githubusercontent.com/30741615/80600724-75fdc600-8a4a-11ea-9b10-1b5ac0e79548.png)
2020-10-06 04:37:49 +00:00
# Settings for Discord
discord:
enabled: false
token: 'DISCORD_TOKEN' # BotKube Bot Token
botid: 'DISCORD_BOT_ID' # BotKube Application Client ID
channel: 'DISCORD_CHANNEL_ID' # Discord Channel id for receiving BotKube alerts
notiftype: short # Change notification type short/long you want to receive. notiftype is optional and Default notification type is short (if not specified)
# Settings for ELS
elasticsearch:
enabled: false
awsSigning:
Add Discord support (#268) #### ISSUE TYPE <!--- Pick one below and delete the rest: --> - Feature Pull Request ##### SUMMARY <!--- Describe the change, including rationale and design decisions --> **Add support for Discord:** This PR, - adds discord bot - adds discord notifier - adds required discord configurations into comm_config.yaml - adds discordgo module into go.mod - adds discord configs into all yaml files <!--- If you are fixing an existing issue, please include "Fixes #nnn" in your PR comment; and describe briefly what the change does. --> <!--- Please list dependencies added with your change also --> Fixes #97 ### Steps For Creation and Integration: 1. Reach https://discordapp.com/developers/applications 2. Create New Application named Botkube and add a bot named **Botkube** into the Application 3. Copy the Application **CLIENT ID** and place it under _Dischord.botid_ in comm-config.yaml 4. Copy Bot **TOKEN** and place it under _Dischord.token_ in comm-config.yaml 5. Generate the URL with suitable permissions using the OAuth2 URL Generator available under OAuth2 section to the add bot to your Discord server ``` https://discordapp.com/oauth2/authorize?&client_id=<YOUR_CLIENT_ID>&scope=bot&permissions=<SET_OF_PERMISSIONS> ``` 6. Paste the generated URL in a new tab, select the discord sever to which you want to add the bot and Authorise Bot addition. 7. Create a new channel and/or copy the **CHANNEL ID** of an existing one that you want to use and place it under _Dischord.channel_ ```yaml # Settings for Discord discord: enabled: true token: 'DISCORD_TOKEN' # BotKube Bot Token botid: 'DISCORD_BOT_ID' # BotKube Application Client ID channel: 'DISCORD_CHANNEL_ID' # Discord Channel id for receiving BotKube alerts notiftype: short # Change notification type short/long you want to receive. notiftype is optional and Default notification type is short (if not specified) ``` #### Note: Follow the first 4 mins of this [Video Tutorial](https://youtu.be/8o25pRbXdFw) to understand the process visually. ### Preview: ![ping](https://user-images.githubusercontent.com/30741615/80600577-3931cf00-8a4a-11ea-9215-a725a0b17256.png) ![pod-create-short](https://user-images.githubusercontent.com/30741615/80600638-55357080-8a4a-11ea-976f-b91e823c93bd.png) ![pod-error-long](https://user-images.githubusercontent.com/30741615/80600803-8dd54a00-8a4a-11ea-90e4-a205e93aba5f.png) ![file-attachment](https://user-images.githubusercontent.com/30741615/80600724-75fdc600-8a4a-11ea-9b10-1b5ac0e79548.png)
2020-10-06 04:37:49 +00:00
enabled: false # enable awsSigning using IAM for Elastisearch hosted on AWS, if true make sure AWS environment variables are set. Refer https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html
awsRegion: 'us-east-1' # AWS region where Elasticsearch is deployed
roleArn: '' # AWS IAM Role arn to assume for credentials, use this only if you dont want to use the EC2 instance role or not running on AWS instance
server: 'ELASTICSEARCH_ADDRESS' # e.g https://example.com:9243
username: 'ELASTICSEARCH_USERNAME' # Basic Auth
password: 'ELASTICSEARCH_PASSWORD'
skipTLSVerify: false # toggle verification of TLS certificate of the Elastic nodes. Verification is skipped when option is true. Enable to connect to clusters with self-signed certs
# ELS index settings
index:
name: botkube
type: botkube-event
shards: 1
replicas: 0
# Settings for Webhook
webhook:
enabled: false
Add Discord support (#268) #### ISSUE TYPE <!--- Pick one below and delete the rest: --> - Feature Pull Request ##### SUMMARY <!--- Describe the change, including rationale and design decisions --> **Add support for Discord:** This PR, - adds discord bot - adds discord notifier - adds required discord configurations into comm_config.yaml - adds discordgo module into go.mod - adds discord configs into all yaml files <!--- If you are fixing an existing issue, please include "Fixes #nnn" in your PR comment; and describe briefly what the change does. --> <!--- Please list dependencies added with your change also --> Fixes #97 ### Steps For Creation and Integration: 1. Reach https://discordapp.com/developers/applications 2. Create New Application named Botkube and add a bot named **Botkube** into the Application 3. Copy the Application **CLIENT ID** and place it under _Dischord.botid_ in comm-config.yaml 4. Copy Bot **TOKEN** and place it under _Dischord.token_ in comm-config.yaml 5. Generate the URL with suitable permissions using the OAuth2 URL Generator available under OAuth2 section to the add bot to your Discord server ``` https://discordapp.com/oauth2/authorize?&client_id=<YOUR_CLIENT_ID>&scope=bot&permissions=<SET_OF_PERMISSIONS> ``` 6. Paste the generated URL in a new tab, select the discord sever to which you want to add the bot and Authorise Bot addition. 7. Create a new channel and/or copy the **CHANNEL ID** of an existing one that you want to use and place it under _Dischord.channel_ ```yaml # Settings for Discord discord: enabled: true token: 'DISCORD_TOKEN' # BotKube Bot Token botid: 'DISCORD_BOT_ID' # BotKube Application Client ID channel: 'DISCORD_CHANNEL_ID' # Discord Channel id for receiving BotKube alerts notiftype: short # Change notification type short/long you want to receive. notiftype is optional and Default notification type is short (if not specified) ``` #### Note: Follow the first 4 mins of this [Video Tutorial](https://youtu.be/8o25pRbXdFw) to understand the process visually. ### Preview: ![ping](https://user-images.githubusercontent.com/30741615/80600577-3931cf00-8a4a-11ea-9215-a725a0b17256.png) ![pod-create-short](https://user-images.githubusercontent.com/30741615/80600638-55357080-8a4a-11ea-976f-b91e823c93bd.png) ![pod-error-long](https://user-images.githubusercontent.com/30741615/80600803-8dd54a00-8a4a-11ea-90e4-a205e93aba5f.png) ![file-attachment](https://user-images.githubusercontent.com/30741615/80600724-75fdc600-8a4a-11ea-9b10-1b5ac0e79548.png)
2020-10-06 04:37:49 +00:00
url: 'WEBHOOK_URL' # e.g https://example.com:80
2022-06-07 13:36:58 +00:00
podlogsdashboard:
url: "OPEN_SEARCH_URL" # url with '%s' to fill it with pod name, e.g. https://kibana-url.com/?query:(language:kuery,query:'kubernetes.pod.name:%20%22%s%22')