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

33 lines
803 B
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
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 }}"