From c9058dc067abd422ac8e46ceea58b46095f35463 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 14 Aug 2025 00:12:49 +1000 Subject: [PATCH] Add in mariadb operators --- applications/20-databases/databases.yaml | 33 ++++++++++++ .../mariadb-operators/mariadb-operators.yaml | 53 +++++++++++++++++++ deploy/server.yaml | 7 ++- 3 files changed, 91 insertions(+), 2 deletions(-) create mode 100644 applications/20-databases/databases.yaml create mode 100644 applications/20-databases/mariadb-operators/mariadb-operators.yaml diff --git a/applications/20-databases/databases.yaml b/applications/20-databases/databases.yaml new file mode 100644 index 0000000..4be738f --- /dev/null +++ b/applications/20-databases/databases.yaml @@ -0,0 +1,33 @@ +--- +apiVersion: argoproj.io/v1alpha1 +kind: ApplicationSet +metadata: + name: home-server-databases + namespace: argocd +spec: + goTemplate: true + generators: + - list: + elements: + - name: mariadb-operators + path: applications/20-databases/mariadb-operators + wave: 1 + 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: database + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true + - SyncWave={{.wave}} diff --git a/applications/20-databases/mariadb-operators/mariadb-operators.yaml b/applications/20-databases/mariadb-operators/mariadb-operators.yaml new file mode 100644 index 0000000..51ba483 --- /dev/null +++ b/applications/20-databases/mariadb-operators/mariadb-operators.yaml @@ -0,0 +1,53 @@ +--- +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: mariadb-operator-crds + namespace: argocd +spec: + project: default + source: + repoURL: "https://charts.mariadb.com/mariadb-operator" + chart: "mariadb-operator-crds" + targetRevision: "0.38.1" + helm: + releaseName: "mariadb-operator-crds" + destination: + server: "https://kubernetes.default.svc" + namespace: database + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - SkipHooks=false + - SyncWave=0 # ensure this is applied first + +--- +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: mariadb-operator + namespace: argocd +spec: + project: default + source: + repoURL: "https://charts.mariadb.com/mariadb-operator" + chart: "mariadb-operator" + targetRevision: "0.38.1" + helm: + releaseName: "mariadb-operator" + destination: + server: "https://kubernetes.default.svc" + namespace: database + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - SkipHooks=false + - SyncWave=1 # ensure this waits for mariadb-operator-crds diff --git a/deploy/server.yaml b/deploy/server.yaml index 02c6e40..2457b37 100644 --- a/deploy/server.yaml +++ b/deploy/server.yaml @@ -5,9 +5,7 @@ metadata: name: home-server-applications namespace: argocd spec: - goTemplate: true - generators: - list: elements: @@ -16,6 +14,11 @@ spec: namespace: home-server wave: 1 + - name: databases + path: applications/20-databases + namespace: home-server + wave: 1 + template: metadata: name: "{{.name}}"