2023-10-19 14:30:59 +00:00
|
|
|
---
|
|
|
|
- name: Create NocoDB namespace
|
|
|
|
kubernetes.core.k8s:
|
|
|
|
name: nocodb
|
|
|
|
api_version: v1
|
|
|
|
kind: Namespace
|
|
|
|
state: present
|
|
|
|
definition:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
prometheus: default
|
|
|
|
|
|
|
|
# TODO deploy KeyDB for cache
|
2023-10-20 12:42:23 +00:00
|
|
|
- name: Add KeyDB chart repo
|
|
|
|
kubernetes.core.helm_repository:
|
|
|
|
name: enapter
|
|
|
|
repo_url: https://enapter.github.io/charts/
|
2023-10-19 14:30:59 +00:00
|
|
|
|
2023-10-20 12:42:23 +00:00
|
|
|
- name: Deploy KeyDB chart
|
|
|
|
kubernetes.core.helm:
|
|
|
|
name: nocodb-keydb
|
|
|
|
chart_ref: enapter/keydb
|
|
|
|
release_namespace: nocodb
|
|
|
|
chart_version: "0.48.0"
|
|
|
|
update_repo_cache: true
|
|
|
|
release_values: "{{ lookup('template', 'values.nextcloud-keydb.yml.j2') | from_yaml }}"
|
2023-10-19 14:30:59 +00:00
|
|
|
|
|
|
|
- name: Create NocoDB secrets
|
|
|
|
kubernetes.core.k8s:
|
|
|
|
state: present
|
|
|
|
definition:
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Secret
|
|
|
|
metadata:
|
|
|
|
name: nocodb-secret-config
|
|
|
|
namespace: nocodb
|
|
|
|
data:
|
|
|
|
# DB
|
|
|
|
NC_DB: "{{ 'pg://postgres-15-postgresql.postgres.svc.cluster.local:5432?u=%s&p=%s&d=noco' | format(nocodb.db.user, nocodb.db.password) | b64encode }}"
|
|
|
|
|
|
|
|
# Auth
|
|
|
|
NC_AUTH_JWT_SECRET: "{{ nocodb.jwtSecret | b64encode }}"
|
|
|
|
NC_ADMIN_PASSWORD: "{{ nocodb.auth.adminPassword | b64encode }}"
|
|
|
|
|
|
|
|
# S3 storage plugin
|
|
|
|
NC_S3_ACCESS_KEY: "{{ minio.rootUser | b64encode }}"
|
|
|
|
NC_S3_ACCESS_SECRET: "{{ minio.rootPassword | b64encode }}"
|
|
|
|
|
2023-10-20 12:42:23 +00:00
|
|
|
- name: Deploy NocoDB kustomization
|
2023-10-19 14:30:59 +00:00
|
|
|
k8s:
|
|
|
|
definition: "{{ lookup('kubernetes.core.kustomize', dir=([role_path, 'files'] | path_join)) }}"
|