infrastructure/k8s/roles/gitea/tasks/main.yml
2022-09-11 18:49:31 +02:00

32 lines
803 B
YAML

---
- name: Create gitea namespace
kubernetes.core.k8s:
name: gitea
api_version: v1
kind: Namespace
state: present
- name: Create Gitea admin credentials
kubernetes.core.k8s:
state: present
definition:
apiVersion: v1
kind: Secret
metadata:
name: gitea-admin-credentials
namespace: gitea
data:
username: "{{ gitea.adminUser | b64encode }}"
password: "{{ gitea.adminPassword | b64encode }}"
- name: Add Gitea chart repo
kubernetes.core.helm_repository:
name: gitea
repo_url: https://dl.gitea.io/charts/
- name: Deploy Gitea chart
kubernetes.core.helm:
name: gitea
chart_ref: gitea/gitea
release_namespace: gitea
release_values: "{{ lookup('template', 'values.gitea.yml.j2') | from_yaml }}"