Commit Graph

27 Commits

Author SHA1 Message Date
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