Add support for global image prefix

This change adds an imagePrefix attribute to enable using
custom images for all the service at once using a single attribute
which default to "docker.io/zuul".

Change-Id: Ia1a5dd4aa9de410937f59a769019dcdb34167944
This commit is contained in:
Tristan Cacqueray 2020-04-17 16:48:10 +00:00
parent ba2691fb47
commit ea6652e4e6
3 changed files with 8 additions and 2 deletions

View File

@ -142,6 +142,7 @@ let Schemas =
let Input =
{ Type =
{ name : Text
, imagePrefix : Optional Text
, merger : Schemas.Merger.Type
, executor : Schemas.Executor.Type
, web : Schemas.Web.Type
@ -157,7 +158,8 @@ let Input =
, withCertManager : Bool
}
, default =
{ database = None UserSecret
{ imagePrefix = None Text
, database = None UserSecret
, zookeeper = None UserSecret
, externalConfig = Schemas.ExternalConfigs.default
, merger = Schemas.Merger.default

View File

@ -142,7 +142,10 @@ in \(input : Input)
}
]
let org = "docker.io/zuul"
let org =
merge
{ None = "docker.io/zuul", Some = \(prefix : Text) -> prefix }
input.imagePrefix
let version = "latest"

View File

@ -3,6 +3,7 @@ kind: Zuul
metadata:
name: zuul
spec:
imagePrefix: docker.io/zuul
executor:
count: 1
ssh_key: