https://github.com/mxk/go-pkgsite
Helm chart for a private pkg.go.dev documentation server
https://github.com/mxk/go-pkgsite
Last synced: 3 months ago
JSON representation
Helm chart for a private pkg.go.dev documentation server
- Host: GitHub
- URL: https://github.com/mxk/go-pkgsite
- Owner: mxk
- Created: 2024-04-20T13:16:54.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-05T04:44:47.000Z (about 1 year ago)
- Last Synced: 2024-05-05T14:25:44.939Z (about 1 year ago)
- Language: Go
- Size: 182 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Private pkg.go.dev server Helm chart
This [Helm] chart runs [golang/pkgsite][pkgsite] backed by [gomods/athens][athens] to provide a private documentation server that can access protected repositories.
[helm]: https://helm.sh/
[pkgsite]: https://github.com/golang/pkgsite
[athens]: https://github.com/gomods/athens## Setup
### Deployment
```
helm upgrade -i go-pkgsite oci://registry-1.docker.io/mxkh/go-pkgsite
```See [chart/values.yaml][values] for customization options.
If deploying on Rancher Desktop, ensure that both Kubernetes and Traefik are enabled in [preferences].
[values]: https://github.com/mxk/go-pkgsite/blob/main/chart/values.yaml
[preferences]: https://docs.rancherdesktop.io/ui/preferences/kubernetes/### Private server credentials
Server-specific credentials can be supplied in a custom `values.yaml` file as follows:
```
private:
- host: gitlab.example.com
username: myusername
password: mytoken
- host: github.example.com
username: mytoken
```To deploy: `helm upgrade -i go-pkgsite oci://registry-1.docker.io/mxkh/go-pkgsite -f values.yaml`
To avoid storing passwords in `values.yaml`, provide them on the command line using `--set-string private[0].password=...`.
### Ingress TLS
Ingress TLS key and certificate can be configured via: `helm upgrade -i go-pkgsite oci://registry-1.docker.io/mxkh/go-pkgsite -f values.yaml --set-file tlsKey=key.pem,tlsCrt=crt.pem`
## Known Issues
### .netrc support
As of May 2024, [pkgsite] does not handle `.netrc` credentials, leading to [invalid links to source files][60299]. To work around this (without forking pkgsite), the chart runs a custom proxy server that intercepts all `?go-get=1` requests from `frontend` and injects the appropriate credentials. This has been tested with a private GitLab instance, but may cause problems for other installations.
[60299]: https://github.com/golang/go/issues/60299
## Release publication
TODO: Automate
1. Update dependencies: `helm dependency update chart`
2. Bump version in `chart/Chart.yaml`.
3. Create and tag release commit.
4. Rebuild Docker image: `docker build --no-cache -t mxkh/go-pkgsite -t mxkh/go-pkgsite:-alpine .`
* Version tag must have a suffix to differentiate it from the OCI Helm package.
5. Push Docker image: `docker push mxkh/go-pkgsite mxkh/go-pkgsite:-alpine`
6. Package and push chart: `helm package chart && helm push go-pkgsite-*.tgz oci://registry-1.docker.io/mxkh`