- Python 56.8%
- Shell 43.2%
| base | ||
| instancetemplate | ||
| .gitignore | ||
| ExampleResourceQuotas.yaml | ||
| get-and-make-image-list.sh | ||
| image-mirror.py | ||
| own-cas-for-go.md | ||
| Readme.md | ||
Forgejo on OKD / Openshift or gubernat with kustomize
Special config for forgejo running in an OKD / OpenShift cluster with Route elements and Namespace Resourcequotas, or in gubernat with Ingresses.
The method is complete GitOps based:
- create an instance repo (look at the instancetemplate directory)
- use this repo as submodule of the instance repo
- make your customizings
- if your in a disconnected scenario mirror the helm chart and the used images (use case: disconnected installation)
internet connected installation
- make an instance repo for your installation based on the description in ./instancetemplate/Readme.md
disconnected installation
If your cluster is disconnected, you have to mirror the correct images in your local registry.
(Skopeo has to be installed)
-
make an instance repo for your installation based on the description in ./instancetemplate/Readme.md without the last step (dpeloyment in your cluster)
-
on an Internet connected host:
-
get the helm chart:
-
Method 1: push the oci helm in your local registry:
# login to your registry helm registry login registry.local.lan --insecure # pull the gzipped tar from original helm pull oci://code.forgejo.org/forgejo-helm/forgejo --version=11.0.5 # push the helm repo to your registry (org=myorg) helm push forgejo-11.0.5.tgz oci://registry.local.lan/myorg/forgejo-helm --insecure-skip-tls-verify -
Method 2: get the helm chart local and use it from repo
- pull forgejo helm:
helm pull oci://code.forgejo.org/forgejo-helm/forgejo --untar --untardir charts/ - modify the upper level
kustomization.yamlso that you get the chart from this directory
- pull forgejo helm:
-
-
get the images and push them in your local registry:
# go to instance directory cd forgejo-instance-directory # get the image list and generate imagelist.csv and imagemirror.add.yaml ./forgejo-okd/get-and-make-image-list.sh mylocalregistry.mynetwork.lan/mymirrorproject # login to your local registry skopeo login mylocalregistry.mynetwork.lan --tls-verify=false # get and push images ./forgejo-okd/image-mirror.py -v imagelist.csv
-
-
add the contents of
imagemirror.add.yamlto the end of thekustomization.yaml -
apply it to your cluster:
oc kustomize --enable-helm | oc apply -f -
Addendum
- The master admin is
forgejoadminlike defined (password down there) in the secret
You can change the password in the secret on the cluster and then restart the pods to make it happen
Peter Pfläging <peter@pflaeging.net>