Fix spelling and change case in comments and docs (#411)

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

##### SUMMARY
<!--- Describe the change, including rationale and design decisions -->
Corrected spelling mistakes in documentation comments, changed cases for references to BotKube for consistency across docs, and added code markdown to kubectl reference for consistency
<!---
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 -->
This commit is contained in:
michizhou 2020-10-16 03:33:19 -07:00 committed by GitHub
parent c4604a6312
commit c4531a21b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 16 deletions

View File

@ -23,7 +23,7 @@ Botkube `ping` command with the `--cluster-name` flag returns `pong` response fr
For `kubectl` commands in a dedicated channel to a cluster, if `--cluster-name` flag is used, it responds with the output for the cluster specified in flag, else it checks if the channel in the request matches the `config.Communications.Slack.Channel` and responds if true else ignores.
For `kubectl` commands in a group, Direct message or channel not dedicated to any cluster, the `--cluster-name` flag is mandatory. The executor checks if the `--cluster-name` flag is present in the request. If yes, it gets the cluster's name from the flag and compares with `c.Settings.ClusterName` from the config file, if it matches then it responds with the required output to the slack bot and if it doesn't match, it ignores the request. And if the `--cluster-name` flag is absent for kubectl commands, it responds to the slack bot saying 'Please specify the cluster-name'.
For `kubectl` commands in a group, Direct message or channel not dedicated to any cluster, the `--cluster-name` flag is mandatory. The executor checks if the `--cluster-name` flag is present in the request. If yes, it gets the cluster's name from the flag and compares with `c.Settings.ClusterName` from the config file, if it matches then it responds with the required output to the slack bot and if it doesn't match, it ignores the request. And if the `--cluster-name` flag is absent for `kubectl` commands, it responds to the slack bot saying 'Please specify the cluster-name'.
For example -
```sh

View File

@ -1,9 +1,9 @@
# Default values for botkube.
# Default values for BotKube.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
# Extra annotations to pass to the botkube pod
# Extra annotations to pass to the BotKube pod
extraAnnotations: {}
# Priority class name for the pod
priorityClassName: ""
@ -17,7 +17,7 @@ image:
nameOverride: ""
fullnameOverride: ""
# Enable podSecurityPolicy to allow botkube to run in restricted clusters
# Enable podSecurityPolicy to allow BotKube to run in restricted clusters
podSecurityPolicy:
enabled: false
@ -257,7 +257,7 @@ config:
verbs: ["api-resources", "api-versions", "cluster-info", "describe", "diff", "explain", "get", "logs", "top", "auth"]
# resource configuration which is allowed
resources: ["deployments", "pods" , "namespaces", "daemonsets", "statefulsets", "storageclasses", "nodes" ]
# set Namespace to execute botkube kubectl commands by default
# set Namespace to execute BotKube kubectl commands by default
defaultNamespace: default
# Set true to enable commands execution from configured channel only
restrictAccess: false
@ -305,9 +305,9 @@ communications:
elasticsearch:
enabled: false
awsSigning:
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
enabled: false # enable awsSigning using IAM for Elasticsearch 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
roleArn: '' # AWS IAM Role arn to assume for credentials, use this only if you don't 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'
@ -341,7 +341,7 @@ ingress:
serviceMonitor:
## If true, a ServiceMonitor CR is created for a botkube
## If true, a ServiceMonitor CR is created for a BotKube
## https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#servicemonitor
##
enabled: false
@ -362,7 +362,7 @@ resources: {}
# cpu: 100m
# memory: 128Mi
extraEnv: # Extra environment variables to pass to the botkube container, example HTTP_PROXY
extraEnv: # Extra environment variables to pass to the BotKube container, example HTTP_PROXY
#HTTP_PROXY: <proxyURL>:<port>
nodeSelector: {}

View File

@ -39,7 +39,7 @@ const (
)
const (
// BotName stores Botkube details
// BotName stores BotKube details
BotName = "botkube"
// WebSocketProtocol stores protocol initials for web socket
WebSocketProtocol = "ws://"
@ -111,7 +111,7 @@ func (b *MMBot) Start() {
}
go func() {
// It is obeserved that Mattermost server closes connections unexpectedly after some time.
// It is observed that Mattermost server closes connections unexpectedly after some time.
// For now, we are adding retry logic to reconnect to the server
// https://github.com/infracloudio/botkube/issues/201
log.Info("BotKube connected to Mattermost!")
@ -205,7 +205,7 @@ func (b MMBot) getTeam() *model.Team {
return botTeam
}
// Check if botkube user exists in Mattermost
// Check if BotKube user exists in Mattermost
func (b MMBot) getUser() *model.User {
users, resp := b.APIClient.AutocompleteUsersInTeam(b.getTeam().Id, BotName, 1, "")
if resp.Error != nil {
@ -214,7 +214,7 @@ func (b MMBot) getUser() *model.User {
return users.Users[0]
}
// Create channel if not present and add botkube user in channel
// Create channel if not present and add BotKube user in channel
func (b MMBot) getChannel() *model.Channel {
// Checking if channel exists
botChannel, resp := b.APIClient.GetChannelByName(b.ChannelName, b.getTeam().Id, "")
@ -222,7 +222,7 @@ func (b MMBot) getChannel() *model.Channel {
log.Fatalf("There was a problem finding Mattermost channel %s. %s", b.ChannelName, resp.Error)
}
// Adding Botkube user to channel
// Adding BotKube user to channel
b.APIClient.AddChannelMember(botChannel.Id, b.getUser().Id)
return botChannel
}

View File

@ -79,10 +79,10 @@ type Level string
// BotPlatform supported by BotKube
type BotPlatform string
// ResourceConfigFileName is a name of botkube resource configuration file
// ResourceConfigFileName is a name of BotKube resource configuration file
var ResourceConfigFileName = "resource_config.yaml"
// CommunicationConfigFileName is a name of botkube communication configuration file
// CommunicationConfigFileName is a name of BotKube communication configuration file
var CommunicationConfigFileName = "comm_config.yaml"
// Notify flag to toggle event notification