Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Gitlab): add storage size to spec gitlab-data #530

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions deploy/crd/gitlabs.glasskube.eu-v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<PostgresDatabaseSpec> {
override val cloudStorage get() = registry?.storage?.s3
}

data class StorageSpec(
val size: Quantity?,
val storageClassName: String?
)
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ class GitlabVolume : CRUDKubernetesDependentResource<PersistentVolumeClaim, Gitl
spec {
resources {
requests = mapOf(
"storage" to Quantity("20", "Gi")
"storage" to (primary.spec.storage?.size ?: Quantity("20", "Gi"))
)
}
storageClassName = primary.spec.storage?.storageClassName
accessModes = listOf("ReadWriteOnce")
}
}
Expand Down
Loading