Files
Deploy-Laboratory/ansible/files/03-01-traefik-dashboard/traefik-dashboard.yaml
jack 8c43761962 feat: 按 doc_id 重组 ansible/files 与验证框架
- ansible/files 改为与文档 XX-YY 对齐的目录结构,更新相关 playbook 路径
- 新增 scripts/verify.sh 与 ansible/playbooks/verify/*.yml,移除单体 verify-matrix.yml
- 补充 docs/00-02 矩阵状态、00-05 验证框架与流程、00-04 环境与 ylc65 工作机说明
- 增加 k3s 存储准备、Longhorn、local-path 等 playbook 与辅助脚本

Made-with: Cursor
2026-03-26 07:01:14 +08:00

39 lines
1.8 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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 类型