##### 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
* 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>
##### 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
#### 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)
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 🍪
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
##### 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/46Fixes#60
##### 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 -->
##### 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
##### 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
##### 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
```
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>
* 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
* 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>
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.
This Commit,
- runs botkube containers as Non Privileged user
- adds `securityContext` filed to containers in all yaml files.
- adds `securityContext` fields to helm charts
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()
* 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.
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