Add redis service to cluster

This commit is contained in:
2023-03-23 19:23:20 -04:00
parent 463ac84e3a
commit 2d770a9fcd
6 changed files with 162 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
---
#deployment tasks for gitea
- name: Create a namespace for funkwhale
k8s:
kubeconfig: "/etc/rancher/k3s/k3s.yaml"
name: "{{apps.funkwhale.namespace}}"
api_version: v1
kind: Namespace
state: "{{apps.funkwhale.state}}"
become: true
#- name: create persistent volume resources
# kubernetes.core.k8s:
# kubeconfig: "/etc/rancher/k3s/k3s.yaml"
# state: "{{apps.funkwhale.state}}"
# definition: "{{ lookup('template', item) | from_yaml }}"
# loop:
# - funkwhale/pv.yaml
# - funkwhale/pv-claim.yaml
# become: true
- name: Install funkwhale globally available
block:
- name: Add funkwhale chart helm repo
local_action:
module: kubernetes.core.helm_repository
name: ananace-charts
repo_url: https://ananace.gitlab.io/charts
- name: load variables files/funkwhale/values.yaml
ansible.builtin.include_vars:
file: files/funkwhale/values.yaml
name: release_values
- name: Install funkwhale Release
local_action:
module: kubernetes.core.helm
release_state: "{{apps.funkwhale.state}}"
name: gitea
namespace: "{{apps.funkwhale.namespace}}"
create_namespace: yes
update_repo_cache: True
chart_ref: ananace-charts/funkwhale
values: "{{release_values}}"
wait: true

View File

@@ -0,0 +1,47 @@
---
#deployment tasks for redis
- name: Create a namespace for redis
k8s:
kubeconfig: "/etc/rancher/k3s/k3s.yaml"
name: "{{apps.redis.namespace}}"
api_version: v1
kind: Namespace
state: "{{apps.redis.state}}"
become: true
#- name: create persistent volume resources
# kubernetes.core.k8s:
# kubeconfig: "/etc/rancher/k3s/k3s.yaml"
# state: "{{apps.funkwhale.state}}"
# definition: "{{ lookup('template', item) | from_yaml }}"
# loop:
# - funkwhale/pv.yaml
# - funkwhale/pv-claim.yaml
# become: true
- name: Install redis globally available
block:
- name: Add redis chart helm repo
local_action:
module: kubernetes.core.helm_repository
name: bitnami
repo_url: https://charts.bitnami.com/bitnami
- name: load variables files/redis/values.yaml
ansible.builtin.include_vars:
file: files/redis/values.yaml
name: release_values
- name: Install redis Release
local_action:
module: kubernetes.core.helm
release_state: "{{apps.redis.state}}"
name: redis
namespace: "{{apps.redis.namespace}}"
create_namespace: yes
update_repo_cache: True
chart_ref: bitnami/redis
values: "{{release_values}}"
wait: true

View File

@@ -38,6 +38,10 @@
include_tasks: deployments/nextcloud.yaml
when: apps.nextcloud.enabled
- name: deploy redis
include_tasks: deployments/redis.yaml
when: apps.redis.enabled
#-----------------------------------------------------
#- include_tasks: mariadb.yaml
#