Sign inSign up

guoxudongdocker/kubewatch-chart

By guoxudongdocker

•Updated almost 7 years ago

Image
0

1.2K

guoxudongdocker/kubewatch-chart repository overview

⁠kubewatch

kubewatch⁠ is a Kubernetes watcher that currently publishes notification to Slack. Run it in your k8s cluster, and you will get event notifications in a slack channel.

⁠TL;DR;

$ helm install {YOUR_RELEASE_NAME} .

⁠Introduction

This chart bootstraps a kubewatch deployment on a Kubernetes⁠ cluster using the Helm⁠ package manager.

⁠Prerequisites

  • Kubernetes 1.12+
  • Helm 2.11+ or Helm 3.0-beta3+

⁠Installing the Chart

To install the chart with the release name my-release:

$ helm install --name my-release .

The command deploys kubewatch on the Kubernetes cluster in the default configuration. The Parameters⁠ section lists the parameters that can be configured during installation.

⁠Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

⁠Parameters

The following table lists the configurable parameters of the kubewatch chart and their default values.

ParameterDescriptionDefault
global.imageRegistryGlobal Docker image registrynil
global.imagePullSecretsGlobal Docker registry secret names as an array[] (does not add image pull secrets to deployed pods)
affinitynode/pod affinitiesNone
image.registryImage registrydocker.io
image.repositoryImage repositorybitnami/kubewatch
image.tagImage tag{VERSION}
image.pullPolicyImage pull policyAlways
nameOverrideString to partially override kubewatch.fullname template with a string (will prepend the release name)nil
fullnameOverrideString to fully override kubewatch.fullname template with a stringnil
nodeSelectornode labels for pod assignment{}
podAnnotationsannotations to add to each pod{}
podLabelsadditional labesl to add to each pod{}
replicaCountdesired number of pods1
rbac.createIf true, create & use RBAC resourcestrue
serviceAccount.createIf true, create a serviceAccounttrue
serviceAccount.nameexisting ServiceAccount to use (ignored if rbac.create=true)``
resourcespod resource requests & limits{}
dingtalk.enabledEnable Dingtalk notificationstrue
dingtalk.tokenDingtalk bot token""
dingtalk.signDingtalk bot sign""
slack.enabledEnable Slack notificationsfalse
slack.channelSlack channel to notify""
slack.tokenSlack API token""
hipchat.enabledEnable HipChat notificationsfalse
hipchat.urlHipChat URL""
hipchat.roomHipChat room to notify""
hipchat.tokenHipChat token""
mattermost.enabledEnable Mattermost notificationsfalse
mattermost.channelMattermost channel to notify""
mattermost.usernameMattermost user to notify""
mattermost.urlMattermost URL""
flock.enabledEnable Flock notificationsfalse
flock.urlFlock URL""
webhook.enabledEnable Webhook notificationsfalse
webhook.urlWebhook URL""
tolerationsList of node taints to tolerate (requires Kubernetes >= 1.6)[]
namespaceToWatchnamespace to watch, leave it empty for watching all""
resourcesToWatchlist of resources which kubewatch should watch and notify slack{pod: true, deployment: true}
resourcesToWatch.podwatch changes to Pods⁠true
resourcesToWatch.deploymentwatch changes to Deployments⁠true
resourcesToWatch.replicationcontrollerwatch changes to ReplicationControllers⁠false
resourcesToWatch.replicasetwatch changes to ReplicaSets⁠false
resourcesToWatch.daemonsetwatch changes to DaemonSets⁠false
resourcesToWatch.serviceswatch changes to Services⁠false
resourcesToWatch.jobwatch changes to Jobs⁠false
resourcesToWatch.persistentvolumewatch changes to PersistentVolumes⁠false

Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,

$ helm install . --name my-release \
  --set=dingtalk.sign="XXX",dingtalk.token="XXXX-XXXX-XXXX"

Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,

$ helm install stable/kubewatch --name my-release -f values.yaml

Tip: You can use the default values.yaml⁠

⁠Configuration and installation details

⁠Rolling VS Immutable tags⁠

It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.

Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.

⁠Create a Dingtalk bot
  1. get token

    Copy webhook and get https://oapi.dingtalk.com/robot/send?access_token={YOUR_TOKEN},{TOUR_TOKEN} is the token.

  2. get sign

    Copy the sign.

  3. Use custom keywords or IP addresses(Optional)

    If you don't want to use the sign, please set dingtalk.sign=''. Then you can use the custom keywords or IP addresses.

⁠Create a Slack bot

Open https://my.slack.com/services/new/bot⁠ to create a new Slack bot. The API token can be found on the edit page (it starts with xoxb-).

Invite the Bot to your channel by typing /join @name_of_your_bot in the Slack message area.

Tag summary

Content type

Image

Digest

Size

31.8 MB

Last updated

almost 7 years ago

docker pull guoxudongdocker/kubewatch-chart