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): provide more options for registry storage configuration (#447) #448

Merged
merged 1 commit into from
Dec 13, 2023
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,17 @@ spec:
type: string
hostname:
type: string
port:
type: integer
useSsl:
type: boolean
usePathStyle:
type: boolean
required:
- bucket
- accessKeySecret
- secretKeySecret
- region
- hostname
- usePathStyle
type: object
type: object
required:
Expand Down
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 @@ -128,15 +128,17 @@ spec:
type: string
hostname:
type: string
port:
type: integer
useSsl:
type: boolean
usePathStyle:
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,9 @@ 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
) : CloudStorageSpec {
@field:JsonIgnore
override val port = null

@field:JsonIgnore
override val useSsl = true
}
override val port: Int?,
override val useSsl: Boolean,
override val usePathStyle: Boolean = false
) : CloudStorageSpec
}
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_ENDPOINT", it) }
envVar("REGISTRY_OBJECTSTORE_S3_USEPATH_STYLE", s3.usePathStyle.toString())
envVar("REGISTRY_OBJECTSTORE_S3_KEY") {
secretKeyRef(s3.accessKeySecret.name, s3.accessKeySecret.key)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
'accesskey' => ENV['REGISTRY_OBJECTSTORE_S3_KEY'],
'secretkey' => ENV['REGISTRY_OBJECTSTORE_S3_SECRET'],
'region' => ENV['REGISTRY_OBJECTSTORE_S3_REGION'],
'regionendpoint' => ENV['REGISTRY_OBJECTSTORE_S3_HOST'],
'regionendpoint' => ENV['REGISTRY_OBJECTSTORE_S3_ENDPOINT'],
'pathstyle' => ENV['REGISTRY_OBJECTSTORE_S3_USEPATH_STYLE']
}
}
Expand Down
Loading