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/apisix/Makefile Normal file
View File

@@ -0,0 +1,15 @@
HELM_RELEASE_NAME ?= apisix
HELM_APPLICATION_NAME ?= apisix
HELM_NAMESPACE ?= apisix
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 ?= apisix
HELM_REPO_URL ?= https://apache.github.io/apisix-helm-chart
HELM_CHART_REPO ?= $(HELM_REPO_NAME)/$(HELM_APPLICATION_NAME)
include ../_template/base.mk

70
src/apisix/README.md Normal file
View File

@@ -0,0 +1,70 @@
# Apache APISIX
## Introduction
Apache APISIX is a dynamic, real-time, high-performance API gateway. It provides rich traffic management features such as load balancing, dynamic upstream, canary release, circuit breaking, authentication, observability, and more.
## Installation
To install APISIX, run:
```bash
make install
```
## Usage
After installation, access APISIX:
```bash
# Port forward to access Admin API
kubectl port-forward svc/apisix-admin -n apisix 9180:9180
# Access Admin API
curl http://localhost:9180/apisix/admin/routes -H 'X-API-Key: edd1c9f034335f136f87ad84b625c8f1'
```
Default Admin API key: `edd1c9f034335f136f87ad84b625c8f1`
## Configuration
The default configuration includes:
- APISIX server with Admin API enabled
- etcd as configuration storage
- Dashboard (if enabled)
- Ingress Controller (if enabled)
## Components
- **APISIX**: Core API gateway server
- **etcd**: Configuration storage backend
- **Dashboard**: Web UI for management (optional)
- **Ingress Controller**: Kubernetes ingress support (optional)
## Creating Routes
Example route configuration:
```bash
curl http://localhost:9180/apisix/admin/routes/1 \
-H 'X-API-Key: edd1c9f034335f136f87ad84b625c8f1' \
-X PUT -d '
{
"uri": "/hello",
"upstream": {
"type": "roundrobin",
"nodes": {
"127.0.0.1:1980": 1
}
}
}'
```
## Uninstall
To uninstall APISIX:
```bash
make uninstall
```

70
src/apisix/README.zh.md Normal file
View File

@@ -0,0 +1,70 @@
# Apache APISIX
## 简介
Apache APISIX 是一个动态、实时、高性能的 API 网关。它提供丰富的流量管理功能,如负载均衡、动态上游、灰度发布、熔断、认证、可观测性等。
## 安装
安装 APISIX
```bash
make install
```
## 使用
安装完成后,访问 APISIX
```bash
# 端口转发以访问 Admin API
kubectl port-forward svc/apisix-admin -n apisix 9180:9180
# 访问 Admin API
curl http://localhost:9180/apisix/admin/routes -H 'X-API-Key: edd1c9f034335f136f87ad84b625c8f1'
```
默认 Admin API 密钥:`edd1c9f034335f136f87ad84b625c8f1`
## 配置
默认配置包括:
- 启用 Admin API 的 APISIX 服务器
- etcd 作为配置存储
- Dashboard如果启用
- Ingress Controller如果启用
## 组件
- **APISIX**: 核心 API 网关服务器
- **etcd**: 配置存储后端
- **Dashboard**: 管理 Web UI可选
- **Ingress Controller**: Kubernetes 入口支持(可选)
## 创建路由
路由配置示例:
```bash
curl http://localhost:9180/apisix/admin/routes/1 \
-H 'X-API-Key: edd1c9f034335f136f87ad84b625c8f1' \
-X PUT -d '
{
"uri": "/hello",
"upstream": {
"type": "roundrobin",
"nodes": {
"127.0.0.1:1980": 1
}
}
}'
```
## 卸载
卸载 APISIX
```bash
make uninstall
```

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

@@ -0,0 +1,53 @@
# Apache APISIX Configuration
# https://github.com/apache/apisix-helm-chart
# APISIX server configuration
apisix:
enabled: true
image:
repository: apache/apisix
tag: 3.9.0
replicaCount: 1
resources:
requests:
cpu: 500m
memory: 512Mi
limits:
cpu: 1000m
memory: 1Gi
# Admin API configuration
admin:
enabled: true
port: 9180
credentials:
admin: edd1c9f034335f136f87ad84b625c8f1
viewer: 4054f7cf07e344346cd3f287985e76a2
# Proxy configuration
proxy:
http:
enabled: true
port: 9080
tls:
enabled: false
# etcd configuration
etcd:
enabled: true
replicaCount: 1
resources:
requests:
cpu: 200m
memory: 256Mi
limits:
cpu: 500m
memory: 512Mi
# Dashboard configuration (disabled by default)
dashboard:
enabled: false
# Ingress Controller configuration (disabled by default)
ingress-controller:
enabled: false