[doc]: https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher Per this Go modules [doc] a repo or branch that's already tagged v2 or higher should increment the major version (e.g. go to v3) when releasing their first Go module-based packages. At the moment, the kustomize repo has these top level packages in the sigs.k8s.io/kustomize module: - `cmd` - holds main program for kustomize Conceivably someone can depend on this package for integration tests. - `internal` - intentionally unreleased subpackages - `k8sdeps` - an adapter wrapping k8s dependencies This exists only for use in pre-Go-modules kustomize-into-kubectl integration and won't live much longer (as everything involved is switching to Go modules). - `pkg` - kustomize packages for export This should shrink in later versions, since the surface area is too large, containing sub-packages that should be in 'internal'. - `plugin` - holds main programs for plugins This PR changes the top level go.mod file from ``` module sigs.k8s.io/kustomize ``` to ``` module sigs.k8s.io/kustomize/v3 ``` and adjusts all import statements to reflect the change.
English | 简体中文
示例
这些示例默认 kustomize 在您的 $PATH 中。
这些示例通过了 pre-commit 测试,并且应该与 HEAD 一起使用。
go get sigs.k8s.io/kustomize/v3/cmd/kustomize
基本用法
-
configGenerations - 当 ConfigMapGenerator 修改时进行滚动更新。
-
combineConfigs - 融合来自不同用户的配置数据(例如来自 devops/SRE 和 developers)。
-
generatorOptions -修改所有 ConfigMapGenerator 和 SecretGenerator 的行为。
-
vars - 通过 vars 将一个资源的数据注入另一个资源的容器参数 (例如,为 wordpress 指定 SQL 服务)。
-
image names and tags - 在不使用 patch 的情况下更新镜像名称和标签。
-
remote target - 通过 github URL 来构建 kustomization 。
-
json patch -在 kustomization 中应用 json patch 。
高级用法
-
generator 插件:
-
last mile helm - 对 helm chart 进行 last mile 修改。
-
secret generation - 生成 Secret。
-
-
定制内建 transformer 配置
- transformer configs - 自定义 transformer 配置。
多 Variant 示例
-
hello world - 部署多个不同配置的 Hello World 服务。
-
LDAP - 部署多个配置不同的 LDAP 服务。
-
springboot - 从头开始创建一个 Spring Boot 项目的生产配置。
-
mySql - 从头开始创建一个 MySQL 的生产配置。
-
breakfast - 给 Alice 和 Bob 定制一顿早餐 :)
-
multibases - 使用相同的 base 生成三个 variants(dev,staging,production)。
声明:部分文档可能稍微滞后于英文版本,同步工作持续进行中