kubesphere / notification-manager

K8s native notification management with multi-tenancy support
Apache License 2.0
224 stars 66 forks source link

if AWS is supported as the provider for SMS services #140

Closed Bennu-Li closed 2 years ago

Bennu-Li commented 2 years ago

I saw in the notification-manager documentation that the provider supports huawei, aliyun, tencent when the receiver is SMS. I would like to know if AWS is currently supported as the provider for SMS services.

https://github.com/kubesphere/notification-manager/blob/master/docs/crds/receiver.md#sms-receiver

wanjunlei commented 2 years ago

Not yet supported.

benjaminhuo commented 2 years ago

@Bennu-Li You're welcome to create a PR to support AWS SMS

Bennu-Li commented 2 years ago

Hi, I'd love to create a pr to support AWS SMS. But I'm not familiar with the source code for this project, and I might need some help, as well as trying to understand the amount of work required to implement this feature.

wanjunlei commented 2 years ago

Thank you for supporting our community. I will briefly introduce how to support AWS SMS.

First, you need to modify the Config CRD, and add an SMS provider of AWS. At the same time, it is necessary to add the verification of the AWS provider like this.

Second, modify the internal SMS Config.

Then, you can find the implementation of sending notifications to aliyun SMS here, you can follow this to implement sending notifications to AWS SMS.

Bennu-Li commented 2 years ago

modify the internal SMS Config verification of the AWS provider like this.

The description is very detailed and I already have a general understanding of how this feature is implemented.

But the link you provided for the verification of provider and the internal SMS Config are the same, I'm not sure that's it?

wanjunlei commented 2 years ago

Yes, both places need to be modified.

wanjunlei commented 2 years ago

modify the internal SMS Config verification of the AWS provider like this.

The description is very detailed and I already have a general understanding of how this feature is implemented.

But the link you provided for the verification of provider and the internal SMS Config are the same, I'm not sure that's it?

Sorry, the second link is this

Bennu-Li commented 2 years ago

Okay, I'll start implementing this feature this week.

Bennu-Li commented 2 years ago

Hi, how should I quickly test the AWS Sms module I added. Is there an example of a relevant unit test, such as for Aliyun Sms?

benjaminhuo commented 2 years ago

@zhu733756 , how did you test SMS for tecent/aliyun/huawei before?

zhu733756 commented 2 years ago

Add the related CRs, checking the message from SMS provider. You can also debug the process locally.

Bennu-Li commented 2 years ago

debug the process locally. How to debug it locally? Can you give me some details?

zhu733756 commented 2 years ago

If you use vscode, you can use ssh-remote plugin.

benjaminhuo commented 2 years ago

or use nocalhost to debug k8s apps