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

Add example with init container fetching context for non-GCS remote contexts #121

Open
r2d4 opened this issue Apr 18, 2018 · 6 comments
Open
Labels
area/documentation For all bugs related to documentation area/usability For all bugs related to how people use kaniko, option and feature flags, etc help wanted Looking for a volunteer! kind/feature-request

Comments

@r2d4
Copy link
Contributor

r2d4 commented Apr 18, 2018

Kaniko can work without needing to fetch the remote context itself. This would open the workflow to non-GCS remote contexts.

  1. Init container with with whatever auth helpers needed (gcloud, aws-cli) and credentials mounted in. Downloads context to shared volume
  2. Kaniko container reads locally downloaded context

Alternatively, we could just target the S3 compatible API, which is supported by GCP and AWS. We'd need a more generic way of getting passing credentials (I think?)

@AkihiroSuda
Copy link
Contributor

https://github.com/graymeta/stow seems providing abstract interface for GCS, S3, Azure storage, Swift, and Oracle storage.

@alexellis
Copy link

alexellis commented Jul 18, 2018

Hi @r2d4 I would be interested in this feature for using Minio or similar within a hybrid/on-premise solution.

Would fetching from a Git repo over SSH/HTTPs be within scope?

Alex

@priyawadhwa
Copy link
Collaborator

Hey @alexellis , I think that would be within scope since Docker allows for Github repos as build contexts.

Could you open a separate issue for this? It'll be easier to keep track of, and if you're interested in contributing this feature I can provide more details!

@alexellis
Copy link

alexellis commented Jul 19, 2018

This is how I did it via a Gist + init container. https://gist.github.com/alexellis/87d732a4b5fe056f5bf903aa6e6437ed

It'd be far cleaner within kaniko - I'd also be interested in some details, but am unsure if I can commit to contribute it until I get CLA approved and can size the work.

Alex

@jfrabaute
Copy link
Contributor

Hi,

In our CI/CD environment, we are using gerrit and we can get the tar.gz of a particular commit from an https url.
kaniko does not allow using random https urls, as https:// scheme is checked against azure urls:

https://github.com/GoogleContainerTools/kaniko/blob/master/pkg/buildcontext/buildcontext.go#L61

What is the reason to limit https urls to Azure? Could the check for Azure url pattern be revmoed so any https url is accepted?

@aaron-prindle aaron-prindle added the area/usability For all bugs related to how people use kaniko, option and feature flags, etc label Jul 4, 2023
@jidaojiuyou
Copy link

why not support http in internal net

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation For all bugs related to documentation area/usability For all bugs related to how people use kaniko, option and feature flags, etc help wanted Looking for a volunteer! kind/feature-request
Projects
None yet
Development

No branches or pull requests

9 participants