kpack icon indicating copy to clipboard operation
kpack copied to clipboard

Patch builder with different container registry's image tag won't make builder status to false

Open zhoufenqin opened this issue 1 year ago • 1 comments

I want to change the container registry for builder images. so I update the builder, and change the builder with a new image tag. It will cost some time to sync the builder and push the image to the new container registry, but during processing, the builder status.condition.status still shows true

new image tag: acr3a48afe6946a4485a.azurecr.io/test old image tag: fenzho0314.azurecr.io/test

apiVersion: kpack.io/v1alpha2
kind: Builder
metadata:
  annotations:
   ...
  name: default.fenzhoacr.1
spec:
  ...
  tag: acr3a48afe6946a4485a.azurecr.io/test
status:
  conditions:
  - lastTransitionTime: "2023-03-21T10:45:35Z"
    status: "True"
    type: Ready
 - latestImage: fenzho0314.azurecr.io/test.....
> k get builder -o go-template='{{range .items}}{{.metadata.name}} {{.spec.tag}} {{index .status.conditions}} {{index .status.latestImage}} &{{end}}' | tr '&' '\n'

default.fenzhoacr.1 acr3a48afe6946a4485a.azurecr.io/test [map[lastTransitionTime:2023-03-21T10:45:35Z status:True type:Ready]] fenzho0314.azurecr.io/test@sha256:c2ac0184ba3e15da5118a7a7a781d643af77bd06f8f502ec31e658a0954fff9a

If so, I can't determine if the builder has already migrate to new container registry, why not set status to false when patch the builder. actually, it's processing by kpack-controller and the new image will be push to the new container registry later.

zhoufenqin avatar Mar 21 '23 10:03 zhoufenqin