Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kaniko: Add ability to push to on-premise registries #613

Closed
IlyaPokamestov opened this issue Apr 14, 2019 · 0 comments · Fixed by #1084
Closed

Kaniko: Add ability to push to on-premise registries #613

IlyaPokamestov opened this issue Apr 14, 2019 · 0 comments · Fixed by #1084
Assignees
Labels
area/build-operator Related to the internal image build operator
Milestone

Comments

@IlyaPokamestov
Copy link

IlyaPokamestov commented Apr 14, 2019

I've tried to install Kamel on my on-premise Kubernetes cluster with custom docker registry using next command:
kamel install -n kamel --registry=my.registry.com --registry-secret=regcred

Registry secret was created using Kubernetes guid: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/

It's obviously lead to registry connection error, because "registry-secret" parameter requires GKE service account json key as described here: https://github.com/GoogleContainerTools/kaniko#kubernetes-secret

In the logs I can see:

MacBook-Pro:kamel darioswain$ kubectl logs camel-k-jvm -n kamel
INFO[0000] Downloading base image fabric8/s2i-java:3.0-java8 
2019/04/13 21:51:29 No matching credentials were found, falling back on anonymous
INFO[0006] Found sha256:9ac5acb3aa8e7e179eb1fd28cda7dac22ef7deac24f00b50cee56265fa259141 in local cache 
INFO[0006] Executing 0 build triggers                   
INFO[0007] Using files from context: [/workspace/builder-966534887/package/context] 
INFO[0007] Taking snapshot of full filesystem...        
INFO[0008] Skipping paths under /kaniko, as it is a whitelisted directory 
INFO[0008] Skipping paths under /var/run, as it is a whitelisted directory 
INFO[0008] Skipping paths under /secret, as it is a whitelisted directory 
INFO[0008] Skipping paths under /proc, as it is a whitelisted directory 
INFO[0008] Skipping paths under /sys, as it is a whitelisted directory 
INFO[0008] Skipping paths under /dev, as it is a whitelisted directory 
INFO[0008] Skipping paths under /workspace, as it is a whitelisted directory 
INFO[0008] Using files from context: [/workspace/builder-966534887/package/context] 
INFO[0008] ADD . /deployments                           
INFO[0008] Taking snapshot of files...                  
error pushing image: failed to push to destination my.registry.com/kamel/camel-k-jvm:8536073: no token in bearer response:
{"error":"You need to sign in or sign up before continuing."}

I've just firstly found this project and definitely may have a wrong understanding. But I can't find possibility how I can use custom docker registry as described in the Kaniko docs here: https://github.com/GoogleContainerTools/kaniko#pushing-to-different-registries
Kaniko allows to provide custom docker config.json via Kubernetes config map with custom auths.

I will be very appreciated if someone knows how to deal with custom registries or can share any kind of workarounds how to setup them.

BTW: I've opened a PR with possible solution based on the Kaniko Doc: #614, but I'm not a Go expert and need an assistance with it, in case when PR direction is right.

@nicolaferraro nicolaferraro added this to the 1.0.0 milestone May 23, 2019
@nicolaferraro nicolaferraro added area/core Core features of the integration platform area/build-operator Related to the internal image build operator and removed area/core Core features of the integration platform labels May 28, 2019
@nicolaferraro nicolaferraro modified the milestones: 1.0.0, 1.0.0-M5 Nov 13, 2019
@nicolaferraro nicolaferraro self-assigned this Nov 22, 2019
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Nov 23, 2019
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Nov 23, 2019
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Nov 23, 2019
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Nov 23, 2019
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Nov 23, 2019
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Nov 26, 2019
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Nov 26, 2019
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Nov 26, 2019
nicolaferraro added a commit to nicolaferraro/camel-k that referenced this issue Nov 27, 2019
astefanutti pushed a commit that referenced this issue Nov 28, 2019
astefanutti pushed a commit that referenced this issue Nov 28, 2019
astefanutti pushed a commit that referenced this issue Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build-operator Related to the internal image build operator
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants