containerbuilding / cbi

Container Builder Interface for Kubernetes with support for several backends (Docker, BuildKit, Buildah, kaniko, img, Google Cloud Container Builder, Azure Container Registry Build, OpenShift Source-to-Image...)
Apache License 2.0
243 stars 18 forks source link

Push to registry not working #82

Open badri opened 5 years ago

badri commented 5 years ago

After installing cbi in my cluster, I configured the following buildjob.

apiVersion: cbi.containerbuilding.github.io/v1alpha1
kind: BuildJob
metadata:
  name: django-s2i
spec:
  registry:
    target: registry.example.com/django/django-s2i:1.0
    push: true
  language:
    kind: S2I
    s2i:
      baseImage: lakshminp/django-alpine-s2i:1.0
  context:
    kind: Git
    git:
      url: https://gitlab.com/badri1/django-k8s-demo

The s2i build gets triggered but the image does not get pushed.

Build completed successfully
+ [ 1 = 1 ]
+ docker push registry.new-pine-ec5b.shapeblock.cloud/django/django-s2i:1.0
The push refers to repository [registry.example.com/django/django-s2i]
Get https://registry.example.com/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

My registry is configured with https and is currently unauthenticated.

badri commented 5 years ago

Just wanted to add some context, it always works the 3rd time. Not sure why this is the case.

NAME                       READY   STATUS      RESTARTS   AGE
django-s2i-1.1-job-g6kkz   0/1     Error       0          6m24s
django-s2i-1.1-job-lbfqf   0/1     Error       0          4m47s
django-s2i-1.1-job-rxlsl   0/1     Completed   0          2m31s
django-s2i-job-c5ttt       0/1     Error       0          16m
django-s2i-job-gn564       0/1     Error       0          15m
django-s2i-job-lrhpj       0/1     Completed   0          12m