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

35 lines
887 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
2023-04-18 09:29:21 +00:00
chart_version: 0.7.0
2022-09-29 18:51:26 +00:00
update_repo_cache: true
2023-03-01 17:10:31 +00:00
release_values: "{{ lookup('template', 'values.forgejo.yml.j2') | from_yaml }}"