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

34 lines
860 B
YAML
Raw Normal View History

2022-09-11 16:49:31 +00:00
---
2023-03-01 17:10:31 +00:00
- name: Create forgejo namespace
kubernetes.core.k8s:
name: forgejo
api_version: v1
kind: Namespace
2022-09-11 16:49:31 +00:00
state: present
definition:
metadata:
labels:
prometheus: default
2022-09-11 16:49:31 +00:00
2023-03-01 17:10:31 +00:00
- name: Create Forgejo admin credentials
2022-09-11 16:49:31 +00:00
kubernetes.core.k8s:
state: present
definition:
apiVersion: v1
kind: Secret
metadata:
2023-03-01 17:10:31 +00:00
name: forgejo-admin-credentials
namespace: forgejo
2022-09-11 16:49:31 +00:00
data:
username: "{{ gitea.adminUser | b64encode }}"
password: "{{ gitea.adminPassword | b64encode }}"
2023-03-01 17:10:31 +00:00
- name: Deploy Forgejo chart
2022-09-11 16:49:31 +00:00
kubernetes.core.helm:
2023-03-01 17:10:31 +00:00
name: forgejo
chart_ref: oci://codeberg.org/forgejo-contrib/forgejo
release_namespace: forgejo
release_state: present
chart_version: 0.13.0
2023-03-01 17:10:31 +00:00
release_values: "{{ lookup('template', 'values.forgejo.yml.j2') | from_yaml }}"