Skip to content

Commit

Permalink
improve deployment (#344)
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Leclaire <[email protected]>
  • Loading branch information
thomasLeclaire authored Sep 24, 2024
1 parent dc5968d commit 65f5878
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 11 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

```shell
helm repo add kwatch https://kwatch.dev/charts
helm install [RELEASE_NAME] kwatch/kwatch --namespace kwatch --create-namespace --version 0.10.0
helm install [RELEASE_NAME] kwatch/kwatch --namespace kwatch --create-namespace --version 0.10.1
```

To get more details, please check [chart's configuration](https://github.com/abahmed/kwatch/blob/main/deploy/chart/README.md)
Expand All @@ -46,7 +46,7 @@ To get more details, please check [chart's configuration](https://github.com/aba
You need to get config template to add your configs

```shell
curl -L https://raw.githubusercontent.com/abahmed/kwatch/v0.10.0/deploy/config.yaml -o config.yaml
curl -L https://raw.githubusercontent.com/abahmed/kwatch/v0.10.1/deploy/config.yaml -o config.yaml
```

Then edit `config.yaml` file and apply your configuration
Expand All @@ -58,7 +58,7 @@ kubectl apply -f config.yaml
To deploy **kwatch**, execute following command:

```shell
kubectl apply -f https://raw.githubusercontent.com/abahmed/kwatch/v0.10.0/deploy/deploy.yaml
kubectl apply -f https://raw.githubusercontent.com/abahmed/kwatch/v0.10.1/deploy/deploy.yaml
```

## High Level Architecture
Expand Down Expand Up @@ -337,8 +337,8 @@ basic auth
### Cleanup

```shell
kubectl delete -f https://raw.githubusercontent.com/abahmed/kwatch/v0.10.0/deploy/config.yaml
kubectl delete -f https://raw.githubusercontent.com/abahmed/kwatch/v0.10.0/deploy/deploy.yaml
kubectl delete -f https://raw.githubusercontent.com/abahmed/kwatch/v0.10.1/deploy/config.yaml
kubectl delete -f https://raw.githubusercontent.com/abahmed/kwatch/v0.10.1/deploy/deploy.yaml
```

## 👍 Contribute & Support
Expand Down
4 changes: 2 additions & 2 deletions deploy/chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: kwatch
version: "0.10.0"
appVersion: "v0.10.0"
version: "0.10.1"
appVersion: "v0.10.1"
description: monitor all changes in your Kubernetes(K8s) cluster, detects crashes
in your running apps in realtime, and publishes notifications to your channels (Slack,
Discord, etc.) instantly
Expand Down
2 changes: 1 addition & 1 deletion deploy/chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ helm repo update
## Install Chart

```console
helm install [RELEASE_NAME] kwatch/kwatch --version 0.10.0
helm install [RELEASE_NAME] kwatch/kwatch --version 0.10.1
```

## Uninstall Chart
Expand Down
5 changes: 4 additions & 1 deletion deploy/chart/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ metadata:
name: {{ .Release.Name }}
rules:
- apiGroups: [""]
resources: ["pods", "pods/log", "events", "nodes"]
resources: ["events", "nodes", "nodes/proxy", "pods", "pods/log", "persistentvolumeclaims"]
verbs: ["get", "watch", "list"]
- apiGroups: ["apps"]
resources: ["daemonsets", "statefulsets", "deployments", "replicasets"]
verbs: ["get", "watch", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1
Expand Down
6 changes: 6 additions & 0 deletions deploy/chart/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@ kind: ServiceAccount
metadata:
name: {{ .Release.Name }}
namespace: {{ .Release.Namespace }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- with .Values.sacAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}

2 changes: 2 additions & 0 deletions deploy/chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ affinity: {}

podAnnotations: {}

sacAnnotations: {}

podLabels: {}

# kwatch configuration
Expand Down
7 changes: 5 additions & 2 deletions deploy/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ metadata:
name: kwatch
rules:
- apiGroups: [""]
resources: ["pods", "pods/log", "events", "nodes"]
resources: ["events", "nodes", "nodes/proxy", "pods", "pods/log", "persistentvolumeclaims"]
verbs: ["get", "watch", "list"]
- apiGroups: ["apps"]
resources: ["daemonsets", "statefulsets", "deployments", "replicasets"]
verbs: ["get", "watch", "list"]
---
apiVersion: v1
Expand Down Expand Up @@ -49,7 +52,7 @@ spec:
serviceAccountName: kwatch
containers:
- name: kwatch
image: ghcr.io/abahmed/kwatch:v0.10.0
image: ghcr.io/abahmed/kwatch:v0.10.1
imagePullPolicy: Always
volumeMounts:
- name: config-volume
Expand Down

0 comments on commit 65f5878

Please sign in to comment.