gpt4 book ai didi

image - openshift imagestream 不跟踪私有(private) docker repo

转载 作者:行者123 更新时间:2023-12-02 18:15:45 25 4
gpt4 key购买 nike

我有一个定义如下的图像流,带有 openshift 原点。当我在 openshift 中创建、导入或更新图像流对象时,它会自动获取 docker repo 中定义的任何标签。当我通过 docker(即 docker push <private-repo-host-and-port>/myimage )推送图像时,图像流不会使用 docker 中的新图像进行更新。我必须手动更新图像流或重新导入或重新创建它。此外,我还有一个 openshift build设置,它输出到图像流,当构建成功完成时,它会将构建的输出图像推送到私有(private) docker repo,但除非我重新,否则图像流不会接收到这一点导入或更新或重新创建图像流 - 它不会自动执行。我已经设置了部署配置以获取镜像流的更新,并且它会在镜像流更新时触发新的部署,但我必须手动更新镜像流。

当基于它的支持私有(private) docker repo 更新时,如何让图像流自动更新?

apiVersion: v1
kind: ImageStream
metadata:
name: isname
namespace: mynamespace
labels:
deployment-id: master
name: isname
namespace: mynamespace
spec:
dockerImageRepository: '<private-repo-host-and-port>/myimage'
tags:
- name: latest
from:
kind: DockerImage
name: '<private-repo-host-and-port>/myimage:latest'
importPolicy:
scheduled: true

让我知道是否需要其他配置

最佳答案

读:

  • https://blog.openshift.com/image-streams-faq/

  • 6: How can I tell the system to periodically import my tag? When we are working with an external registry, we would like to be able to periodically re-import the image to get latest security updates, etc. To do so we will use a --scheduled flag for the oc tag command like so:

    oc tag docker.io/python:3.6.0 python:3.6 --scheduled

    This will inform the system that this particular Image Stream Tag should be periodically checked for updates. Currently, this period is a cluster-wide setting, and by default, it is set to 15 minutes.

    Only an Image Stream Tag pointing to an external docker registry can be periodically checked for updates.

    To remove the periodical check, re-run above command but omit the --scheduled flag. This will reset its behavior to default

    关于image - openshift imagestream 不跟踪私有(private) docker repo,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45355021/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com