我无法找到一种命名空间可移植的方法来将图像构建到图像流中,然后可以将其用于OpenShift 项目命名空间中的作业,而无需在作业配置中对内部注册表 URL 进行硬编码。
与部署配置不同,作业配置不会自动构建具有内部注册表正确图像 URL 的 pod 配置。由于无法拉取映像,因此生成的作业永远不会运行。
Failed to pull image "is-copy-adaptermappings": Error: image library/is-copy-adaptermappings:latest not found
Run Code Online (Sandbox Code Playgroud)
...
containers:
- name: i2b2-webclient
image: >-
172.30.1.1:5000/c2/is-i2b2-webclient@sha256:51460a7b65ddd8cc32e41e9a3ac069efb587220364edc9285d06438b22e2ea47
ports:
- containerPort: 8080
protocol: TCP
...
Run Code Online (Sandbox Code Playgroud)
apiVersion: v1
kind: Pod
...
containers:
- name: copy-config-to-pv
image: is-copy-adaptermappings
resources: {}
volumeMounts:
...
Run Code Online (Sandbox Code Playgroud)
{
"apiVersion": "batch/v1",
"kind": "Job",
"metadata": {
"name": "configpod"
},
"spec": {
"parallelism": 1,
"completions": 1,
"template": {
"metadata": { …Run Code Online (Sandbox Code Playgroud) 由于凭证超时,我在可靠地运行云构建触发器时遇到问题。
我已在 Google Cloud Build 中设置了 Google Cloud DevOps 项目,并使用我的私有 GitHub 存储库对触发器进行了身份验证。我的私有 GitHub 存储库具有 Cloud Build GitHub 应用程序集成。
我的 Cloud Build 触发器工作了一段时间,无论自动运行还是手动运行都运行良好。
几个小时后,我开始在触发器执行中遇到错误:
...
FETCHSOURCE
Initialized empty Git repository in /workspace/.git/
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com...
Run Code Online (Sandbox Code Playgroud)
为了尝试解决此问题,我使用 Cloud Build 触发器页面断开连接,然后重新连接并使用我的私有 GitHub 存储库重新进行身份验证。存储库管理页面显示重新身份验证成功,但在运行触发器时仍然收到“无效的用户名或密码”错误。
我对私有存储库身份验证的工作方式有什么遗漏吗?我是否缺少其他自动刷新 Cloud Build 身份验证的设置?