Gitea Kubernetes Deployment

Deploy Gitea in your kubernetes cluster

Sun, 03 Mar 2024

Gitea was a fun little experiment for me. I wanted to host my git service, mainly did it for the superb package support Gitea offers. While the kubernetes install is quite straightforward with helm, I’m going to focus on some of the customization of your config file.

kubectl create ns gitea
helm repo add gitea-charts https://dl.gitea.io/charts/
helm repo update
helm upgrade --install gitea gitea-charts/gitea -n gitea --values=.\values\gitea.yaml

The values\gitea.yaml file

gitea:
  admin: # set credentials for the admin user
    username: ""
    password: ""
    email: ""
  metrics: prometheus metrics
    enabled: true
    serviceMonitor:
      enabled: true
  config:
    APP_NAME: "" # name of your instance that shows up on home page
    actions: # enable gitea actions
      ENABLED: true
      DEFAULT_ACTIONS_URL: github
      ARTIFACT_RETENTION_DAYS: 90
      ZOMBIE_TASK_TIMEOUT: 10m
      ENDLESS_TASK_TIMEOUT: 3h
      ABANDONED_JOB_TIMEOUT: 24h
    repository:
      DISABLED_REPO_UNITS: repo.wiki,repo.ext_wik # globally disable features you may not use
    repository.pull-request:
      DEFAULT_MERGE_STYLE: squash # change the default merge style globally
    server:
      LANDING_PAGE: "/issues" # disables the home page (makes authentication required)
    service:
      DISABLE_REGISTRATION: true # if you don't allow users to use your instance as a public instance
    mailer: # enable sending out email notifications
      PASSWD: 
      ENABLED: true
      PROTOCOL: smtp
      FROM: 'Gitea <ebeazer@domain.com>'
      USER: ebeazer@domain.com
      SMTP_ADDR: 
      SMTP_PORT: 587
    openid: # Allow open id signups/logins.  Example using AuthO or Authentik
      ENABLE_OPENID_SIGNIN: true
      ENABLE_OPENID_SIGNUP: true
Buy Me A CoffeeDigitalOcean Referral Badge
Loading...
Edward Beazer

Edward Beazer - I just like to build shit. Sometimes I get stuck for hours, even days while trying to figure out how to solve an issue or implement a new feature. Hope my tips and tutorials can save you some time.

DigitalOcean Referral Badge