From a9a0b3d2de6f0cbcc7a4db0c505adf88349db1f3 Mon Sep 17 00:00:00 2001 From: jrab66 Date: Fri, 23 Feb 2024 12:30:11 -0600 Subject: [PATCH] Feat(Gitlab): add storage size to spec gitlab-data --- deploy/crd/gitlabs.glasskube.eu-v1.yml | 11 +++++++++++ .../eu/glasskube/operator/apps/gitlab/GitlabSpec.kt | 7 +++++++ .../operator/apps/gitlab/dependent/GitlabVolume.kt | 3 ++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/deploy/crd/gitlabs.glasskube.eu-v1.yml b/deploy/crd/gitlabs.glasskube.eu-v1.yml index 64713cb6..a884d91d 100644 --- a/deploy/crd/gitlabs.glasskube.eu-v1.yml +++ b/deploy/crd/gitlabs.glasskube.eu-v1.yml @@ -254,6 +254,17 @@ spec: type: boolean sshHost: type: string + storage: + nullable: true + properties: + size: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + storageClassName: + type: string + type: object version: pattern: \d+\.\d+\.\d+ type: string diff --git a/operator/src/main/kotlin/eu/glasskube/operator/apps/gitlab/GitlabSpec.kt b/operator/src/main/kotlin/eu/glasskube/operator/apps/gitlab/GitlabSpec.kt index bd52588c..a4ef0c2e 100644 --- a/operator/src/main/kotlin/eu/glasskube/operator/apps/gitlab/GitlabSpec.kt +++ b/operator/src/main/kotlin/eu/glasskube/operator/apps/gitlab/GitlabSpec.kt @@ -34,8 +34,15 @@ data class GitlabSpec( @field:Pattern(SEMVER) val version: String = "16.2.5", @field:Nullable + val storage: StorageSpec?, + @field:Nullable override val database: PostgresDatabaseSpec = PostgresDatabaseSpec(), override val backups: BackupSpec? ) : HasBackupSpec, HasCloudStorageSpec, HasDatabaseSpec { override val cloudStorage get() = registry?.storage?.s3 } + +data class StorageSpec( + val size: Quantity?, + val storageClassName: String? +) diff --git a/operator/src/main/kotlin/eu/glasskube/operator/apps/gitlab/dependent/GitlabVolume.kt b/operator/src/main/kotlin/eu/glasskube/operator/apps/gitlab/dependent/GitlabVolume.kt index 3039e97f..62f9d30d 100644 --- a/operator/src/main/kotlin/eu/glasskube/operator/apps/gitlab/dependent/GitlabVolume.kt +++ b/operator/src/main/kotlin/eu/glasskube/operator/apps/gitlab/dependent/GitlabVolume.kt @@ -25,9 +25,10 @@ class GitlabVolume : CRUDKubernetesDependentResource