You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* add support for CRDs
* Fixed usage of ListWatch and WatchFunc for conf.CustomResources; removed unused fmt import from config/config.go
* Added rbac style permissions for custom resources
* Updated yaml files to use customresources; Added to readme Working with CRDs section
* update chart version
update chart image
---------
Co-authored-by: Dima Chievtaiev <[email protected]>
Co-authored-by: Robusta Runner <[email protected]>
Co-authored-by: arik <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+59-2Lines changed: 59 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@
18
18
# Latest image
19
19
20
20
```
21
-
robustadev/kubewatch:v2.6
21
+
robustadev/kubewatch:v2.8.0
22
22
```
23
23
24
24
# Usage
@@ -75,6 +75,10 @@ You may also provide a values file instead:
75
75
```yaml
76
76
rbac:
77
77
create: true
78
+
customRoles:
79
+
- apiGroups: ["monitoring.coreos.com"]
80
+
resources: ["prometheusrules"]
81
+
verbs: ["get", "list", "watch"]
78
82
resourcesToWatch:
79
83
deployment: false
80
84
replicationcontroller: false
@@ -94,6 +98,10 @@ resourcesToWatch:
94
98
ingress: false
95
99
coreevent: false
96
100
event: true
101
+
customresources:
102
+
- group: monitoring.coreos.com
103
+
version: v1
104
+
resource: prometheusrules
97
105
slack:
98
106
channel: '#YOUR_CHANNEL'
99
107
token: 'xoxb-YOUR_TOKEN'
@@ -129,7 +137,7 @@ Once the Pod is running, you will start seeing Kubernetes events in your configu
129
137
130
138

131
139
132
-
To modify what notifications you get, update the `kubewatch` ConfigMap and turn on and off (true/false) resources:
140
+
To modify what notifications you get, update the `kubewatch` ConfigMap and turn on and off (true/false) resources or configure any resource of your choosing with customresources (CRDs):
133
141
134
142
```
135
143
resource:
@@ -151,6 +159,10 @@ resource:
151
159
ingress: false
152
160
coreevent: false
153
161
event: true
162
+
customresources:
163
+
- group: monitoring.coreos.com
164
+
version: v1
165
+
resource: prometheusrules
154
166
```
155
167
156
168
#### Working with RBAC
@@ -179,6 +191,51 @@ Then just create `pod` as usual with:
179
191
$ kubectl create -f kubewatch.yaml
180
192
```
181
193
194
+
#### Working with CRDs
195
+
`kubewatch` can be configured to monitor Kubernetes Custom Resource Definitions (CRDs), allowing you to receive notifications when changes occur.
196
+
To configure kubewatch to watch custom resources, you need to define the `customresources` section either in your values file or by using the `--set` flag with Helm commands.
197
+
198
+
Include the custom resource configuration in your values file:
199
+
200
+
```yaml
201
+
customresources:
202
+
- group: monitoring.coreos.com
203
+
version: v1
204
+
resource: prometheusrules
205
+
```
206
+
207
+
Then deploy or upgrade `kubwatch` with `helm upgrade` or `helm install`
208
+
209
+
210
+
Alternatively, you can pass this configuration directly using the `--set` flag:
After defining custom resources, make sure that kubewatch has the necessary RBAC permissions to access the custom resources you've configured. Without the appropriate permissions, `kubewatch` will not be able to monitor your custom resources, and you won't receive notifications for changes.
217
+
218
+
To grant these permissions, you can define custom RBAC roles using `customRoles` within the `rbac` section of your values file or by using the `--set` flag with Helm commands. This allows you to specify exactly which API groups, resources, and actions kubewatch should have access to.
219
+
220
+
Here’s how you can configure the necessary permissions to monitor your resources:
221
+
```yaml
222
+
rbac:
223
+
create: true
224
+
customRoles:
225
+
- apiGroups: ["monitoring.coreos.com"]
226
+
resources: ["prometheusrules"]
227
+
verbs: ["get", "list", "watch"]
228
+
```
229
+
230
+
Then deploy or upgrade `kubwatch` with `helm upgrade` or `helm install`
231
+
232
+
233
+
Alternatively, you can pass this configuration directly using the `--set` flag:
0 commit comments