feat: add more services

This commit is contained in:
Sun-ZhenXing
2026-02-23 18:10:02 +08:00
parent 2544127de2
commit 530e6d7f5d
48 changed files with 2895 additions and 2 deletions

15
src/rocketmq/Makefile Normal file
View File

@@ -0,0 +1,15 @@
HELM_RELEASE_NAME ?= rocketmq
HELM_APPLICATION_NAME ?= rocketmq
HELM_NAMESPACE ?= rocketmq
HELM_DIR ?= ./helm
HELM_CHART_VERSION ?=
HELM_VALUES_FILE ?= ./values.yaml
HELM_OCI_REGISTRY ?=
HELM_OCI_NAMESPACE ?=
HELM_OCI_USERNAME ?=
HELM_OCI_PASSWORD ?=
HELM_REPO_NAME ?= rocketmq
HELM_REPO_URL ?= https://apache.github.io/rocketmq-helm
HELM_CHART_REPO ?= $(HELM_REPO_NAME)/$(HELM_APPLICATION_NAME)
include ../_template/base.mk

72
src/rocketmq/README.md Normal file
View File

@@ -0,0 +1,72 @@
# Apache RocketMQ
## Introduction
Apache RocketMQ is a distributed messaging and streaming platform with low latency, high performance and reliability, trillion-level capacity and flexible scalability.
This Helm chart deploys Apache RocketMQ on Kubernetes, including NameServer, Broker, and Console components.
## Installation
To install RocketMQ, run:
```bash
make install
```
## Usage
After installation:
```bash
# Check if RocketMQ components are running
kubectl get pods -n rocketmq
# Port forward to access NameServer
kubectl port-forward svc/rocketmq-nameserver -n rocketmq 9876:9876
# Port forward to access Console (if enabled)
kubectl port-forward svc/rocketmq-console -n rocketmq 8080:8080
```
## Configuration
The default configuration includes:
- 2 NameServer replicas for high availability
- 1 Broker master with 1 slave (2m-2s sync_flush)
- Console for management UI
- Persistent storage for message data
## Components
- **NameServer**: Service discovery and routing
- **Broker**: Message storage and delivery
- **Console**: Web UI for management and monitoring
## Client Connection
```java
Properties props = new Properties();
props.setProperty("namesrvAddr", "rocketmq-nameserver.rocketmq:9876");
DefaultMQProducer producer = new DefaultMQProducer("TestProducer", props);
```
## Storage
Configure persistent storage for brokers:
```yaml
broker:
storage:
size: 50Gi
class: standard
```
## Uninstall
To uninstall RocketMQ:
```bash
make uninstall
```

72
src/rocketmq/README.zh.md Normal file
View File

@@ -0,0 +1,72 @@
# Apache RocketMQ
## 简介
Apache RocketMQ 是一个分布式消息和流平台,具有低延迟、高性能和可靠性、万亿级容量和灵活的扩展性。
此 Helm Chart 在 Kubernetes 上部署 Apache RocketMQ包括 NameServer、Broker 和 Console 组件。
## 安装
安装 RocketMQ
```bash
make install
```
## 使用
安装完成后:
```bash
# 检查 RocketMQ 组件是否运行
kubectl get pods -n rocketmq
# 端口转发以访问 NameServer
kubectl port-forward svc/rocketmq-nameserver -n rocketmq 9876:9876
# 端口转发以访问 Console如果启用
kubectl port-forward svc/rocketmq-console -n rocketmq 8080:8080
```
## 配置
默认配置包括:
- 2 个 NameServer 副本用于高可用
- 1 个 Broker master 和 1 个 slave (2m-2s sync_flush)
- 用于管理 UI 的 Console
- 消息数据的持久存储
## 组件
- **NameServer**: 服务发现和路由
- **Broker**: 消息存储和传递
- **Console**: 管理和监控的 Web UI
## 客户端连接
```java
Properties props = new Properties();
props.setProperty("namesrvAddr", "rocketmq-nameserver.rocketmq:9876");
DefaultMQProducer producer = new DefaultMQProducer("TestProducer", props);
```
## 存储
为 broker 配置持久存储:
```yaml
broker:
storage:
size: 50Gi
class: standard
```
## 卸载
卸载 RocketMQ
```bash
make uninstall
```

53
src/rocketmq/values.yaml Normal file
View File

@@ -0,0 +1,53 @@
# Apache RocketMQ Configuration
# https://github.com/apache/rocketmq-helm
# NameServer configuration
nameserver:
replicas: 2
resources:
requests:
cpu: 200m
memory: 512Mi
limits:
cpu: 500m
memory: 1Gi
# Broker configuration
broker:
size:
master: 1
replica: 1
replicas:
master: 1
slave: 1
resources:
requests:
cpu: 500m
memory: 1Gi
limits:
cpu: 1000m
memory: 2Gi
persistence:
enabled: true
size: 20Gi
# Console configuration
console:
enabled: true
replicas: 1
service:
type: ClusterIP
port: 8080
# Service configuration
service:
nameserver:
type: ClusterIP
port: 9876
broker:
type: ClusterIP
# Image configuration
image:
repository: apache/rocketmq
tag: 5.1.4