kubesphere / kubesphere/notification-manager
Receiver is not recognized by NMs deployed in other namespaces because certificate issues
- Dominant language
- Go
- Stars
- 240
- Forks
- 116
- PR merge metrics
- No merged PRs in 30d
Description
Is the certificate used by NM [here](https://github.com/kubesphere/notification-manager/blob/master/config/cert/webhook-server-cert.yaml)?

```bash
~]# kubectl get pod,svc -n monitoring | grep notif
pod/notification-manager-deployment-7bffdfc9f-f99jh 1/1 Running 0 34m
pod/notification-manager-operator-7cc9c59c75-fr759 2/2 Running 0 35m
service/notification-manager-controller-metrics ClusterIP 10.109.222.237 8443/TCP 35m
service/notification-manager-svc ClusterIP 10.107.83.81 19093/TCP 34m
service/notification-manager-webhook ClusterIP 10.110.101.226 443/TCP 35m
~]# kubectl apply -f receiver-global.yaml
Error from server (InternalError): error when creating "receiver-global.yaml": Internal error occurred: failed calling webhook "vreceiver.notification.kubesphere.io": failed to call webhook: Post "https://notification-manager-webhook.monitoring.svc:443/validate-notification-kubesphere-io-v2beta2-receiver?timeout=10s": x509: certificate is valid for notification-manager-webhook.kubesphere-monitoring-system.svc, not notification-manager-webhook.monitoring.svc
```
When deployed in other clusters, the following error will occur
```bash
Error from server (InternalError): error when creating "receiver-global.yaml": Internal error occurred: failed calling webhook "vreceiver.notification.kubesphere.io": failed to call webhook: Post "https://notification-manager-webhook.monitoring.svc:443/validate-notification-kubesphere-io-v2beta2-receiver?timeout=10s": x509: certificate is valid for notification-manager-webhook.kubesphere-monitoring-system.svc, not notification-manager-webhook.monitoring.svc
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with config/cert/webhook-server-cert.yaml and the receiver-global.yaml deployment described in the report. Reproduce the failure with kubectl apply and inspect the webhook certificate names against the namespace used by notification-manager-webhook; done means Receiver creation succeeds for deployments in other namespaces and clusters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- backend, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100