From 9ad7e88465bb9abf37e61ebdbf7f0fdf7d5555f5 Mon Sep 17 00:00:00 2001 From: Philip Miglinci Date: Tue, 21 Nov 2023 13:11:38 +0100 Subject: [PATCH] chore(Matomo): update mariadb crds to support v0.22.0 Signed-off-by: Philip Miglinci --- .../operator/apps/matomo/dependent/MatomoMariaDB.kt | 5 ++--- .../eu/glasskube/operator/infra/mariadb/Exporter.kt | 3 ++- .../eu/glasskube/operator/infra/mariadb/MariaDB.kt | 9 ++------- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/operator/src/main/kotlin/eu/glasskube/operator/apps/matomo/dependent/MatomoMariaDB.kt b/operator/src/main/kotlin/eu/glasskube/operator/apps/matomo/dependent/MatomoMariaDB.kt index e0c52d3c..074c3930 100644 --- a/operator/src/main/kotlin/eu/glasskube/operator/apps/matomo/dependent/MatomoMariaDB.kt +++ b/operator/src/main/kotlin/eu/glasskube/operator/apps/matomo/dependent/MatomoMariaDB.kt @@ -19,7 +19,6 @@ import eu.glasskube.operator.config.ConfigService import eu.glasskube.operator.generic.condition.MariaDBReadyCondition import eu.glasskube.operator.infra.mariadb.Exporter import eu.glasskube.operator.infra.mariadb.MariaDB -import eu.glasskube.operator.infra.mariadb.MariaDBImage import eu.glasskube.operator.infra.mariadb.MariaDBResources import eu.glasskube.operator.infra.mariadb.MariaDBResourcesRequest import eu.glasskube.operator.infra.mariadb.MariaDBSpec @@ -60,7 +59,7 @@ class MatomoMariaDB(private val configService: ConfigService) : } spec = MariaDBSpec( rootPasswordSecretKeyRef = secretKeySelector(primary.databaseSecretName, ROOT_DATABASE_PASSWORD), - image = MariaDBImage("mariadb", "10.7.4", "IfNotPresent"), + image = "mariadb:10.7.4", database = primary.databaseName, username = primary.databaseUser, passwordSecretKeyRef = secretKeySelector(primary.databaseSecretName, MATOMO_DATABASE_PASSWORD), @@ -75,7 +74,7 @@ class MatomoMariaDB(private val configService: ConfigService) : ), metrics = Metrics( exporter = Exporter( - image = MariaDBImage("prom/mysqld-exporter", "v0.14.0", "IfNotPresent") + image = "prom/mysqld-exporter:v0.14.0" ), serviceMonitor = ServiceMonitor( prometheusRelease = "kube-prometheus-stack" diff --git a/operator/src/main/kotlin/eu/glasskube/operator/infra/mariadb/Exporter.kt b/operator/src/main/kotlin/eu/glasskube/operator/infra/mariadb/Exporter.kt index c6482238..1c4d7f9d 100644 --- a/operator/src/main/kotlin/eu/glasskube/operator/infra/mariadb/Exporter.kt +++ b/operator/src/main/kotlin/eu/glasskube/operator/infra/mariadb/Exporter.kt @@ -1,6 +1,7 @@ package eu.glasskube.operator.infra.mariadb data class Exporter( - val image: MariaDBImage, + val image: String, + var imagePullPolicy: String = "IfNotPresent", val resources: MariaDBResources? = null ) diff --git a/operator/src/main/kotlin/eu/glasskube/operator/infra/mariadb/MariaDB.kt b/operator/src/main/kotlin/eu/glasskube/operator/infra/mariadb/MariaDB.kt index 7695a3c2..bf72d801 100644 --- a/operator/src/main/kotlin/eu/glasskube/operator/infra/mariadb/MariaDB.kt +++ b/operator/src/main/kotlin/eu/glasskube/operator/infra/mariadb/MariaDB.kt @@ -11,12 +11,6 @@ import io.fabric8.kubernetes.client.CustomResource import io.fabric8.kubernetes.model.annotation.Group import io.fabric8.kubernetes.model.annotation.Version -data class MariaDBImage( - var repository: String, - var tag: String, - var pullPolicy: String? = null -) - data class MariaDBResourcesRequest( val storage: String? = null, val cpu: String? = null, @@ -36,7 +30,8 @@ data class MariaDBVolumeClaimTemplate( data class MariaDBSpec( var rootPasswordSecretKeyRef: SecretKeySelector, - var image: MariaDBImage, + var image: String, + var imagePullPolicy: String = "IfNotPresent", var database: String?, var username: String?, var passwordSecretKeyRef: SecretKeySelector?,