azure-devops - Kustomize Azure Devops 文件夹结构
问题描述
我正在尝试构建跨越多个 Azure Devops git 存储库的 kustomize 对象层次结构。我有许多微服务,它们的配置可以压缩成少量的基本 yaml 文件。我希望每个微服务存储库都有自己的 yaml 文件,这些文件在应用程序更新时对其进行版本控制。
我知道 kustomize 使用 go-getter (hashicorp) 来提取资源,如果它们被赋予一个 git url 的基础。但是,我无法弄清楚与 Azure Devops Git 一起使用的正确语法来拉下一个包含 kustomize 文件的子文件夹。问题不在于身份验证,而在于 Azure devops 喜欢路径子文件夹的方式。它喜欢使它们成为 url 变量而不是在路径中。
以下是我尝试过的一些示例:
go-getter https://<pat-user>:<pat-token>@<tenant>.visualstudio.com/<project>/_git/<repo>/tree/master/base//<folder-i-want> .
go-getter https://<pat-user>:<pat-token>@dev.azure.com/<tenant>/<project>/_git/<repo>/trees/master/base//<folder-i-want> .
go-getter https://<pat-user>:<pat-token>@dev.azure.com/<tenant>/<project>/_git/<repo>/base//<folder-i-want>?version=test-tag .
所有结果都来自 Azure Devops 的 404。
我相信我需要知道在 Azure Devops 中引用子文件夹的正常“git”方式。
解决方案
正如我在评论中指出的那样,我不得不以不同的方式思考它。一开始只得把子文件夹往下几个层次。此外,需要强制 go-getter 知道它应该在这个 azure devops url 上使用 git。
这个赢了。
git::https://<tenant>.visualstudio.com/<project>/_git/<repo>//<first subfolder>/<folder I want>
推荐阅读
- algorithm - 需要帮助模拟基本导弹 - 目标模拟(算法 - 首选 Qbasic)
- git - git rebase -i HEAD~2 的问题
- graphql - 如何从 graphql 查询的 Contentful 内容类型获取 SYS 数据?
- ios - 为什么我取消选中内容布局指南后通过了自动布局检查
- django - django - 数据库中预设的数据,但无法通过 Model.objects.all()/Admin 查看
- python-3.x - 无法使用 Python 3 将 MessageAttributes 发送到 AWS SQS
- dax - DAX 中的 CASE 语句转换
- javascript - 将对象数组转换为对象中的值数组
- python - 使用多处理时加入进程是否有顺序规则?
- c# - 如何在 Epson FX-890 打印机上打印重音字符并保留打印机控制序列?