@@ -28,13 +28,27 @@ A Kubernetes service that monitors workloads for specific annotations and sends
28
28
29
29
### Option 1: Helm Chart (Recommended)
30
30
31
- The easiest way to deploy Slaking is using the provided Helm chart:
31
+ The easiest way to deploy Slaking is using the provided Helm chart from the GitHub Pages repository :
32
32
33
+ ``` bash
34
+ # Add the Helm repository
35
+ helm repo add slaking https://elementtech.github.io/slaking
36
+ helm repo update
37
+
38
+ # Install the chart
39
+ helm install slaking slaking/slaking \
40
+ --namespace slaking \
41
+ --create-namespace \
42
+ --set env.SLACK_TOKEN=" xoxb-your-token" \
43
+ --set env.SLACK_DEFAULT_CHANNEL=" #alerts"
44
+ ```
45
+
46
+ ** Alternative: Install from local chart directory (if you have the source code):**
33
47
``` bash
34
48
# Quick deployment with automated script
35
49
./helm-deploy.sh
36
50
37
- # Manual Helm deployment
51
+ # Manual Helm deployment from local chart
38
52
helm install slaking ./helm \
39
53
--namespace slaking \
40
54
--create-namespace \
@@ -105,31 +119,57 @@ metadata:
105
119
106
120
# ## Quick Start
107
121
108
- 1. **Clone and install dependencies :**
122
+ 1. **Install from Helm repository (Recommended) :**
109
123
` ` ` bash
110
- cd slack-o-tron
111
- npm install
124
+ # Add the Helm repository
125
+ helm repo add slaking https://elementtech.github.io/slaking
126
+ helm repo update
127
+
128
+ # Install with your Slack configuration
129
+ helm install slaking slaking/slaking \
130
+ --namespace slaking \
131
+ --create-namespace \
132
+ --set env.SLACK_TOKEN="xoxb-your-token" \
133
+ --set env.SLACK_DEFAULT_CHANNEL="#alerts"
112
134
` ` `
113
135
114
- 2. **Set up environment variables :**
136
+ 2. **Alternative : Local development setup :**
115
137
` ` ` bash
138
+ # Clone and install dependencies
139
+ git clone https://github.com/ElementTech/slaking.git
140
+ cd slaking
141
+ npm install
142
+
143
+ # Set up environment variables
116
144
cp env.example .env
117
145
# Edit .env with your Slack token and other settings
146
+
147
+ # Deploy using automated script
148
+ ./helm-deploy.sh
118
149
` ` `
119
150
120
- 3. **Deploy to Kubernetes: **
151
+ 3. **Configure your workloads with annotations and watch logs flow to Slack! **
121
152
122
- **Using Helm (Recommended):**
123
- ` ` ` bash
124
- ./helm-deploy.sh
125
- ` ` `
153
+ # ## Updating the Helm Chart
126
154
127
- **Using vanilla manifests:**
128
- ` ` ` bash
129
- ./deploy.sh
130
- ` ` `
155
+ ` ` ` bash
156
+ # Update the repository
157
+ helm repo update
158
+
159
+ # Check available versions
160
+ helm search repo slaking/slaking
161
+
162
+ # Upgrade to latest version
163
+ helm upgrade slaking slaking/slaking \
164
+ --namespace slaking \
165
+ --reuse-values
131
166
132
- 4. **Configure your workloads with annotations and watch logs flow to Slack!**
167
+ # Or upgrade to a specific version
168
+ helm upgrade slaking slaking/slaking \
169
+ --namespace slaking \
170
+ --version 1.0.1 \
171
+ --reuse-values
172
+ ` ` `
133
173
134
174
# # Development
135
175
@@ -234,17 +274,19 @@ Create separate values files for different environments:
234
274
235
275
# ## Debug Mode
236
276
237
- **Helm deployment:**
277
+ **Repository-based Helm deployment:**
238
278
` ` ` bash
239
- helm upgrade slaking ./helm \
279
+ helm upgrade slaking slaking/slaking \
240
280
--namespace slaking \
241
- --set env.LOG_LEVEL=debug
281
+ --set env.LOG_LEVEL=debug \
282
+ --reuse-values
242
283
` ` `
243
284
244
- **Vanilla deployment:**
285
+ **Local Helm deployment:**
245
286
` ` ` bash
246
- kubectl patch deployment slaking -n slaking \
247
- -p '{"spec":{"template":{"spec":{"containers":[{"name":"slaking","env":[{"name":"LOG_LEVEL","value":"debug"}]}]}}}}'
287
+ helm upgrade slaking ./helm \
288
+ --namespace slaking \
289
+ --set env.LOG_LEVEL=debug
248
290
` ` `
249
291
250
292
# ## Testing Configuration
@@ -261,39 +303,47 @@ curl http://localhost:9090/metrics
261
303
262
304
# # Management Commands
263
305
264
- # ## Helm Deployment
306
+ # ## Helm Deployment (Repository-based)
265
307
266
308
` ` ` bash
267
309
# Check status
268
- ./helm-deploy.sh status
310
+ helm list -n slaking
311
+ kubectl get pods -n slaking
269
312
270
313
# View logs
271
- ./helm-deploy.sh logs
314
+ kubectl logs -n slaking -l app=slaking
272
315
273
316
# Test deployment
274
- ./helm-deploy.sh test
317
+ kubectl port-forward -n slaking svc/slaking 3000:3000
318
+ curl http://localhost:3000/health
275
319
276
320
# Upgrade deployment
277
- ./helm-deploy.sh upgrade
321
+ helm upgrade slaking slaking/slaking \
322
+ --namespace slaking \
323
+ --reuse-values
278
324
279
325
# Uninstall
280
- ./helm-deploy.sh uninstall
326
+ helm uninstall slaking -n slaking
327
+ kubectl delete namespace slaking
281
328
` ` `
282
329
283
- # ## Vanilla Deployment
330
+ # ## Helm Deployment (Local chart)
284
331
285
332
` ` ` bash
286
333
# Check status
287
- kubectl get pods -n slaking
334
+ ./helm-deploy.sh status
288
335
289
336
# View logs
290
- kubectl logs -n slaking -l app=slaking
337
+ ./helm-deploy.sh logs
291
338
292
- # Update deployment
293
- kubectl apply -f k8s/
339
+ # Test deployment
340
+ ./helm-deploy.sh test
341
+
342
+ # Upgrade deployment
343
+ ./helm-deploy.sh upgrade
294
344
295
- # Delete deployment
296
- kubectl delete -f k8s/
345
+ # Uninstall
346
+ ./helm-deploy.sh uninstall
297
347
` ` `
298
348
299
349
# # Security Considerations
0 commit comments