aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/namespaces/monitoring/kubewatch
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2023-08-13 20:01:42 +0100
committerGravatar Chris Lovering <[email protected]>2023-08-14 11:44:03 +0100
commit661f49409e69f5cfafbef4cd41411a72ebc5418d (patch)
tree9ddd7f2a2ab09cadc5b716be00628e19d839ad4d /kubernetes/namespaces/monitoring/kubewatch
parentAllow multiple documents within yaml files (diff)
Copy all files from kubernetes repo into this one
This commit is a like-for-like copy of the [kubernetes repo](https://github.com/python-discord/kubernetes) check that repo for comit history prioir to this commit. Co-authored-by: Amrou Bellalouna <[email protected]> Co-authored-by: Bradley Reynolds <[email protected]> Co-authored-by: Chris <[email protected]> Co-authored-by: Chris Lovering <[email protected]> Co-authored-by: ChrisJL <[email protected]> Co-authored-by: Den4200 <[email protected]> Co-authored-by: GDWR <[email protected]> Co-authored-by: Hassan Abouelela <[email protected]> Co-authored-by: Hassan Abouelela <[email protected]> Co-authored-by: jchristgit <[email protected]> Co-authored-by: Joe Banks <[email protected]> Co-authored-by: Joe Banks <[email protected]> Co-authored-by: Joe Banks <[email protected]> Co-authored-by: Johannes Christ <[email protected]> Co-authored-by: Kieran Siek <[email protected]> Co-authored-by: kosayoda <[email protected]> Co-authored-by: ks129 <[email protected]> Co-authored-by: Leon Sand├©y <[email protected]> Co-authored-by: Leon Sand├©y <[email protected]> Co-authored-by: MarkKoz <[email protected]> Co-authored-by: Matteo Bertucci <[email protected]> Co-authored-by: Sebastiaan Zeeff <[email protected]> Co-authored-by: Sebastiaan Zeeff <[email protected]> Co-authored-by: vcokltfre <[email protected]>
Diffstat (limited to 'kubernetes/namespaces/monitoring/kubewatch')
-rw-r--r--kubernetes/namespaces/monitoring/kubewatch/README.md3
-rw-r--r--kubernetes/namespaces/monitoring/kubewatch/configmap.yaml34
-rw-r--r--kubernetes/namespaces/monitoring/kubewatch/deployment.yaml32
-rw-r--r--kubernetes/namespaces/monitoring/kubewatch/secrets.yamlbin0 -> 316 bytes
-rw-r--r--kubernetes/namespaces/monitoring/kubewatch/service-account.yaml30
5 files changed, 99 insertions, 0 deletions
diff --git a/kubernetes/namespaces/monitoring/kubewatch/README.md b/kubernetes/namespaces/monitoring/kubewatch/README.md
new file mode 100644
index 0000000..294c666
--- /dev/null
+++ b/kubernetes/namespaces/monitoring/kubewatch/README.md
@@ -0,0 +1,3 @@
+# Kubewatch
+
+> **kubewatch** is a Kubernetes watcher that currently publishes notification to available collaboration hubs/notification channels. Run it in your k8s cluster, and you will get event notifications through webhooks.
diff --git a/kubernetes/namespaces/monitoring/kubewatch/configmap.yaml b/kubernetes/namespaces/monitoring/kubewatch/configmap.yaml
new file mode 100644
index 0000000..902cfbc
--- /dev/null
+++ b/kubernetes/namespaces/monitoring/kubewatch/configmap.yaml
@@ -0,0 +1,34 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: kubewatch-config
+ namespace: monitoring
+data:
+ .kubewatch.yaml: |
+ namespace: ""
+ handler:
+ discord:
+ webhook: ""
+ ignores:
+ - pixels-discord-channel
+ - cert-manager-cainjector-leader-election
+ - cert-manager-controller
+ - ingress-controller-leader-nginx
+ - cluster-autoscaler-status
+ - ingress-controller-leader
+ resource:
+ deployment: true
+ replicationcontroller: true
+ replicaset: true
+ daemonset: true
+ services: true
+ pod: true
+ job: true
+ node: false
+ clusterrole: true
+ serviceaccount: true
+ persistentvolume: true
+ namespace: true
+ secret: true
+ configmap: true
+ ingress: true
diff --git a/kubernetes/namespaces/monitoring/kubewatch/deployment.yaml b/kubernetes/namespaces/monitoring/kubewatch/deployment.yaml
new file mode 100644
index 0000000..a674648
--- /dev/null
+++ b/kubernetes/namespaces/monitoring/kubewatch/deployment.yaml
@@ -0,0 +1,32 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: kubewatch
+ namespace: monitoring
+spec:
+ selector:
+ matchLabels:
+ app: kubewatch
+ template:
+ metadata:
+ labels:
+ app: kubewatch
+ spec:
+ serviceAccountName: kubewatch
+ containers:
+ - image: ghcr.io/python-discord/kubewatch:latest
+ imagePullPolicy: Always
+ name: kubewatch
+ volumeMounts:
+ - name: config-volume
+ mountPath: /root
+ envFrom:
+ - secretRef:
+ name: kubewatch-secrets
+ securityContext:
+ readOnlyRootFilesystem: true
+ restartPolicy: Always
+ volumes:
+ - name: config-volume
+ configMap:
+ name: kubewatch-config
diff --git a/kubernetes/namespaces/monitoring/kubewatch/secrets.yaml b/kubernetes/namespaces/monitoring/kubewatch/secrets.yaml
new file mode 100644
index 0000000..7427da2
--- /dev/null
+++ b/kubernetes/namespaces/monitoring/kubewatch/secrets.yaml
Binary files differ
diff --git a/kubernetes/namespaces/monitoring/kubewatch/service-account.yaml b/kubernetes/namespaces/monitoring/kubewatch/service-account.yaml
new file mode 100644
index 0000000..f0748ba
--- /dev/null
+++ b/kubernetes/namespaces/monitoring/kubewatch/service-account.yaml
@@ -0,0 +1,30 @@
+---
+kind: ClusterRole
+apiVersion: rbac.authorization.k8s.io/v1
+metadata:
+ name: kubewatch
+ namespace: monitoring
+rules:
+- apiGroups: ["", "extensions", "apps", "batch", "rbac.authorization.k8s.io", ]
+ resources: ["*"]
+ verbs: ["get", "watch", "list"]
+---
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: kubewatch
+ namespace: monitoring
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+ name: kubewatch
+ namespace: monitoring
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: ClusterRole
+ name: kubewatch
+subjects:
+ - kind: ServiceAccount
+ name: kubewatch
+ namespace: monitoring