Peter Kurfer
0ac1d722a3
All checks were successful
continuous-integration/drone/push Build is passing
45 lines
No EOL
1.4 KiB
YAML
45 lines
No EOL
1.4 KiB
YAML
---
|
|
- name: Create fider namespace
|
|
kubernetes.core.k8s:
|
|
name: fider
|
|
api_version: v1
|
|
kind: Namespace
|
|
state: present
|
|
definition:
|
|
metadata:
|
|
labels:
|
|
prometheus: default
|
|
|
|
|
|
- name: Create Fider secrets
|
|
kubernetes.core.k8s:
|
|
state: present
|
|
definition:
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: fider-secret-config
|
|
namespace: fider
|
|
data:
|
|
# Connection string to the PostgreSQL database
|
|
DATABASE_URL: "{{ 'postgres://%s:%s@default-cluster-primary.postgres.svc:5432/fider?sslmode=require' | format(fider.db.user, fider.db.password) | b64encode }}"
|
|
|
|
# SMTP credentials
|
|
EMAIL_NOREPLY: "{{ fider.smtp.user | b64encode }}"
|
|
EMAIL_SMTP_USERNAME: "{{ fider.smtp.user | b64encode }}"
|
|
EMAIL_SMTP_PASSWORD: "{{ fider.smtp.password | b64encode }}"
|
|
|
|
# JWT secret key
|
|
JWT_SECRET: "{{ fider.jwt.secret | b64encode }}"
|
|
|
|
# OAuth
|
|
OAUTH_GITHUB_CLIENTID: "{{ fider.github.clientId | b64encode }}"
|
|
OAUTH_GITHUB_SECRET: "{{ fider.github.clientSecret | b64encode }}"
|
|
|
|
# Blob storage
|
|
BLOB_STORAGE_S3_ACCESS_KEY_ID: "{{ fider.blob.accessKeyId | b64encode }}"
|
|
BLOB_STORAGE_S3_SECRET_ACCESS_KEY: "{{ fider.blob.secretAccessKey | b64encode }}"
|
|
|
|
- name: Deploy Fider kustomization
|
|
k8s:
|
|
definition: "{{ lookup('kubernetes.core.kustomize', dir=([role_path, 'files'] | path_join)) }}" |