Skip to content

Commit

Permalink
feature(Gitlab): provide more options for registry storage configurat…
Browse files Browse the repository at this point in the history
…ion (#447)
  • Loading branch information
christophenne committed Dec 7, 2023
1 parent 6944d5f commit e27d13d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
6 changes: 4 additions & 2 deletions deploy/crd/gitlabs.glasskube.eu-v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,15 @@ spec:
type: string
usePathStyle:
type: boolean
port:
type: object
useSsl:
type: boolean
required:
- bucket
- accessKeySecret
- secretKeySecret
- region
- hostname
- usePathStyle
type: object
type: object
required:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package eu.glasskube.operator.apps.gitlab

import com.fasterxml.jackson.annotation.JsonIgnore
import eu.glasskube.operator.apps.common.cloudstorage.CloudStorageSpec
import io.fabric8.generator.annotation.Required
import io.fabric8.kubernetes.api.model.SecretKeySelector
Expand All @@ -17,15 +16,10 @@ data class GitlabRegistryStorageSpec(
override val secretKeySecret: SecretKeySelector,
@field:Required
override val region: String,
@field:Required
override val hostname: String,
@field:Required
override val usePathStyle: Boolean
override val usePathStyle: Boolean = false
) : CloudStorageSpec {
@field:JsonIgnore
override val port = null

@field:JsonIgnore
override val useSsl = true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class GitlabDeployment(private val configService: ConfigService) :
envVar("REGISTRY_OBJECTSTORE_ENABLED", true.toString())
envVar("REGISTRY_OBJECTSTORE_S3_BUCKET", s3.bucket)
envVar("REGISTRY_OBJECTSTORE_S3_REGION", s3.region)
envVar("REGISTRY_OBJECTSTORE_S3_HOST", s3.hostname)
s3.endpoint?.let { envVar("REGISTRY_OBJECTSTORE_S3_HOST", it) }
envVar("REGISTRY_OBJECTSTORE_S3_USEPATH_STYLE", s3.usePathStyle.toString())
envVar("REGISTRY_OBJECTSTORE_S3_KEY") {
secretKeyRef(s3.accessKeySecret.name, s3.accessKeySecret.key)
Expand Down

0 comments on commit e27d13d

Please sign in to comment.