cloudapi: Drop bucket from composer config
This value is set in the worker config. In future it might also be passed through the api to upload into target accounts, but it should never be set in composer.
This commit is contained in:
parent
c039a91b61
commit
71c78991a6
11 changed files with 11 additions and 37 deletions
|
|
@ -128,7 +128,6 @@ func (c *Composer) InitWeldr(repoPaths []string, weldrListener net.Listener,
|
|||
|
||||
func (c *Composer) InitAPI(cert, key string, enableTLS bool, enableMTLS bool, enableJWT bool, l net.Listener) error {
|
||||
config := v2.ServerConfig{
|
||||
AWSBucket: c.config.Koji.AWS.Bucket,
|
||||
JWTEnabled: c.config.Koji.EnableJWT,
|
||||
TenantProviderFields: c.config.Koji.JWTTenantProviderFields,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,20 +20,15 @@ type ComposerConfigFile struct {
|
|||
}
|
||||
|
||||
type KojiAPIConfig struct {
|
||||
AllowedDomains []string `toml:"allowed_domains"`
|
||||
CA string `toml:"ca"`
|
||||
EnableTLS bool `toml:"enable_tls"`
|
||||
EnableMTLS bool `toml:"enable_mtls"`
|
||||
EnableJWT bool `toml:"enable_jwt"`
|
||||
JWTKeysURLs []string `toml:"jwt_keys_urls"`
|
||||
JWTKeysCA string `toml:"jwt_ca_file"`
|
||||
JWTACLFile string `toml:"jwt_acl_file"`
|
||||
JWTTenantProviderFields []string `toml:"jwt_tenant_provider_fields"`
|
||||
AWS AWSConfig `toml:"aws_config"`
|
||||
}
|
||||
|
||||
type AWSConfig struct {
|
||||
Bucket string `toml:"bucket"`
|
||||
AllowedDomains []string `toml:"allowed_domains"`
|
||||
CA string `toml:"ca"`
|
||||
EnableTLS bool `toml:"enable_tls"`
|
||||
EnableMTLS bool `toml:"enable_mtls"`
|
||||
EnableJWT bool `toml:"enable_jwt"`
|
||||
JWTKeysURLs []string `toml:"jwt_keys_urls"`
|
||||
JWTKeysCA string `toml:"jwt_ca_file"`
|
||||
JWTACLFile string `toml:"jwt_acl_file"`
|
||||
JWTTenantProviderFields []string `toml:"jwt_tenant_provider_fields"`
|
||||
}
|
||||
|
||||
type WorkerAPIConfig struct {
|
||||
|
|
@ -89,9 +84,6 @@ func GetDefaultConfig() *ComposerConfigFile {
|
|||
EnableTLS: true,
|
||||
EnableMTLS: true,
|
||||
EnableJWT: false,
|
||||
AWS: AWSConfig{
|
||||
Bucket: "image-builder.service",
|
||||
},
|
||||
},
|
||||
Worker: WorkerAPIConfig{
|
||||
RequestJobTimeout: "0",
|
||||
|
|
|
|||
|
|
@ -33,9 +33,6 @@ func TestDefaultConfig(t *testing.T) {
|
|||
EnableTLS: true,
|
||||
EnableMTLS: true,
|
||||
EnableJWT: false,
|
||||
AWS: AWSConfig{
|
||||
Bucket: "image-builder.service",
|
||||
},
|
||||
}, defaultConfig.Koji)
|
||||
|
||||
require.Equal(t, WorkerAPIConfig{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue