wanjunlei
我就按照官网上写的:
Deploy the default WechatConfig and a global WechatReceivers:
cat <<EOF | kubectl apply -f -
apiVersion: notification.kubesphere.io/v1alpha1
kind: WechatConfig
metadata:
name: default-wechat-config
namespace: kubesphere-monitoring-system
labels:
app: notification-manager
type: default
spec:
wechatApiUrl: < wechat-api-url >
wechatApiSecret:
key: wechat
name: < wechat-api-secret >
wechatApiCorpId: < wechat-api-corp-id >
wechatApiAgentId: < wechat-api-agent-id >
---
apiVersion: notification.kubesphere.io/v1alpha1
kind: WechatReceiver
metadata:
name: global-wechat-receiver
namespace: kubesphere-monitoring-system
labels:
app: notification-manager
type: global
spec:
# wechatConfigSelector needn't to be configured for a global receiver
# optional
# One of toUser, toParty, toParty should be specified.
toUser: < wechat-user >
toParty: < wechat-party >
toTag: < wechat-tag >
---
apiVersion: v1
data:
wechat: dGVzdA==
kind: Secret
metadata:
labels:
app: notification-manager
name: < wechat-api-secret >
namespace: kubesphere-monitoring-system
type: Opaque
EOF
toUser: < wechat-user >这个地方我写的是wechatApiCorpId