45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
---
|
|
- name: Create gitea namespace
|
|
kubernetes.core.k8s:
|
|
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 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.5.0
|
|
update_repo_cache: true
|
|
release_values: "{{ lookup('template', 'values.forgejo.yml.j2') | from_yaml }}"
|