2021-01-09 17:54:42 +00:00
|
|
|
- name: Import secret.yaml to obtain secrets
|
|
|
|
include_tasks: secrets.yaml
|
|
|
|
when:
|
|
|
|
- gitea_use_external_db
|
2021-01-25 01:58:20 +00:00
|
|
|
- postgres_enabled is defined and postgres_enabled
|
2021-01-09 17:54:42 +00:00
|
|
|
|
|
|
|
- set_fact:
|
|
|
|
gitea_combined_values: "{{ gitea_default_values | combine(gitea_values, recursive=true) }}"
|
|
|
|
|
|
|
|
- set_fact:
|
|
|
|
gitea_dns_combined_values: "{{ gitea_dns_default_values | combine(gitea_dns_values, recursive=true) }}"
|
|
|
|
|
|
|
|
- set_fact:
|
|
|
|
gitea_ingress_nginx_combined_values: "{{ gitea_ingress_nginx_default_values | combine(gitea_ingress_nginx_values, recursive=true) }}"
|
|
|
|
|
|
|
|
- set_fact:
|
2021-01-25 01:15:32 +00:00
|
|
|
gitea_ingress_nginx_combined_values: "{{ gitea_ingress_nginx_combined_values | combine(gitea_publish_ingress_nginx_values, recursive=true) }}"
|
|
|
|
when: gitea_publish_web
|
2021-01-09 17:54:42 +00:00
|
|
|
|
|
|
|
- name: Deploy Nginx Ingress for Gitea
|
|
|
|
community.kubernetes.helm:
|
|
|
|
create_namespace: true
|
|
|
|
release_namespace: "{{ gitea_ingress_nginx_namespace | default(namespace) }}"
|
|
|
|
release_name: "{{ gitea_ingress_nginx_name | default(namespace + '-gitea-ingress-nginx') }}"
|
|
|
|
chart_ref: "{{ gitea_ingress_nginx_chart | default('ingress-nginx/ingress-nginx') }}"
|
|
|
|
chart_version: "{{ gitea_ingress_nginx_version | default(omit) }}"
|
|
|
|
release_values: "{{ gitea_ingress_nginx_combined_values | from_yaml }}"
|
|
|
|
wait: true
|
|
|
|
|
|
|
|
- name: Deploy DNS for Gitea
|
|
|
|
community.kubernetes.helm:
|
|
|
|
create_namespace: true
|
|
|
|
release_namespace: "{{ gitea_dns_namespace | default(namespace) }}"
|
|
|
|
release_name: "{{ gitea_dns_name | default('gitea-internal-dns') }}"
|
|
|
|
chart_ref: "{{ gitea_dns_chart | default('bitnami/external-dns') }}"
|
|
|
|
chart_version: "{{ gitea_dns_version | default(omit) }}"
|
|
|
|
release_values: "{{ gitea_dns_combined_values | from_yaml }}"
|
|
|
|
wait: true
|
|
|
|
when: gitea_publish_web == false
|
|
|
|
|
|
|
|
- name: Deploy Gitea
|
|
|
|
community.kubernetes.helm:
|
|
|
|
create_namespace: true
|
|
|
|
release_namespace: "{{ gitea_namespace | default(namespace) }}"
|
|
|
|
release_name: "{{ gitea_name | default('gitea') }}"
|
|
|
|
chart_ref: "{{ gitea_chart | default('ghp/gitea') }}"
|
|
|
|
chart_version: "{{ gitea_version | default(omit) }}"
|
|
|
|
release_values: "{{ gitea_combined_values | from_yaml }}"
|
|
|
|
wait: true
|
|
|
|
|