Commit Graph

44 Commits

Author SHA1 Message Date
Prasad Ghangal
93eeeea79f Release v0.12.4 2021-12-13 09:13:05 +05:30
Prasad Ghangal
db32201404
Update release script to bump release tags (#544)
##### SUMMARY

- Update release script to bump release tags
- Correct BotKube release versions in all in one deploy yamls
2021-11-17 15:31:36 +00:00
Prasad Ghangal
f349853c51
Publish multi-arch images with goreleaser (#509)
##### ISSUE TYPE
 - Feature Pull Request

##### SUMMARY
- Switch to goreleaser for building and publishing release
- Set BotKube version with build args
- Use docker manifest to build multi-arch image
- Update CI pipeline to build and push image using goreleaser

Fixes #504 

```
$ docker manifest inspect ghcr.io/prasadg193/botkube:latest
{
   "schemaVersion": 2,
   "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
   "manifests": [
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1370,
         "digest": "sha256:64d94709256eb85452afa06aa15574724266fa6b82b70654ff6b03c467d5a5e4",
         "platform": {
            "architecture": "amd64",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1160,
         "digest": "sha256:525d79e629637fd1ae3530223fa380aea26ed299a1fd9ae2787721f4cc33dad5",
         "platform": {
            "architecture": "amd64",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1160,
         "digest": "sha256:ef72bc09078929c8aed1161f86c2c86523f6fac664094a034c737ffd582f3ea7",
         "platform": {
            "architecture": "arm64",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 1160,
         "digest": "sha256:990cd2c6b522a3a69ba73ee83ed0ae306102369f02d09891de8fbfd024d37e87",
         "platform": {
            "architecture": "arm",
            "os": "linux",
            "variant": "v7"
         }
      }
   ]
}

```
2021-08-19 10:56:22 +05:30
Vaibhav Pathak
ef92bb9c1f
Migrating to github container registry (#498)
##### ISSUE TYPE
 - Feature Pull Request

##### SUMMARY
This pull request is for changing registry from Docker hub to Github container registry. After acceptance of this PR all the new images will be pushed to github container registry as well as helm chart and other deployment chart will point to same github registry. 

Fixes #432
2021-07-21 10:44:22 +05:30
David Costa
bcda42a77e
Allow skipping certs validation of Elastic (#487)
* Allow skipping certs validation of Elastic

Allow user to skip certificate validation when connecting to the
Elasticsearch cluster (opt-in). It permits to use botkube with clusters
that don't have certificates signed by a CA that is trusted by the
botkube image, it often happens with clusters that are for internal use
only.

See #485

Co-Authored-By: Carmine Di Monaco <carmine.dimonaco@computer.org>

* Update go.sum

* Add the default value of skipTLSVerify in deploy manifests

Co-authored-by: David Costa <david@zarel.net>

* Add skipTLSVerify elasticsearch option to helm chart

Co-authored-by: David Costa <david@zarel.net>

* Bool instead of boolean in helm chart docs for skipTLSVerify elastic

Co-authored-by: David Costa <david@zarel.net>

Co-authored-by: Carmine Di Monaco <carmine.dimonaco@computer.org>
Co-authored-by: Carmine Di Monaco <carmine.dimonaco@gmail.com>
2021-07-02 09:25:06 +05:30
Prasad Ghangal
7d17dc0c26 Release v0.12.1 2021-04-25 18:28:47 +05:30
Kartik Moolya
38196d911d
adding support for imagePullSecrets and pullpolicy to "IfNotPresent" (#472)
##### ISSUE TYPE
<!--- Pick one below and delete the rest: -->
 - Feature Pull Request

##### SUMMARY
<!--- Describe the change, including rationale and design decisions -->
Added code block in helmcharts to support imagepullsecrets
as a best practise changed the imagePullPolicy to "IfNotPresent"
<!---
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 #471
2021-04-15 08:57:41 +00:00
Prasad Ghangal
1a4398ffba Release v0.12.0 2021-01-29 00:47:42 +05:30
Aananth K
ad9a738cdd
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
Sanket Sudake
5974581b13
Codespell action for BotKube (#394)
This commit adds GitHub action which checks for common misspellings across repository.
2020-10-05 12:26:10 +05:30
Jirka Kremser
86d2572e56
Add a support for ignoring the events from a namespace that matches regexp (#386)
Fixes issue #295

##### ISSUE TYPE
<!--- Pick one below and delete the rest: -->
 - Feature Pull Request

##### SUMMARY
<!--- Describe the change, including rationale and design decisions -->
This change allows to ignore whole sets of namespaces using the asterix expansion. It still does the exact match check for all the namespaces (separated by comma in config), but if it contains a `*`, it's actually replaced with `.*` and passed to `regexp.MatchString` to do the job.

PR also contains couple of very simple test cases.

<!---
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 -->
deps:
`namespace_checker.go` now imports also `regexp`

Fixes #295

It's my very first golang code, so please let me know if it's not idiomatic go 🍪
2020-10-02 16:07:09 +00:00
Prasad Ghangal
8e54ab1651 Release v0.11.0 2020-09-29 20:29:19 +05:30
Prasad Ghangal
bf6f4d5e9c
Update all-in-one deploy yamls for Teams support (#346)
Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>

##### ISSUE TYPE

 - Docs Pull Request

##### SUMMARY

- Update all-in-one yamls for Teams support
- Add sample res config for custom resources
2020-09-26 14:19:40 +00:00
Prasad Ghangal
085bd73dbf
Update resource in deployment manifests with G/V/R format (#332)
Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>

##### ISSUE TYPE

 - Bug fix Pull Request

##### SUMMARY

Update resource in deployment manifests with G/V/R format

Fixes #331
2020-09-07 17:28:55 +00:00
Prasad Ghangal
c6db9526a3
Add MS Teams support (#242)
##### ISSUE TYPE
<!--- Pick one below and delete the rest: -->
 - Feature Pull Request


##### SUMMARY

- Add support for Microsoft Teams
- Multicluster support not available yet for Teams

Integration tests will be addressed with a separate issue. Blocked by https://github.com/infracloudio/msbotbuilder-go/issues/46

Fixes #60
2020-08-11 06:12:09 +00:00
Kartik Moolya
7b28f663a1
Priority class support for helm deployment (#308)
##### ISSUE TYPE
<!--- Pick one below and delete the rest: -->
 - Feature Pull Request

##### SUMMARY
<!--- Describe the change, including rationale and design decisions -->
Priority class support for helm deployment
<!---
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 -->
2020-07-06 15:30:55 +00:00
Kartik Moolya
fb61f994ae
Add aws config in helm values (#303)
##### ISSUE TYPE
<!--- Pick one below and delete the rest: -->
 - Feature Pull Request

##### SUMMARY
<!--- Describe the change, including rationale and design decisions -->
adding config values for helm deployments
<!---
If you are fixing an existing issue, please include "Fixes #nnn" in your
PR comment; and describe briefly what the change does.
-->
adding config values for helm deployments
<!--- Please list dependencies added with your change also -->

Fixes #XXX
2020-07-02 05:50:42 +00:00
Girish Talekar
51f0f3d2b1
Make allowed kubectl commands configurable (#284)
##### ISSUE TYPE
<!--- Pick one below and delete the rest: -->
 - Feature Pull Request

##### SUMMARY
Added configuration in resource_config.yaml for limiting kubectl commands as per the discussion given in ticket 183

The configuration added is used in 
slack.go and mattermost.go to pass it to executor.go and used to limit the commands execution

Fixes #183
2020-06-21 11:26:30 +00:00
Aananth K
ebd2c93474
Configure default namespace for kubectl cmds through config
##### ISSUE TYPE
<!--- Pick one below and delete the rest: -->
 - Feature Pull Request

##### SUMMARY
<!--- Describe the change, including rationale and design decisions -->
This Commit,
- Adds `kubectl.Enabled`, `Kubectl.DefaultNamespace` to `Config.Settings` to configure default namespace, under which all  botkube kubectl commands will be executed by default.
- changes `Settings.RestrictAccess` into `Settings. Kubectl.RestrictAccess` 
- updates all config.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 #176

**Preview**:

```yaml
settings:
  # Kubectl executor configs
  kubectl:
    # Set true to enable kubectl commands execution
    enabled: false
    # set Namespace to execute botkube kubectl commands by default
    defaultNamespace: default
    # Set true to enable commands execution from configured channel only
    restrictAccess: false
```
2020-05-01 13:38:10 +00:00
Prasad Ghangal
7aaf5112c6 Release v0.10.0 2020-04-27 09:58:06 +05:30
Prasad Ghangal
16e90962d6
Fix deploy manifest to work with latest BotKube (#256)
Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
2020-04-18 19:27:31 +05:30
Prasad Ghangal
59041fa26b Update BotKube config to send update events in specific fields
Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
2020-01-09 19:15:43 +05:30
Mahendra Hiraman Bagul
75f77e7052 Added restrictAccess flag to restrict BotKube command execution
Signed-off-by: Mahendra Bagul <bagulm123@gmail.com>

Fixed https://github.com/infracloudio/botkube/pull/238#discussion_r361931721 issue. Removed msg and re-added the check required for not responding to non-kubectl commands

Signed-off-by: Mahendra Bagul <bagulm123@gmail.com>

Fixed a test case

Signed-off-by: Mahendra Bagul <bagulm123@gmail.com>

Fixed https://github.com/infracloudio/botkube/pull/238#discussion_r361931721 issue. Removed msg and re-added the check required for not responding to non-kubectl commands

Signed-off-by: Mahendra Bagul <bagulm123@gmail.com>

Placed the condition at right place.

Signed-off-by: Mahendra Bagul <bagulm123@gmail.com>
2020-01-01 18:10:25 +05:30
Sumit Lalwani
a4a93288a5 Pass communication settings as a k8s secret (#233) 2019-12-22 18:31:49 +05:30
Prasad Ghangal
e6b38ad667
Revert "Pass communication settings as a k8s secret (#226)" (#232)
This reverts commit 8b2e0f9ba5.
2019-12-19 15:54:10 +05:30
Sumit Lalwani
8b2e0f9ba5 Pass communication settings as a k8s secret (#226)
* Pass communication settings as a k8s secret

Signed-off-by: Sumit Lalwani <sumit.lalwani97@gmail.com>

* Update botkube deployment

Signed-off-by: Sumit Lalwani <sumit.lalwani97@gmail.com>

* update tls deployment, helm and e2e tests

Signed-off-by: Sumit Lalwani <sumit.lalwani97@gmail.com>

* Add app label in secret

Signed-off-by: Sumit Lalwani <sumit.lalwani97@gmail.com>

* Update yaml files name

Signed-off-by: Sumit Lalwani <sumit.lalwani97@gmail.com>

* Fix travis failure

Signed-off-by: Sumit Lalwani <sumit.lalwani97@gmail.com>

* Update config -> resourceConfig name and fix travis failure

Signed-off-by: Sumit Lalwani <sumit.lalwani97@gmail.com>

* move communications to root in helm

Signed-off-by: Sumit Lalwani <sumit.lalwani97@gmail.com>

* Update communication secret

Signed-off-by: Sumit Lalwani <sumit.lalwani97@gmail.com>

* Add new line

Signed-off-by: Sumit Lalwani <sumit.lalwani97@gmail.com>
2019-12-18 18:53:55 +05:30
Prasad Ghangal
638137a1fd Release v0.9.1 2019-11-25 14:39:09 +05:30
Prasad Ghangal
409e4a6c43 Remove secret resource from default BotKube config
Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
2019-11-23 18:21:11 +05:30
Ryan
32a4603c05 Add pod security policy so botkube works in restricted clusters (#195)
* Update comment to indicate the certificate is used by Mattermost

* Lint all-in-one deployment yamls

* Add pod security policy so botkube works in restricted clusters
2019-11-12 11:40:11 +05:30
Prasad Ghangal
ce805cb513 Update image tags to v0.9.0
Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
2019-10-11 17:13:45 +05:30
Prasad Ghangal
c0c4173cde Release v0.9.0 2019-10-11 16:44:20 +05:30
Prasad Ghangal
8eccd714ac
Fix namespace format in config files (#198)
* Fix helm/botkube/values.yaml clusterrolebinding namespace info

* Fix namespace format for clusterrole res in config

Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
2019-10-11 14:57:47 +05:30
Prasad Ghangal
8835dea144
Update Deprecated API groups in K8s 1.16 (#192)
Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
2019-10-10 15:28:47 +05:30
Prasad Ghangal
2f43ab9cb2 Use infracloudio/botkube repo for docker images
Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
2019-09-30 14:35:27 +05:30
Aananth K
9800db7fe6 Add support for Webhooks
This commit,
- Adds support for event notifications through `Wehbook` 
- updates configs in all yaml files
- updated helm charts
- adds unit tests for webhook notifier
- adds integration test webhook notifier
- adds test/webhook package to enable integration testing.
2019-09-02 13:18:51 +05:30
coder
600ad6d72e Run containers as Non Privileged user (#168)
This Commit,
- runs botkube containers as Non Privileged user
- adds `securityContext` filed to containers in all yaml files.
- adds `securityContext` fields to helm charts
2019-09-01 11:08:29 +05:30
coder
964cff5d88 Add support for ignoring namespaces (#139)
This Commit,
- adds support for ignoring certain namespaces while watching all namespaces using `IgnoreNamespaceChecker`
- replaces `Namespaces []string` with `Namespaces.Include []string`
- adds `Namespaces.Ignore []string` ( optional / omitempty ) filed to ignore namespaces when Namespaces.Inculde contains "all"
- adds unit test cases for isNamespaceIgnored()
2019-08-20 12:49:27 +05:30
coder
1f9efd6163 Enhance Update Events with resource spec diff and Change event message formats (#158)
* Include Namespace field only for Namespaced event notifs

This Commit
- includes namespace field only for namespaced objects notifs
- excludes namespace field from namespace independent resource events

* Enhance Update Event Notifications

This Commit,
- enhances update event notifications with details of what Spec is getting changed
- adds custom `SpecDiffReporter` and `utils.Diff()` method.
- adds update events in all config.yaml files
- adds unit-test for utils.Diff()
- adds update events for Deployment, Statefulset and Job by default.
2019-08-18 21:39:06 +05:30
coder
a481321048 Add flag to control Config Watcher (#152)
This commit,
- adds `config.settings.configwatcher` to enable/disable config watcher
- updates info in all config.yaml files
2019-08-12 10:24:13 +05:30
Prasad Ghangal
fc5362b752
Use SharedInformerFactory instead of cache.Informer (#146)
* Use SharedInformerFactory instead of cache.Informer
Improve event filtering logic
Fix timestamp for deployment/statefulset delete event

Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>

* Fix job_status_checker filter to allow create events

Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>

* Vendoring: Update Dependencies

Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
2019-08-09 14:54:10 +05:30
coder
be5fade9a1 Enhance Notification : short/long notification type (#127)
This commit,
- enables sending short/long event notifications to channels
- adds a optional filed "notiftype" under channel config to change between short (default) and long notif types
- adds Message() method to event object for creating brief messages (to use across handlers)
- BugFix: enable/disable recommendations through config file
2019-07-26 11:59:15 +05:30
Prasad Ghangal
43039842ea Release v0.8.0 2019-07-09 16:13:16 +05:30
Prasad Ghangal
5e3e47f246 Check if new version of BotKube avaiable and notify user
Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
2019-06-25 18:58:01 +05:30
mugdha-adhav
24eb71e755 Add TLS support for Mattermost in Botkube
Closes #81
2019-05-08 10:29:03 +05:30