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

Can't deploy Zarf package built with images from insecure repo #561

Closed
acdop100 opened this issue Jun 24, 2022 · 11 comments
Closed

Can't deploy Zarf package built with images from insecure repo #561

acdop100 opened this issue Jun 24, 2022 · 11 comments

Comments

@acdop100
Copy link

Environment
Device and OS: 2019 MacBook Pro, i9 16gb RAM, Big Sur 11.6
App version: 0.19.5
Kubernetes distro being used: minikube
Other:

Steps to reproduce

  1. zarf package create --insecure
  2. zarf package deploy --insecure

Expected result

Package deployment

Actual Result

  ✔  Creating port forwarding tunnel available at http://127.0.0.1:45001                                                                                                                        
DEBUG   config.GetSecret(registry-push)                                                                                                                                                       
DEBUG   0x2c36f40                                                                                                                                                                             
DEBUG   parsing reference "127.0.0.1:45001/zarfregistrytest:5000/gateway:latest": could not parse reference: 127.0.0.1:45001/zarfregistrytest:5000/gateway:latest                             
ERROR:  Unable to push the image to the registry

Visual Proof (screenshots, videos, text, etc)

Screen Shot 2022-06-24 at 10 48 24 AM

Severity/Priority

Additional Context

Zarf successfully packages the images (or so it appears) with zarf package create. Unfortunately I cannot deploy the package on the same machine the package is created on. I haven't tried a separate machine but I would expect the same result.

If the Zarf package contains images that were not pulled from the local reg (i.e. docker hub) it copies those fine; it only fails when it tries to copy the local images. It doesn't matter if the images were built locally, tagged, and pushed to the registry or pulled from outside, tagged, and pushed to local registry (tested with busybox).

@jeff-mccoy
Copy link
Contributor

Looking at this, it looks like the issues is in the image path rewrite on deploy, it's not accounting for the alternate port properly.

@acdop100
Copy link
Author

Is there a way for me to fix this? Or mitigate it for now?

@jeff-mccoy
Copy link
Contributor

Looking at it now

@jeff-mccoy
Copy link
Contributor

jeff-mccoy commented Jun 24, 2022

quick question--do you see the same issue if you have a dotted host portion: 127.0.0.1 or somedomain.test for example? Part of the issue here is that docker allows implicit dockerhub paths so it's hard to determine if gitea/gitea:tag is on dockerhub or actually on a server called gitea.

@jeff-mccoy
Copy link
Contributor

For reference, here's the regex used to find the parts: https://regex101.com/r/PiL191/1. You can add your own entries to test there.

@acdop100
Copy link
Author

I'm reinstalling some dev tools, so i'll test them as soon as I can. I am simultaneously about to test my package in a linux VM and see if that performs any differently. If it does i'll be pretty confused.

@JasonvanBrackel
Copy link
Contributor

@acdop100 @jeff-mccoy I this stale, fixed or need a 2nd look?

@JasonvanBrackel
Copy link
Contributor

Whoever picks this up start with #666

@JasonvanBrackel JasonvanBrackel moved this from Backlog to Doing Now in Zarf Project Board Sep 15, 2022
@JasonvanBrackel
Copy link
Contributor

@YrrepNoj Assigning you since you're working #666

@jeff-mccoy
Copy link
Contributor

We should verify this is still an issue after the next release that includes #876

@YrrepNoj YrrepNoj removed their assignment Nov 25, 2022
jeff-mccoy added a commit that referenced this issue Feb 2, 2023
Migrated from #1191

## Description
Adding support for insecure flag for external registry in `zarf init`.
Fixing `zarf package create` and `zarf package deploy` failures with
external self signed cert registry as mentioned in
#1190 and
#1181

## Related Issue

Fixes # #1190
Fixes # #1181
Fixes # #561
Fixes # #1015

---------

Co-authored-by: Rishi <[email protected]>
@Racer159
Copy link
Contributor

Fixed in #1280

@github-project-automation github-project-automation bot moved this from Doing Now to Done in Zarf Project Board Feb 13, 2023
Noxsios pushed a commit that referenced this issue Mar 8, 2023
Migrated from #1191

## Description
Adding support for insecure flag for external registry in `zarf init`.
Fixing `zarf package create` and `zarf package deploy` failures with
external self signed cert registry as mentioned in
#1190 and
#1181

## Related Issue

Fixes # #1190
Fixes # #1181
Fixes # #561
Fixes # #1015

---------

Co-authored-by: Rishi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants