Skip to content

Commit

Permalink
Merge pull request #16 from robusta-dev/kubewatch-chart
Browse files Browse the repository at this point in the history
add kubewatch chart
  • Loading branch information
aantn authored Jan 15, 2023
2 parents 42f3176 + 02e1b9f commit 32b91a9
Show file tree
Hide file tree
Showing 37 changed files with 2,820 additions and 9 deletions.
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ Use "kubewatch [command] --help" for more information about a command.
When you have helm installed in your cluster, use the following setup:

```console
helm install kubewatch bitnami/kubewatch --set='rbac.create=true,slack.channel=#YOUR_CHANNEL,slack.token=xoxb-YOUR_TOKEN,resourcesToWatch.pod=true,resourcesToWatch.daemonset=true'
helm repo add robusta https://robusta-charts.storage.googleapis.com && helm repo update
helm install kubewatch robusta/kubewatch --set='rbac.create=true,slack.channel=#YOUR_CHANNEL,slack.token=xoxb-YOUR_TOKEN,resourcesToWatch.pod=true,resourcesToWatch.daemonset=true'
```

You may also provide a values file instead:
Expand Down Expand Up @@ -94,22 +95,22 @@ slack:
And use that:
```console
$ helm upgrade --install kubewatch bitnami/kubewatch --values=values-file.yml
$ helm upgrade --install kubewatch robusta/kubewatch --values=values-file.yml
```

#### Using kubectl:

In order to run kubewatch in a Kubernetes cluster quickly, the easiest way is for you to create a [ConfigMap](https://github.com/bitnami-labs/kubewatch/blob/master/kubewatch-configmap.yaml) to hold kubewatch configuration.
In order to run kubewatch in a Kubernetes cluster quickly, the easiest way is for you to create a [ConfigMap](https://github.com/robusta-dev/kubewatch/blob/master/kubewatch-configmap.yaml) to hold kubewatch configuration.

An example is provided at [`kubewatch-configmap.yaml`](https://github.com/bitnami-labs/kubewatch/blob/master/kubewatch-configmap.yaml), do not forget to update your own slack channel and token parameters. Alternatively, you could use secrets.
An example is provided at [`kubewatch-configmap.yaml`](https://github.com/robusta-dev/kubewatch/blob/master/kubewatch-configmap.yaml), do not forget to update your own slack channel and token parameters. Alternatively, you could use secrets.

Create k8s configmap:

```console
$ kubectl create -f kubewatch-configmap.yaml
```

Create the [Pod](https://github.com/bitnami-labs/kubewatch/blob/master/kubewatch.yaml) directly, or create your own deployment:
Create the [Pod](https://github.com/robusta-dev/kubewatch/blob/master/kubewatch.yaml) directly, or create your own deployment:

```console
$ kubectl create -f kubewatch.yaml
Expand Down Expand Up @@ -174,7 +175,7 @@ $ kubectl create -f kubewatch.yaml

```console
# Download and install kubewatch
$ go get -u github.com/bitnami-labs/kubewatch
$ go get -u github.com/robusta-dev/kubewatch

# Configure the notification channel
$ kubewatch config add slack --channel <slack_channel> --token <slack_token>
Expand All @@ -200,13 +201,13 @@ INFO[0000] Kubewatch controller synced and ready pkg=kubewatch-pod
To Run Kubewatch Container interactively, place the config file in `$HOME/.kubewatch.yaml` location and use the following command.

```
docker run --rm -it --network host -v $HOME/.kubewatch.yaml:/root/.kubewatch.yaml -v $HOME/.kube/config:/opt/bitnami/kubewatch/.kube/config --name <container-name> bitnami/kubewatch
docker run --rm -it --network host -v $HOME/.kubewatch.yaml:/root/.kubewatch.yaml -v $HOME/.kube/config:/opt/bitnami/kubewatch/.kube/config --name <container-name> us-central1-docker.pkg.dev/genuine-flight-317411/devel/kubewatch
```

Example:

```
$ docker run --rm -it --network host -v $HOME/.kubewatch.yaml:/root/.kubewatch.yaml -v $HOME/.kube/config:/opt/bitnami/kubewatch/.kube/config --name kubewatch-app bitnami/kubewatch
$ docker run --rm -it --network host -v $HOME/.kubewatch.yaml:/root/.kubewatch.yaml -v $HOME/.kube/config:/opt/bitnami/kubewatch/.kube/config --name kubewatch-app us-central1-docker.pkg.dev/genuine-flight-317411/devel/kubewatch
==> Writing config file...
INFO[0000] Starting kubewatch controller pkg=kubewatch-service
Expand All @@ -223,7 +224,7 @@ INFO[0000] Processing add to namespace: default pkg=kubewatch-namespace
To Demonise Kubewatch container use

```
$ docker run --rm -d --network host -v $HOME/.kubewatch.yaml:/root/.kubewatch.yaml -v $HOME/.kube/config:/opt/bitnami/kubewatch/.kube/config --name kubewatch-app bitnami/kubewatch
$ docker run --rm -d --network host -v $HOME/.kubewatch.yaml:/root/.kubewatch.yaml -v $HOME/.kube/config:/opt/bitnami/kubewatch/.kube/config --name kubewatch-app us-central1-docker.pkg.dev/genuine-flight-317411/devel/kubewatch
```

# Configure
Expand Down
21 changes: 21 additions & 0 deletions helm/kubewatch/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
6 changes: 6 additions & 0 deletions helm/kubewatch/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: common
repository: https://charts.bitnami.com/bitnami
version: 1.12.0
digest: sha256:7e484480451778c273e7a165dbfaa5594ec1c9a63a114ce9d458626cadd28893
generated: "2022-03-23T13:12:25.426775553Z"
26 changes: 26 additions & 0 deletions helm/kubewatch/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
annotations:
category: Infrastructure
apiVersion: v2
appVersion: 0.1.0
dependencies:
- name: common
repository: https://charts.bitnami.com/bitnami
tags:
- bitnami-common
version: 1.x.x
description: 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.
engine: gotpl
home: https://github.com/robusta-dev/kubewatch
icon: https://bitnami.com/assets/stacks/kubewatch/img/kubewatch-stack-220x234.png
keywords:
- kubernetes
- slack
- hipchat
- mattermost
- flock
- msteams
maintainers: []
name: kubewatch
sources:
- https://github.com/robusta-dev/kubewatch
version: 3.3.6
Loading

0 comments on commit 32b91a9

Please sign in to comment.