feat(init): first commit
This commit is contained in:
parent
a797dddd90
commit
d81a6c9168
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
nameReference:
|
||||||
|
- kind: Secret
|
||||||
|
fieldSpecs:
|
||||||
|
- path: spec/superuserSecret/name
|
||||||
|
kind: Cluster
|
||||||
|
- path: spec/bootstrap/initdb/secret/name
|
||||||
|
kind: Cluster
|
|
@ -0,0 +1,36 @@
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1alpha1
|
||||||
|
kind: Component
|
||||||
|
|
||||||
|
generatorOptions:
|
||||||
|
disableNameSuffixHash: true
|
||||||
|
|
||||||
|
configurations:
|
||||||
|
- ./configurations/cnpg-cluster.yaml
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- ./resources/airflow-cnpg-cluster.yaml
|
||||||
|
|
||||||
|
secretGenerator:
|
||||||
|
- name: airflow-postgres-admin
|
||||||
|
type: Secret
|
||||||
|
literals:
|
||||||
|
- username=postgres
|
||||||
|
- password=NotSoSecret
|
||||||
|
- name: airflow-postgres-user
|
||||||
|
type: Secret
|
||||||
|
literals:
|
||||||
|
- username=airflow
|
||||||
|
- password=NotSoSecret
|
||||||
|
- name: airflow-postgres-connection
|
||||||
|
type: Secret
|
||||||
|
literals:
|
||||||
|
- connection=postgresql://airflow:NotSoSecret@airflow-postgres-rw:5432/airflow
|
||||||
|
|
||||||
|
vars:
|
||||||
|
- name: AIRFLOW_DATABASE_SERVICE_NAME
|
||||||
|
objref:
|
||||||
|
name: airflow-postgres
|
||||||
|
kind: Cluster
|
||||||
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
|
fieldref:
|
||||||
|
fieldpath: metadata.name
|
|
@ -0,0 +1,17 @@
|
||||||
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
|
kind: Cluster
|
||||||
|
metadata:
|
||||||
|
name: airflow-postgres
|
||||||
|
spec:
|
||||||
|
instances: 3
|
||||||
|
primaryUpdateStrategy: unsupervised
|
||||||
|
superuserSecret:
|
||||||
|
name: airflow-postgres-admin
|
||||||
|
bootstrap:
|
||||||
|
initdb:
|
||||||
|
database: airflow
|
||||||
|
owner: airflow
|
||||||
|
secret:
|
||||||
|
name: airflow-postgres-user
|
||||||
|
storage:
|
||||||
|
size: 2Gi
|
|
@ -0,0 +1,33 @@
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: airflow
|
||||||
|
|
||||||
|
generatorOptions:
|
||||||
|
disableNameSuffixHash: true
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- ./resources/namespace.yaml
|
||||||
|
|
||||||
|
components:
|
||||||
|
- ./components/airflow-cnpg-database
|
||||||
|
|
||||||
|
secretGenerator:
|
||||||
|
- name: airflow-webserver-secret-key
|
||||||
|
type: secret
|
||||||
|
literals:
|
||||||
|
- webserver-secret-key=c94b62cffbf4dd1c42747fc65007054432f10c185c5e6160
|
||||||
|
|
||||||
|
helmCharts:
|
||||||
|
- name: airflow
|
||||||
|
repo: https://airflow.apache.org
|
||||||
|
version: 1.9.0
|
||||||
|
releaseName: airflow
|
||||||
|
namespace: airflow
|
||||||
|
valuesInline:
|
||||||
|
postgresql:
|
||||||
|
enabled: false
|
||||||
|
pgbouncer:
|
||||||
|
enabled: true
|
||||||
|
data:
|
||||||
|
metadataSecretName: airflow-postgres-connection
|
||||||
|
webserverSecretKeySecretName: airflow-webserver-secret-key
|
|
@ -0,0 +1,4 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: airflow
|
Loading…
Reference in New Issue