diff --git a/applications/20-databases/databases.yaml b/applications/20-databases/databases.yaml new file mode 100644 index 0000000..adcdc59 --- /dev/null +++ b/applications/20-databases/databases.yaml @@ -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"}} + diff --git a/applications/20-databases/influxdb.yaml b/applications/20-databases/influxdb/influxdb.yaml similarity index 100% rename from applications/20-databases/influxdb.yaml rename to applications/20-databases/influxdb/influxdb.yaml diff --git a/applications/20-databases/mariadb-database/database.yaml b/applications/20-databases/mariadb-database/database.yaml new file mode 100644 index 0000000..77be256 --- /dev/null +++ b/applications/20-databases/mariadb-database/database.yaml @@ -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 diff --git a/applications/20-databases/mariadb.yaml b/applications/20-databases/mariadb-operators/mariadb.yaml similarity index 100% rename from applications/20-databases/mariadb.yaml rename to applications/20-databases/mariadb-operators/mariadb.yaml diff --git a/applications/20-databases/namespace.yaml b/applications/20-databases/namespace.yaml deleted file mode 100644 index 4c34a8f..0000000 --- a/applications/20-databases/namespace.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -apiVersion: v1 -kind: Namespace -metadata: - name: database diff --git a/applications/20-databases/postgresql.yaml b/applications/20-databases/postgresql/postgresql.yaml similarity index 100% rename from applications/20-databases/postgresql.yaml rename to applications/20-databases/postgresql/postgresql.yaml diff --git a/applications/20-databases/redis.yaml b/applications/20-databases/redis/redis.yaml similarity index 100% rename from applications/20-databases/redis.yaml rename to applications/20-databases/redis/redis.yaml