This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.5.11.6. init
operator-sdk init 命令初始化 Operator 项目,并为给定插件生成或 scaffolds 默认项目目录布局。
这个命令会写入以下文件:
- boilerplate 许可证文件
-
带有域和库的
PROJECT文件 -
构建项目的
Makefile -
go.mod文件带有项目依赖项 -
用于自定义清单的
kustomization.yaml文件 - 用于为管理器清单自定义镜像的补丁文件
- 启用 Prometheus 指标的补丁文件
-
运行的
main.go文件
| 标记 | 描述 |
|---|---|
|
|
|
|
|
插件的名称和可选版本,用于初始化项目。可用插件包括 |
|
|
项目版本。可用值为 |