infrastructure/k8s/roles/gitea/tasks/main.yml

34 lines
887 B
YAML

---
- name: Create forgejo namespace
kubernetes.core.k8s:
name: forgejo
api_version: v1
kind: Namespace
state: present
definition:
metadata:
labels:
prometheus: default
- name: Create Forgejo admin credentials
kubernetes.core.k8s:
state: present
definition:
apiVersion: v1
kind: Secret
metadata:
name: forgejo-admin-credentials
namespace: forgejo
data:
username: "{{ gitea.adminUser | b64encode }}"
password: "{{ gitea.adminPassword | b64encode }}"
- name: Deploy Forgejo chart
kubernetes.core.helm:
name: forgejo
chart_ref: oci://codeberg.org/forgejo-contrib/forgejo
release_namespace: forgejo
release_state: present
chart_version: 0.7.0
update_repo_cache: true
release_values: "{{ lookup('template', 'values.forgejo.yml.j2') | from_yaml }}"