对齐文件规范

This commit is contained in:
2026-03-27 16:58:41 +08:00
parent 231b6713c4
commit 31709425e2
235 changed files with 5433 additions and 2850 deletions

View File

@@ -0,0 +1,38 @@
# 03-01 Traefik DashboardHelmChartConfig + IngressRoute
# 部署kubectl apply -f traefik-dashboard.yaml或复制到 K3s server/manifests/
---
apiVersion: helm.cattle.io/v1 # HelmChartConfig 所在的 API 版本
kind: HelmChartConfig # HelmChartConfig给 K3s/Traefik chart 注入 values
metadata: # 该资源标识
name: traefik # chart 对应的对象名
namespace: kube-system # HelmChartConfig 所在命名空间
spec: # Helm 注入配置
valuesContent: |- # 以“字符串形式的 YAML”注入到 chart values由 chart 解析)
ports: # entrypoint/端口暴露相关配置
web: # HTTP entrypoint
expose: true # 启用 web 暴露
websecure: # HTTPS entrypoint
expose: true # 启用 websecure 暴露
traefik: #chart 内部traefik dashboard/管理端口暴露(按 chart 约定)
expose: true # 启用 traefik 管理端口暴露
additionalArguments: # 额外传给 Traefik 的 CLI 参数
- "--api.dashboard=true" # 开启 dashboard 功能
- "--api.insecure=true" # 允许 dashboard 在入口可用(不建议在公网直接放行)
---
apiVersion: traefik.io/v1alpha1 # IngressRoute 的 API 版本
kind: IngressRoute # Traefik 的路由 CRD
metadata: # IngressRoute 标识
name: traefik-dashboard # 资源名
namespace: kube-system # IngressRoute 所在命名空间
spec: # 路由规则
entryPoints: # 进入的 entrypoint
- web # 使用 webHTTP入口
routes: # 路由列表
- match: PathPrefix(`/dashboard`) || PathPrefix(`/api`) # 匹配 /dashboard 或 /api 前缀
kind: Rule # 匹配规则类型Rule
services: # 匹配到后转发给的服务列表
- name: api@internal # Traefik 内置 API 服务
kind: TraefikService # 该服务的 CRD 类型