【问题标题】:understandinf openshift source strategy了解 openshift 源码策略
【发布时间】:2021-03-10 23:38:35
【问题描述】:

关于 BuildConfig YAML 代码如下:

source:
 git:
  ref: TCPuniverse-patch-1
  uri: 'https://github.com/TCPuniverse/simple-webapp.git'
 type: Git
strategy:
 sourceStrategy:
  from:
    kind: ImageStreamTag
    name: 'python:3.6'
    namespace: openshift
output:
  to:
    kind: ImageStreamTag
    name: 'tpython-app-1:latest'

我们不应该在构建 > 图像页面中看到“python:3.6”图像流标签吗? 策略部分的“命名空间:openshift”是什么意思?

【问题讨论】:

    标签: openshift openshift-origin okd minishift redhat-containers


    【解决方案1】:

    策略部分中的“命名空间:openshift”是什么意思?

    这意味着,https://github.com/TCPuniverse/simple-webapp.git 源将使用openshift 项目中的python:3.6 图像流标签构建。并且构建的镜像会在 buildconfig 定义的项目中以tpython-app-1:lates imagestream 的形式推送。

    【讨论】:

    • 我在 OKD 中的项目名称是“my-project-1”。我试图将“命名空间:openshift”更改为“命名空间:my-project-1”以匹配我自己的项目名称,但它抱怨图像流标签,所以我尝试创建“python:3.6”图像流选项卡;我收到另一个错误,指向“python:3.6”中的无效字符。如果“命名空间:openshift”指向项目名称,那么为什么会出现这些错误?为什么图像流标签中没有显示“python:3.6”?
    • 有什么帮助吗?我还是卡在这里。我将 sourceStrategy / from / namespace 从“openshift”更改为我的项目名称,但它不起作用。虽然它在此更改之前有效,但为什么呢?如果这不是我的项目名称,“命名空间:openshift”是什么意思?!
    • 你能帮我解决这个问题吗?
    • AFAIK,好的,在openshift 项目中提供 python s2i 图像作为 ImageStream。您可以使用oc get is python -n openshift 进行检查。有关 python s2i 的详细信息,请参阅 here。并使用oc describe is python -n openshift 检查 python ImageStreamTag 3.6 是否存在。如果它不存在,您可以尝试使用现有的其他版本构建。
    猜你喜欢
    • 1970-01-01
    • 2018-12-10
    • 2014-10-27
    • 2016-06-01
    • 2012-08-22
    • 1970-01-01
    • 1970-01-01
    • 2010-09-12
    • 2015-12-17
    相关资源
    最近更新 更多