使用GitOps原则与管理工作流
一、GitOps与Flux配置
1. 配置Flux
Flux是一个部署在集群内并从Git仓库分支拉取变更的工具。我们可以基于示例(https://github.com/fluxcd/flux/tree/master/deploy)来准备Flux系统,相关配置文件在Chapter08/flux子目录中,主文件是flux - deployment.yaml。其中部分内容定义了要拉取的仓库信息:
# Replace the following URL to change the Git repository used by Flux.
- --git-url=git@github.com:PacktPublishing/Hands-On-Docker-for-
Microservices-with-Python.git
- --git-branch=master
# Include this if you want to restrict the manifests considered by flux
# to those under the following relative paths in the git repository
- --git-path=Chapter08/example
这些配置指定了Flux使用的仓库、分支和路径。若路径被注释,则使用整个仓库。我们使用flux命名空间来部署这些元素,也可根据情况使用主命名空间或默认命名空间。使用Flux的操作步骤如下:
1. 创建命名空间:
超级会员免费看
订阅专栏 解锁全文
1509

被折叠的 条评论
为什么被折叠?



