No description
| config | ||
| external-access | ||
| LICENSE | ||
| README.md | ||
forgejo-helm-deploy
Background
Forgejo (as a fork of Gitea) appears to be a better solution for those looking for a private, self-hosted Git server.
Instalation via Helm
Execute command in the same direcotry as values.yaml:
helm install forgejo -f values.yaml oci://code.forgejo.org/forgejo-helm/forgejo
SSL setup
After deploting all the resources mentioned above, your application should already be running, but you should secure the connection.
Installing cert-manager
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.12.4/cert-manager.crds.yaml
Create cluster-issuer for production
# cluster-issuer-production.yaml
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: letsencrypt-production
namespace: default
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email: <YOUR_EMAIL> # replace for your valid email
privateKeySecretRef:
name: letsencrypt-production
solvers:
- selector: {}
http01:
ingress:
class: traefik
Apply for cluster
kubectl apply -f cluster-issuer-production.yaml
Add ClusterIssuer to ingress annotations
metadata:
annotations:
cert-manager.io/cluster-issuer: letsencrypt-production
After that and setuping the middleware, connection to the app will be automatically secured.
Integration with prometheus
To enable standart metrics endpoint <YOUR_HOST>/metrics, you first need to ensure that you have deployed prometheus-operator and its CRDs (custom resource definition), because sesrviceMonitor is one of them. Then you need to add in values.yaml:
gitea:
metrics:
enabled: true
serviceMonitor:
enabled: true
and
gitea.config.metrics = true