kwatch
kwatch copied to clipboard
pods are not functioning properly
I am running in k8s built on a physical machine. When I create it according to the readme, the pod cannot run normally
[root@node1 kwatch]# kubectl get pod,cm -n kwatch -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
pod/kwatch-6d8646995d-485qt 0/1 CrashLoopBackOff 8 24m 10.244.10.82 node4 <none> <none>
NAME DATA AGE
configmap/kwatch 1 29m
[root@node1 kwatch]#
I didn't make any changes to deploy.yaml file I only changed config.yaml file and received alerts using Telegram Below is my config.yaml file
apiVersion: v1
kind: Namespace
metadata:
name: kwatch
---
apiVersion: v1
kind: ConfigMap
metadata:
name: kwatch
namespace: kwatch
data:
config.yaml: |
ignoreFailedGracefulShutdown: true
alert:
telegram:
token: 5207405246:AAE6_pOIjC065T9agYg9xsePrfwZR8yuggU
chatId: 1732858888
The pod is restarting continuously, the log is as follows:
[root@node1 kwatch]# kubectl logs -f kwatch-6d8646995d-485qt -n kwatch
time="2022-03-29T11:37:02Z" level=info msg=":tada: [email protected] just started!"
time="2022-03-29T11:37:02Z" level=info msg="using config file: /config/config.yaml"
panic: interface conversion: interface {} is int, not string
goroutine 1 [running]:
github.com/abahmed/kwatch/util.GetProviders()
/build/util/util.go:135 +0x12c5
main.main()
/build/main.go:36 +0x1f3
[root@node1 kwatch]#
Event information is:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 25m default-scheduler Successfully assigned kwatch/kwatch-6d8646995d-485qt to node4
Normal Pulled 25m kubelet Successfully pulled image "ghcr.io/abahmed/kwatch:v0.5.0" in 2.161757876s
Normal Pulled 25m kubelet Successfully pulled image "ghcr.io/abahmed/kwatch:v0.5.0" in 2.517168612s
Normal Pulled 24m kubelet Successfully pulled image "ghcr.io/abahmed/kwatch:v0.5.0" in 2.838614125s
Normal Created 24m (x4 over 25m) kubelet Created container kwatch
Normal Pulled 24m kubelet Successfully pulled image "ghcr.io/abahmed/kwatch:v0.5.0" in 7.035699291s
Normal Started 24m (x4 over 25m) kubelet Started container kwatch
Normal Pulling 23m (x5 over 25m) kubelet Pulling image "ghcr.io/abahmed/kwatch:v0.5.0"
Warning BackOff 7s (x101 over 25m) kubelet Back-off restarting failed container
My kubernetes cluster version is v1.19.4. OS version is CentOS Linux release 7.6.1810 (Core) I don't know what's causing it please give me an answer, thanks
I solved the problem as follows by adding single quotes😂😂🤣🤣 @abahmed
apiVersion: v1
kind: Namespace
metadata:
name: kwatch
---
apiVersion: v1
kind: ConfigMap
metadata:
name: kwatch
namespace: kwatch
data:
config.yaml: |
ignoreFailedGracefulShutdown: true
alert:
telegram:
token: '5207405246:AAE6_pOIjC065T9agYg9xsePrfwZR8yuggU'
chatId: '1732858888'
By the way, this is a very good project, but it is not applicable in China, because the Chinese network has a firewall, and applications such as slack telegram cannot communicate, so I chose this project It is also a good choice to use Dingding for communication. It is recommended to add Dingding for communication or email. @abahmed
@happinesslijian Can you open an issue to support Dingding? We will try to support it ASAP
@abahmed sorry i just saw the message now i turned it on