Split database into ApplicationSet
This commit is contained in:
parent
da95311d02
commit
e600a38488
7 changed files with 63 additions and 5 deletions
50
applications/20-databases/databases.yaml
Normal file
50
applications/20-databases/databases.yaml
Normal file
|
@ -0,0 +1,50 @@
|
|||
---
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: ApplicationSet
|
||||
metadata:
|
||||
name: home-server-databases
|
||||
namespace: argocd
|
||||
spec:
|
||||
generators:
|
||||
- list:
|
||||
elements:
|
||||
- name: mariadb-operators
|
||||
path: applications/20-databases/mariadb-operators
|
||||
namespace: database
|
||||
wave: 1
|
||||
- name: postgresql
|
||||
path: applications/20-databases/postgresql
|
||||
namespace: database
|
||||
wave: 1
|
||||
- name: influxdb
|
||||
path: applications/20-databases/influxdb
|
||||
namespace: database
|
||||
wave: 1
|
||||
- name: redis
|
||||
path: applications/20-databases/redis
|
||||
namespace: database
|
||||
wave: 1
|
||||
- name: mariadb-database
|
||||
path: applications/20-databases/mariadb-database
|
||||
namespace: database
|
||||
wave: 2
|
||||
template:
|
||||
metadata:
|
||||
name: '{{name}}'
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: 'https://repobase.net/j/home-server.git'
|
||||
targetRevision: HEAD
|
||||
path: '{{path}}'
|
||||
destination:
|
||||
server: 'https://kubernetes.default.svc'
|
||||
namespace: '{{namespace | default "database"}}'
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- SyncWave={{wave | default "0"}}
|
||||
|
13
applications/20-databases/mariadb-database/database.yaml
Normal file
13
applications/20-databases/mariadb-database/database.yaml
Normal file
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
apiVersion: k8s.mariadb.com/v1alpha1
|
||||
kind: MariaDB
|
||||
metadata:
|
||||
name: mariadb
|
||||
namespace: database
|
||||
spec:
|
||||
rootPasswordSecretKeyRef:
|
||||
name: db-secrets
|
||||
key: db-root-password
|
||||
|
||||
storage:
|
||||
size: 5Gi
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: database
|
Loading…
Add table
Add a link
Reference in a new issue