@@ -18,7 +18,7 @@ var createNestedObject = function (base: any, names: any, value: any) {
1818} ;
1919
2020// TODO: switch to official gitpod.io build.
21- const version = "aledbf-mk3.29 " ;
21+ const version = "aledbf-mk3.40 " ;
2222
2323export interface GitpodProps extends cdk . StackProps {
2424 domain : string
@@ -54,19 +54,26 @@ export class GitpodStack extends cdk.Stack {
5454 replace ( / { { issuerName} } / g, 'ca-issuer' ) ;
5555
5656 const values = loadYaml ( doc ) ;
57- if ( process . env . IMAGE_PULL_SECRET ) {
58- createNestedObject ( values , [ "components" , "workspace" , "templates" , "default" , "spec" , "imagePullSecrets" ] , [ ] ) ;
57+ if ( process . env . IMAGE_PULL_SECRET_FILE ) {
5958 createNestedObject ( values , [ "components" , "imageBuilderMk3" , "registry" ] , { } ) ;
60- values . components . workspace . templates . default . spec . imagePullSecrets . push ( { "name" : `${ process . env . IMAGE_PULL_SECRET } ` } ) ;
61- values . components . imageBuilderMk3 . registry . secretName = `${ process . env . IMAGE_PULL_SECRET } ` ;
59+ values . components . imageBuilderMk3 . registry . secretName = "gitpod-image-pull-secret" ;
60+ }
61+
62+ if ( process . env . IMAGE_REGISTRY_WHITELIST ) {
63+ createNestedObject ( values , [ "components" , "server" , "defaultBaseImageRegistryWhitelist" ] , [ ] ) ;
64+ process . env . IMAGE_REGISTRY_WHITELIST . split ( ',' ) . forEach ( ( registry : string ) => {
65+ values . components . server . defaultBaseImageRegistryWhitelist . push ( registry ) ;
66+ } ) ;
67+
68+ values . components . server . defaultBaseImageRegistryWhitelist . push ( 'https://index.docker.io/v1/' ) ;
6269 }
6370
6471 const helmChart = cluster . addHelmChart ( 'GitpodChart' , {
6572 chart : 'gitpod' ,
6673 release : 'gitpod' ,
6774 repository : 'https://aledbf.github.io/gitpod-chart-cleanup/' ,
6875 namespace : 'default' ,
69- version : '1.2.15 ' ,
76+ version : '1.2.17 ' ,
7077 wait : true ,
7178 values,
7279 } ) ;
0 commit comments