feat: migrate from Gitea to Forgejo
This commit is contained in:
parent
ae55b8ae64
commit
910c28e47b
4 changed files with 44 additions and 21 deletions
|
@ -2,9 +2,9 @@
|
|||
hosts: localhost
|
||||
roles:
|
||||
# - role: gateway-api
|
||||
- role: prometheus
|
||||
- role: postgres
|
||||
- role: hcloud
|
||||
- role: minio
|
||||
#- role: prometheus
|
||||
#- role: postgres
|
||||
#- role: hcloud
|
||||
#- role: minio
|
||||
- role: gitea
|
||||
- role: drone
|
||||
#- role: drone
|
||||
|
|
|
@ -6,3 +6,16 @@ env:
|
|||
DRONE_RPC_HOST: drone.drone.svc.cluster.local:8080
|
||||
DRONE_RPC_PROTO: http
|
||||
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
|
||||
|
|
|
@ -4,35 +4,42 @@
|
|||
name: gitea
|
||||
api_version: v1
|
||||
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
|
||||
definition:
|
||||
metadata:
|
||||
labels:
|
||||
prometheus: default
|
||||
|
||||
- name: Create Gitea admin credentials
|
||||
- name: Create Forgejo admin credentials
|
||||
kubernetes.core.k8s:
|
||||
state: present
|
||||
definition:
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: gitea-admin-credentials
|
||||
namespace: gitea
|
||||
name: forgejo-admin-credentials
|
||||
namespace: forgejo
|
||||
data:
|
||||
username: "{{ gitea.adminUser | b64encode }}"
|
||||
password: "{{ gitea.adminPassword | b64encode }}"
|
||||
|
||||
- name: Add Gitea chart repo
|
||||
kubernetes.core.helm_repository:
|
||||
name: gitea
|
||||
repo_url: https://dl.gitea.io/charts/
|
||||
|
||||
- name: Deploy Gitea chart
|
||||
- name: Deploy Forgejo chart
|
||||
kubernetes.core.helm:
|
||||
name: gitea
|
||||
chart_ref: gitea/gitea
|
||||
release_namespace: gitea
|
||||
chart_version: 7.0.2
|
||||
name: forgejo
|
||||
chart_ref: oci://codeberg.org/forgejo-contrib/forgejo
|
||||
release_namespace: forgejo
|
||||
release_state: present
|
||||
chart_version: 0.3.1
|
||||
update_repo_cache: true
|
||||
release_values: "{{ lookup('template', 'values.gitea.yml.j2') | from_yaml }}"
|
||||
release_values: "{{ lookup('template', 'values.forgejo.yml.j2') | from_yaml }}"
|
||||
|
|
|
@ -3,6 +3,9 @@ service:
|
|||
type: NodePort
|
||||
nodePort: 32022
|
||||
|
||||
image:
|
||||
tag: "1.18.3-1"
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
hosts:
|
||||
|
@ -26,7 +29,7 @@ persistence:
|
|||
|
||||
gitea:
|
||||
admin:
|
||||
existingSecret: gitea-admin-credentials
|
||||
existingSecret: forgejo-admin-credentials
|
||||
metrics:
|
||||
enabled: true
|
||||
serviceMonitor:
|
Loading…
Reference in a new issue