@@ -18,7 +18,7 @@ var createNestedObject = function (base: any, names: any, value: any) {
18
18
} ;
19
19
20
20
// TODO: switch to official gitpod.io build.
21
- const version = "aledbf-mk3.29 " ;
21
+ const version = "aledbf-mk3.40 " ;
22
22
23
23
export interface GitpodProps extends cdk . StackProps {
24
24
domain : string
@@ -54,19 +54,26 @@ export class GitpodStack extends cdk.Stack {
54
54
replace ( / { { issuerName} } / g, 'ca-issuer' ) ;
55
55
56
56
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 ) {
59
58
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/' ) ;
62
69
}
63
70
64
71
const helmChart = cluster . addHelmChart ( 'GitpodChart' , {
65
72
chart : 'gitpod' ,
66
73
release : 'gitpod' ,
67
74
repository : 'https://aledbf.github.io/gitpod-chart-cleanup/' ,
68
75
namespace : 'default' ,
69
- version : '1.2.15 ' ,
76
+ version : '1.2.17 ' ,
70
77
wait : true ,
71
78
values,
72
79
} ) ;
0 commit comments