Files
helmfile/README-zh_CN.md
T
yxxhero e703b15075 docs: restructure documentation and improve newcomer experience (#2573)
* feat: add --write-output flag to helmfile fetch for air-gapped environments

Add --write-output flag to helmfile fetch that outputs a modified
helmfile.yaml with chart references updated to point to downloaded
local chart paths. Combined with --output-dir, this enables preparing
all charts for deployment in air-gapped environments.

Usage:
  helmfile fetch --output-dir ./charts --write-output > helmfile-airgapped.yaml

Fixes #2571

Signed-off-by: yxxhero <yxxhero@users.noreply.github.com>
Signed-off-by: yxxhero <aiopsclub@163.com>

* docs: restructure documentation and improve newcomer experience

Split the monolithic index.md (1990 lines) into focused topic pages,
update mkdocs.yml navigation, and add missing documentation for
undocumented code features.

Structure changes:
- Extract configuration.md (helmfile.yaml reference)
- Extract cli.md (CLI commands and flags)
- Extract templating.md (template syntax and env vars)
- Extract environments.md (environment configuration)
- Extract releases.md (DAG, needs, selectors)
- Extract hooks.md (lifecycle hooks)
- Extract integrations.md (ArgoCD, Azure ACR, OCI)
- Slim index.md to ~270 line landing page with step-by-step tutorial

Newcomer improvements:
- Add 5-step Getting Started tutorial with explanations
- Reorganize nav: Getting Started now shows core learning path
  (Writing Helmfile → Values → Environments → Releases)
- Add Quick Reference table to configuration.md
- Simplify writing-helmfile.md title

Code-vs-docs gap fixes:
- Document 23 undocumented release fields (valuesTemplate,
  setTemplate, forceNamespace, adopt, trackMode, etc.)
- Document 6 undocumented helmDefaults fields (enableDNS,
  forceConflicts, skipRefresh, takeOwnership, etc.)
- Document print-env command and missing CLI flags
- Document kubectlApply hook field
- Document environment defaults field and merge order
- Document kubedogQPS/kubedogBurst advanced settings
- Document template partials (_*.tpl) auto-loading

Cleanup:
- Fix Docker image version from v0.156.0 to v1.1.0
- Fix heading nesting in advanced-features.md
- Update experimental-features.md with current features
- Fix broken cross-references and anchor links

Signed-off-by: yxxhero <aiopsclub@163.com>

* Revert changes to pkg/app from docs/restructure-and-improve branch

Signed-off-by: yxxhero <aiopsclub@163.com>

* docs: add create subcommand to README and CLI reference

Signed-off-by: yxxhero <aiopsclub@163.com>

---------

Signed-off-by: yxxhero <yxxhero@users.noreply.github.com>
Signed-off-by: yxxhero <aiopsclub@163.com>
2026-05-03 19:33:33 +08:00

5.4 KiB
Raw Blame History

Helmfile

Tests Container Image Repository on GHCR Go Report Card Slack Community #helmfile Documentation Gurubase zread

声明式Helm Chart管理工具

English | [简体中文]

关于

Helmfile 是一个声明式Helm Chart管理工具

Helmfile 项目已经从原仓库 roboll/helmfile 转移到了 helmfile/helmfile。有关更多信息,请参见 roboll/helmfile#1824

特性

  • 通过一个YAML集中管理集群中多个Helm Chart, 类似于Docker Compose统一管理Docker
  • 对Helm Chart根据部署环境区分管理
  • Helm Chart版本控制,比如指定版本范围、锁定某一版本
  • 快速识别 Kubernetes 集群内已经部署应用与新更改之间的差异
  • Helmfile支持Go Templates语法定义Helm Chart
  • 在部署阶段支持配置hook,可以执行脚本等,实现变量远程获取,报错清理,成功提醒等

安装

方式1: 二进制安装

下载 releases

方式2: 包管理工具

  • Archlinux: pacman -S helmfile
  • openSUSE: zypper in helmfile
  • Windows: (scoop): scoop install helmfile
  • macOS (homebrew): brew install helmfile

方式3: 容器

详细见:run as a container

安装后请运行一次 helmfile init。 检查helm-diff 等插件安装正确。

方式4: 源码安装

依赖: Go

go install github.com/helmfile/helmfile@latest

使用

让我们从最简单的 helmfile 开始,逐渐改进它以适应您的用例!

使用脚手架命令生成具有最佳实践目录结构的项目:

helmfile create my-project && cd my-project

或者手动创建 helmfile.yaml。假设表示您 helm releases 的期望状态的 helmfile.yaml 看起来像这样:

repositories:
- name: prometheus-community
  url: https://prometheus-community.github.io/helm-charts

releases:
- name: prom-norbac-ubuntu
  namespace: prometheus
  chart: prometheus-community/prometheus
  set:
  - name: rbac.create
    value: false

通过运行来同步您的Kubernetes集群状态到期望状态:

helmfile apply

恭喜!您现在已经在集群内部运行了第一个Prometheus部署。

文档

Documentation

参与贡献

欢迎贡献! 让我们一起使helmfile变得更好:贡献指南

使用者

Helmfile 已经被许多用户在生产环境中使用:

更多用户请参见: Users

License

MIT

Star History

Star History Chart