feat: migrate from Gitea to Forgejo

This commit is contained in:
Peter 2023-03-01 18:10:31 +01:00
parent ae55b8ae64
commit 910c28e47b
Signed by: prskr
GPG key ID: C1DB5D2E8DB512F9
4 changed files with 44 additions and 21 deletions

View file

@ -2,9 +2,9 @@
hosts: localhost hosts: localhost
roles: roles:
# - role: gateway-api # - role: gateway-api
- role: prometheus #- role: prometheus
- role: postgres #- role: postgres
- role: hcloud #- role: hcloud
- role: minio #- role: minio
- role: gitea - role: gitea
- role: drone #- role: drone

View file

@ -5,4 +5,17 @@ env:
DRONE_RUNNER_PRIVILEGED_IMAGES: code.icb4dc0.de/inetmock/inetmock DRONE_RUNNER_PRIVILEGED_IMAGES: code.icb4dc0.de/inetmock/inetmock
DRONE_RPC_HOST: drone.drone.svc.cluster.local:8080 DRONE_RPC_HOST: drone.drone.svc.cluster.local:8080
DRONE_RPC_PROTO: http DRONE_RPC_PROTO: http
DRONE_RUNNER_CAPACITY: 1 DRONE_RUNNER_CAPACITY: 1
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- drone-runner-docker
topologyKey: kubernetes.io/hostname

View file

@ -4,35 +4,42 @@
name: gitea name: gitea
api_version: v1 api_version: v1
kind: Namespace kind: Namespace
state: absent
definition:
metadata:
labels:
prometheus: default
- name: Create forgejo namespace
kubernetes.core.k8s:
name: forgejo
api_version: v1
kind: Namespace
state: present state: present
definition: definition:
metadata: metadata:
labels: labels:
prometheus: default prometheus: default
- name: Create Gitea admin credentials - name: Create Forgejo admin credentials
kubernetes.core.k8s: kubernetes.core.k8s:
state: present state: present
definition: definition:
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
metadata: metadata:
name: gitea-admin-credentials name: forgejo-admin-credentials
namespace: gitea namespace: forgejo
data: data:
username: "{{ gitea.adminUser | b64encode }}" username: "{{ gitea.adminUser | b64encode }}"
password: "{{ gitea.adminPassword | b64encode }}" password: "{{ gitea.adminPassword | b64encode }}"
- name: Add Gitea chart repo - name: Deploy Forgejo chart
kubernetes.core.helm_repository:
name: gitea
repo_url: https://dl.gitea.io/charts/
- name: Deploy Gitea chart
kubernetes.core.helm: kubernetes.core.helm:
name: gitea name: forgejo
chart_ref: gitea/gitea chart_ref: oci://codeberg.org/forgejo-contrib/forgejo
release_namespace: gitea release_namespace: forgejo
chart_version: 7.0.2 release_state: present
chart_version: 0.3.1
update_repo_cache: true update_repo_cache: true
release_values: "{{ lookup('template', 'values.gitea.yml.j2') | from_yaml }}" release_values: "{{ lookup('template', 'values.forgejo.yml.j2') | from_yaml }}"

View file

@ -3,6 +3,9 @@ service:
type: NodePort type: NodePort
nodePort: 32022 nodePort: 32022
image:
tag: "1.18.3-1"
ingress: ingress:
enabled: true enabled: true
hosts: hosts:
@ -26,7 +29,7 @@ persistence:
gitea: gitea:
admin: admin:
existingSecret: gitea-admin-credentials existingSecret: forgejo-admin-credentials
metrics: metrics:
enabled: true enabled: true
serviceMonitor: serviceMonitor: