godoc-operator

module
v0.0.0-...-7815aac Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2022 License: Apache-2.0

README

Godoc Operator

This repository contains a Kubernetes operator that deploys Godoc servers to a k8s cluster and sets up Services and Ingresses to access them. pkg.go.dev already does this (with a better UI), but it cannot generate documentation for private repositories on Github. By using this operator, you can write a few lines of yaml and deploy a godoc server that can access your private repos and serve documentation for them.

Use it

I've so far only tested on minikube. In order for minikube to get locally-built docker images, run eval $(minikube docker-env). The deployment files are already setup to not pull remote images.

Run

$ make helm-install

to deploy everything. It

  • builds the operator docker image
  • builds the godoc server docker image
  • creates a godoc namespace where everything is placed
  • deploys the CRD
  • deploys the operator along with rbac permissions it needs
  • creates a Secret containing your Github PAT; uses the environment variable $PERSONAL_GITHUB_TOKEN

To see it work, run

$ kubectl -n godoc apply -f k8s/sample-repo.yaml

Note that this won't work for you as the sample references my private repo. You'll need to change the repo to a URL you have access to (public or private).

Directories

Path Synopsis
cmd
internal
api/v1alpha1
Package v1alpha1 contains API Schema definitions for the godoc v1alpha1 API group +kubebuilder:object:generate=true +groupName=godoc.rpflynn22.io
Package v1alpha1 contains API Schema definitions for the godoc v1alpha1 API group +kubebuilder:object:generate=true +groupName=godoc.rpflynn22.io

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL