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

40 lines
1.1 KiB
YAML
Raw Normal View History

---
- 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
- 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 }}"
- name: Deploy HedgeDoc kustomization
k8s:
definition: "{{ lookup('kubernetes.core.kustomize', dir=([role_path, 'files'] | path_join)) }}"