kubesphere / kubesphere/notification-manager

Receiver is not recognized by NMs deployed in other namespaces because certificate issues

Open
#144 0 comments 0 reactions 0 assignees View on GitHub
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)?

![image](https://user-images.githubusercontent.com/39847025/168244117-05e9cb0f-6d0c-416a-be1c-795a4e01ecfe.png)

```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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.