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

46 lines
1.1 KiB
YAML
Raw Normal View History

2022-09-11 16:49:31 +00:00
---
- name: Create gitea namespace
kubernetes.core.k8s:
name: gitea
api_version: v1
kind: Namespace
2023-03-01 17:10:31 +00:00
state: absent
definition:
metadata:
labels:
prometheus: default
- 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-04 16:18:49 +00:00
chart_version: 0.5.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 }}"