kubeless icon indicating copy to clipboard operation
kubeless copied to clipboard

Allow external dependencies from private repositories

Open tim-hellhake opened this issue 4 years ago • 6 comments

Is this a BUG REPORT or FEATURE REQUEST?: FEATURE REQUEST

What happened: I have to use external dependencies which are stored in a private maven repository.

What you expected to happen: An option in the cli to provide custom maven settings with the needed credentials.

How to reproduce it (as minimally and precisely as possible): Include a dependency in the pom which is stored in a password protected maven repository.

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version): v1.14.3

  • Kubeless version (use kubeless version): v1.0.4

  • Cloud provider or physical cluster: EKS cluster

tim-hellhake avatar Aug 21 '19 21:08 tim-hellhake

hi @tim-hellhake, how do you usually set this configuration?

andresmgot avatar Aug 22 '19 08:08 andresmgot

Thanks for the quick reaction! The credentials for the maven repositories are usually saved in the settings.xml in the local .m2 directory.

tim-hellhake avatar Aug 22 '19 08:08 tim-hellhake

have you tried to create a zip file with your function and that file? doing that, that file will be available when installing dependencies.

andresmgot avatar Aug 22 '19 10:08 andresmgot

The problem is the settings file has to be in a specific location for maven to pick it up.

tim-hellhake avatar Aug 26 '19 22:08 tim-hellhake

I see, then it's needed to adapt the compilation script to have that into account:

https://github.com/kubeless/runtimes/blob/master/stable/java/compile-function.sh

Let me know if you can give it a try.

andresmgot avatar Aug 27 '19 08:08 andresmgot

I'll try to build a custom image and see if it works. But I think a new CLI parameter for a settings file would be a much cleaner solution.

tim-hellhake avatar Sep 01 '19 18:09 tim-hellhake