diff --git a/kubernetes/apps/database/kustomization.yaml b/kubernetes/apps/database/kustomization.yaml index b55a970f..ccd30fc5 100644 --- a/kubernetes/apps/database/kustomization.yaml +++ b/kubernetes/apps/database/kustomization.yaml @@ -10,3 +10,4 @@ resources: - ./dragonfly/ks.yaml - ./emqx/ks.yaml - ./influxdb/ks.yaml + - ./mariadb/ks.yaml diff --git a/kubernetes/apps/database/mariadb/crds/helmrelease.yaml b/kubernetes/apps/database/mariadb/crds/helmrelease.yaml new file mode 100644 index 00000000..5826f854 --- /dev/null +++ b/kubernetes/apps/database/mariadb/crds/helmrelease.yaml @@ -0,0 +1,17 @@ +--- +# yaml-language-server: $schema=https://ks.hsn.dev/helm.toolkit.fluxcd.io/helmrelease_v2.json +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: mariadb-operator-crds +spec: + interval: 30m + chart: + spec: + chart: mariadb-operator-crds + version: 0.36.0 + sourceRef: + kind: HelmRepository + name: mariadb-operator + namespace: flux-system + interval: 5m diff --git a/kubernetes/apps/database/mariadb/crds/kustomization.yaml b/kubernetes/apps/database/mariadb/crds/kustomization.yaml new file mode 100644 index 00000000..904fb4a2 --- /dev/null +++ b/kubernetes/apps/database/mariadb/crds/kustomization.yaml @@ -0,0 +1,6 @@ +--- +# yaml-language-server: $schema=https://ks.hsn.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +resources: + - helmrelease.yaml diff --git a/kubernetes/apps/database/mariadb/ks.yaml b/kubernetes/apps/database/mariadb/ks.yaml new file mode 100644 index 00000000..cb8bbdea --- /dev/null +++ b/kubernetes/apps/database/mariadb/ks.yaml @@ -0,0 +1,42 @@ +--- +# yaml-language-server: $schema=https://ks.hsn.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: &app mariadb-operator + namespace: flux-system +spec: + targetNamespace: database + commonMetadata: + labels: + app.kubernetes.io/name: *app + dependsOn: + - name: external-secrets-stores + path: ./kubernetes/apps/database/mariadb/operator + prune: true + sourceRef: + kind: GitRepository + name: theshire + wait: true + interval: 30m + timeout: 5m +--- +# yaml-language-server: $schema=https://ks.hsn.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: &app mariadb-operator-crds + namespace: flux-system +spec: + targetNamespace: database + commonMetadata: + labels: + app.kubernetes.io/name: *app + path: ./kubernetes/apps/database/mariadb/crds + prune: true + sourceRef: + kind: GitRepository + name: theshire + wait: true + interval: 30m + timeout: 5m diff --git a/kubernetes/apps/database/mariadb/operator/helmrelease.yaml b/kubernetes/apps/database/mariadb/operator/helmrelease.yaml new file mode 100644 index 00000000..8d96fff9 --- /dev/null +++ b/kubernetes/apps/database/mariadb/operator/helmrelease.yaml @@ -0,0 +1,31 @@ +--- +# yaml-language-server: $schema=https://ks.hsn.dev/helm.toolkit.fluxcd.io/helmrelease_v2.json +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: mariadb-operator +spec: + interval: 30m + chart: + spec: + chart: mariadb-operator + version: 0.36.0 + sourceRef: + kind: HelmRepository + name: mariadb-operator + namespace: flux-system + interval: 5m + values: + logLevel: debug + image: + repository: ghcr.io/mariadb-operator/mariadb-operator + pullPolicy: IfNotPresent + metrics: + enabled: true + serviceMonitor: + enabled: true + webhook: + certificate: + certManager: true + serviceMonitor: + enabled: true diff --git a/kubernetes/apps/database/mariadb/operator/kustomization.yaml b/kubernetes/apps/database/mariadb/operator/kustomization.yaml new file mode 100644 index 00000000..904fb4a2 --- /dev/null +++ b/kubernetes/apps/database/mariadb/operator/kustomization.yaml @@ -0,0 +1,6 @@ +--- +# yaml-language-server: $schema=https://ks.hsn.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +resources: + - helmrelease.yaml diff --git a/kubernetes/flux/repositories/helm/kustomization.yaml b/kubernetes/flux/repositories/helm/kustomization.yaml index 435615c3..2bb087e3 100644 --- a/kubernetes/flux/repositories/helm/kustomization.yaml +++ b/kubernetes/flux/repositories/helm/kustomization.yaml @@ -29,6 +29,7 @@ resources: - kubernetes-sigs-metrics-server.yaml - kubernetes-sigs-nfd.yaml - kyverno.yaml + - mariadb.yaml - nvidia.yaml - openebs.yaml - piraeus.yaml diff --git a/kubernetes/flux/repositories/helm/mariadb.yaml b/kubernetes/flux/repositories/helm/mariadb.yaml new file mode 100644 index 00000000..9f6a6b37 --- /dev/null +++ b/kubernetes/flux/repositories/helm/mariadb.yaml @@ -0,0 +1,10 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrepository-source-v1.json +apiVersion: source.toolkit.fluxcd.io/v1 +kind: HelmRepository +metadata: + name: mariadb-operator + namespace: flux-system +spec: + interval: 1h + url: https://mariadb-operator.github.io/mariadb-operator