kubeless
kubeless copied to clipboard
Allow dependencies from a Private go module
Is this a BUG REPORT or FEATURE REQUEST?: Feature Request :)
What happened: Unable to use a private go module for a golang kubeless function
What you expected to happen: Able to supply credentials or an ssh key for fetching private go modules when building.
How to reproduce it (as minimally and precisely as possible):
- We need to set the
GOPRIVATE
env var in the compile container (this is possible today AFAIK) - Be able to retrieve credentials when compiling
- configure git to use these credentials in compile-function.sh:
- HTTP:
-
git config --global url."https://${username}:${access_token}@github.com".insteadOf "https://github.com"
-
git config --global url."https://${bitbucket_user_id}:${bitbucket_access_token}@privatebitbucket.com".insteadOf "https://privateaccount.com"
-
- SSH:
-
git config --global url."ssh://[email protected]/".insteadOf "https://github.com/"
-
git config --global --replace-all url."[email protected]:".insteadOf "https://privataccount.com"
-
- HTTP:
Then when the go get
commands are called when pulling the dependencies, the private repos should be registered correctly.
I can take a stab at a super dumb version of this, but the the runtime build is failing at present.
Related Issues
#1075