module
Version:
v0.1.3
Opens a new window with list of versions in this module.
Published: Aug 20, 2023
License: Apache-2.0
Opens a new window with license information.
README
¶
GitLab GoProxy
This project contains an implementation of the GOPROXY
protocol that stores data in the GitLab Generic Package Repository.
Getting started
- In GitLab, create a project that you intend on using to store packages.
We recommend creating a new project otherwise it will make it hard to find any pre-existing packages.
- Create a project or group access token with the
api
scope.
- Create a Kubernetes secret using the token we just created:
export GOPROXY_TOKEN=<token we just got>
kubectl create secret generic goproxy-token --from-literal=token=$GOPROXY_TOKEN
- Create a
values.yaml
file with at least the following:
gitlab:
url: https://gitlab.example.com
projectId: 123 # numeric ID of the project we created
tokenSecretRef:
name: goproxy-token
key: token
There's plenty more that can be figured, but we will leave that as an exercise to the reader.
- Deploy the application:
helm install goproxy ./chart/gitlab-goproxy -f values.yaml
We recommend using a GitOps tool (e.g., FluxCD, ArgoCD) rather than doing this manually.
Usage
Once the application has been deployed, using it is as simple as setting the GOPROXY
environment variable:
export GOPROXY="https://goproxy.example.org"
go mod download
Directories
¶
cmd
|
|
|
|
internal
|
|
|
|
|
|
Click to show internal directories.
Click to hide internal directories.