-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
x509: certificate signed by unknown authority #1961
Comments
Thanks for filing! This should be relatively straightforward to create a field for and passing it to kaniko. PRs are welcome! |
Not 100% sure this is a feature request, as #1870 should have already allowed insecure registries to be used. |
Ahhh, fair enough - I misunderstood, you're right, this is more of a bug / gap for kaniko. We should pass the |
My go is pretty rusty so won't be able to send a PR. |
I took a quick stab at this (#1977) but have no idea if this even solves the issue -- running it to see if it works and adding a test would be wonderful! :) Edit: I've added tests... now to see if this actually solves the issue. 😁 |
@jimanvlad would you be able to try my patch? (I'm done changing it just not sure how to set stuff up to verify it fixes the issue.) |
Sure, where can I get a macOS binary from? |
I just built this but might be issues since I just used Alternatively, you can try to reproduce what appveyor does maybe? (https://ci.appveyor.com/project/balopat/skaffold/builds/23948844) Something like:
|
Hi, I used your provided binary and added:
to the |
I need to figure out a way to test this myself but in the meantime, if you could try something like |
Hi, This is what gets sent:
|
I will try to set up kaniko this weekend since I've wanted to play with it and will try to get back to you by then to avoid wasting your time. :) |
Your help is greatly appreciated and I'm happy to test any further changes :) |
Hey @jimanvlad we are now passing in insecure registries to kaniko as of #2266. Could you try with the latest release and see if it fixes your issue? |
Hi, happy to check. Is this in the released binaries or do I have to build from source? |
The latest release should incorporate this change! |
Thanks, I am getting a different error not but not sure if it's related or not.
This is with the following config:
And docker login works fine:
|
I think this fell through the cracks a little bit - #1977 got closed due to inactivity, and I can't see how #2266 pipes insecure registries definition to kaniko - maybe I'm missing something, @priyawadhwa? Also just a sanity check @jimanvlad - do you have the insecure registries defined in your global config? |
Looks like we need to pass in the following flags to kaniko here if we are pushing to one of the insecure registries listed here:
Alternatively, we could add these flags to KanikoArtifact and have the user set them manually in the skaffold config. Personally I prefer the first option. @jimanvlad, would you be interested in opening a PR for this? |
I started looking into this stay tuned on #2809 |
Thank you @jimanvlad. we are actively working on this issue and share an update soon. |
Thanks for your help, I stand ready to test further updates. |
Thanks @jimanvlad - @priyawadhwa took over - she is our local kaniko expert. |
I was able to recreate the error in GoogleContainerTools#1961 by using a kaniko image without a cert & pushing to an unauthenticated registry in Cloud Run. Adding this flag resolves that bug.
I was able to recreate the error in GoogleContainerTools#1961 by using a kaniko image without a cert & pushing to an unauthenticated registry in Cloud Run. Adding this flag resolves that bug.
Hey @jimanvlad I just merged #2976 -- could you try installing the bleeding edge binary of skaffold and adding the new artifacts:
- image: artifactory.xx.xx.com/data/my-image
context: src
kaniko:
buildContext:
localDir: {}
skipTLS: true please let us know if this does or doesn't resolve your issue! |
@priyawadhwa im also getting the x509 unknown authority. The strange thing is, the error pops up before the kaniko pod starts. It looks like skaffold is doing some sanity check on the repositories defined in the Dockerfile. Such as cache. |
This fix worked for me, thank you! |
Great, thanks @jimanvlad ! |
@jiminvlad does your base image that you have used in your Dockerfile are in the same registry with self signed certs? Thanks. |
Yep, base image pulled in from a private artifactory registry.
…On Sat, 12 Oct 2019 at 00:32, balchua ***@***.***> wrote:
@jiminvlad does your base images that you have used in your Dockerfile are
in the same registry with self signed certs?
Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1961?email_source=notifications&email_token=AARJEZUUOBFUU67KY35CHC3QOEEKPA5CNFSM4HGBXGQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBBOTGQ#issuecomment-541256090>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARJEZVPATQLY2BOL43CWD3QOEEKPANCNFSM4HGBXGQQ>
.
|
Thanks @jimanvlad. I wonder where could i be wrong. |
does skaffold-jib provide skipTLS label or other things to deploy app on k8s cluster with |
@chanRoot this is unrelated to your question, but I'd like to point out that you probably don't want to set |
Expected behavior
The error in the title shouldn't occur if repo is added to the insecure registries.
Actual behavior
Information
Steps to reproduce the behavior
kaniko.flags is also deprecated so there is no way to use kaniko's --skip-tls-verify-registry
The text was updated successfully, but these errors were encountered: