diff --git a/mariadb-operator/README.md b/mariadb-operator/README.md new file mode 100644 index 0000000..559232b --- /dev/null +++ b/mariadb-operator/README.md @@ -0,0 +1,25 @@ +# MariaDB Operator + +This folder contains the MariaDB operator installation for the cluster. + +## Components + +- **operator-crds-helm.yaml**: Installs MariaDB operator CRDs (v25.10.4) +- **operator-helm.yaml**: Installs MariaDB operator (v25.10.4) +- **kustomization.yaml**: Kustomize manifest for organizing resources + +## Configuration + +- **Namespace**: `mariadb-system` +- **Chart Repository**: https://mariadb-operator.github.io/mariadb-operator +- **Chart Version**: 25.10.4 +- **Metrics**: Enabled (ServiceMonitor disabled - Prometheus Operator not installed) + +## Managed By + +ArgoCD Application: `mariadb-operator-install` (defined in `/apps/templates/mariadb-operator-folder.yaml`) + +## Usage + +MariaDB instances are created using the `MariaDB` CRD in application namespaces. +See `/mbgwp/mariadb-cluster.yaml` for an example. diff --git a/mariadb-operator/kustomization.yaml b/mariadb-operator/kustomization.yaml new file mode 100644 index 0000000..689b5ee --- /dev/null +++ b/mariadb-operator/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: mariadb-system +resources: + - operator-crds-helm.yaml + - operator-helm.yaml diff --git a/mariadb-operator/operator-crds-helm.yaml b/mariadb-operator/operator-crds-helm.yaml new file mode 100644 index 0000000..4d5bd94 --- /dev/null +++ b/mariadb-operator/operator-crds-helm.yaml @@ -0,0 +1,21 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: mariadb-operator-crds + namespace: argocd +spec: + destination: + namespace: mariadb-system + server: https://kubernetes.default.svc + project: default + source: + chart: mariadb-operator-crds + repoURL: https://mariadb-operator.github.io/mariadb-operator + targetRevision: 25.10.4 + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true + - ServerSideApply=true diff --git a/mariadb-operator/operator-helm.yaml b/mariadb-operator/operator-helm.yaml new file mode 100644 index 0000000..e7ba116 --- /dev/null +++ b/mariadb-operator/operator-helm.yaml @@ -0,0 +1,26 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: mariadb-operator + namespace: argocd +spec: + destination: + namespace: mariadb-system + server: https://kubernetes.default.svc + project: default + source: + chart: mariadb-operator + repoURL: https://mariadb-operator.github.io/mariadb-operator + targetRevision: 25.10.4 + helm: + values: | + metrics: + enabled: true + serviceMonitor: + enabled: false + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true diff --git a/mbgwp/mariadb-operator-credentials-es.yaml b/mbgwp/mariadb-operator-credentials-es.yaml new file mode 100644 index 0000000..aae2d54 --- /dev/null +++ b/mbgwp/mariadb-operator-credentials-es.yaml @@ -0,0 +1,22 @@ +apiVersion: external-secrets.io/v1beta1 +kind: ExternalSecret +metadata: + name: mbgwp-mariadb-credentials + namespace: mbgwp +spec: + refreshInterval: 15m + secretStoreRef: + name: vault-backend + kind: ClusterSecretStore + target: + name: mbgwp-mariadb-credentials + creationPolicy: Owner + data: + - secretKey: root-password + remoteRef: + key: kv/mariadboperator + property: mariadb-operator-root-password + - secretKey: password + remoteRef: + key: kv/mariadboperator + property: mariadb-operator-user-password