vmware-archive / kubewatch

Watch k8s events and trigger Handlers
Apache License 2.0
2.44k stars 442 forks source link

seems particular namespace monitoring is not working #171

Open AkshayDubey29 opened 5 years ago

AkshayDubey29 commented 5 years ago

Logs showing this only

m-c02tr3hmg8wn:fluent-bit-deployment a0d00qf$ kubectl logs -f kubewatch-7d9d97b6b7-tm4qc ==> Config file exists...

ConfigMap:-

apiVersion: v1 data: .kubewatch.yaml: | namespace: "logging" handler: slack: channel: '#xxxx_xxx_alert' token: xoxb-xxxxxxxxxx-xxxxxxxxx-2sbi5BmJR6omoFyzgsMK4BTa kind: ConfigMap metadata: creationTimestamp: 2019-04-01T12:36:02Z labels: app: kubewatch chart: kubewatch-0.4.2 heritage: Tiller release: kubewatch name: kubewatch-config namespace: default resourceVersion: "6396331" selfLink: /api/v1/namespaces/default/configmaps/kubewatch-config uid: b61c92ba-547a-11e9-987a-000d3a5ede3a

rjanovski commented 5 years ago

also couldn't get this to work on specific namespace. the tool is quite useless without any filters.

timduhenchanter commented 5 years ago

ditto. Could not get this to work with specific namespace using the Helm chart in charts/stable

handler:
  slack:
    channel: "#namespace123-notifications"
resource:
  daemonset: false
  deployment: true
  job: false
  persistentvolume: false
  pod: true
  replicaset: false
  replicationcontroller: false
  services: false 
namespace: "namespace123"
rjanovski commented 5 years ago

unfortunately, see #144

timduhenchanter commented 5 years ago

@rjanovski @AkshayDubey29 T

The passing of the namespace was resolved it looks like in master branch but the Dockerfile is just doing HTTP grabs from their binary repository in a separate GitHub repo for kubewatch. So even though DockerHub is showing that :latest is being updated it's using a fixed commit. I created a custom Docker image from master and it is successfully passing events per namespace to Slack.

But it is sad that this project appears dead otherwise.

https://github.com/bitnami-labs/kubewatch/blob/f121575e19990f26d9abbeee3180ee7a962be6c6/pkg/controller/controller.go#L80

https://github.com/bitnami-labs/kubewatch/blob/e8eec939953748c415a40e0dee4c5123eb98679a/pkg/controller/controller.go#L80

rjanovski commented 5 years ago

hey @timduhenchanter any chance you can share the working docker in dockerhub somewhere?

rjanovski commented 5 years ago

so if anyone needs a snapshot version of the master with namespace filter working (still not too good, as many duplicated 'update' messages arrive with missing info):

helm --namespace kube-system upgrade -i kubewatch stable/kubewatch \
                                                  --set image.repository=rjanovski/kubewatch \
                                                  --set image.tag=0.1.2 \
                                                  --set slack.channel="#k8s-events" \
                                                  --set slack.token="xoxb-XXXXX" \
                                                  --set namespaceToWatch=default \
kostyrev commented 5 years ago

ping @jbianquetti-nami