@@ -21,8 +21,8 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) {
2121 return nil , err
2222 }
2323 _ = ctx .WithExperimental (func (cfg * experimental.Config ) error {
24- if cfg .WebApp != nil && cfg .WebApp .OAuthServer .JWTSecret != "" {
25- jwtSecret = cfg .WebApp .OAuthServer .JWTSecret
24+ if cfg .WebApp != nil && cfg .WebApp .Server != nil && cfg . WebApp . Server . OAuthServer .JWTSecret != "" {
25+ jwtSecret = cfg .WebApp .Server . OAuthServer .JWTSecret
2626 }
2727 return nil
2828 })
@@ -34,31 +34,31 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) {
3434
3535 workspaceImage := common .ImageName (common .ThirdPartyContainerRepo (ctx .Config .Repository , "" ), workspace .DefaultWorkspaceImage , workspace .DefaultWorkspaceImageVersion )
3636 _ = ctx .WithExperimental (func (cfg * experimental.Config ) error {
37- if cfg .WebApp != nil && cfg .WebApp .WorkspaceDefaults .WorkspaceImage != "" {
38- workspaceImage = cfg .WebApp .WorkspaceDefaults .WorkspaceImage
37+ if cfg .WebApp != nil && cfg .WebApp .Server != nil && cfg . WebApp . Server . WorkspaceDefaults .WorkspaceImage != "" {
38+ workspaceImage = cfg .WebApp .Server . WorkspaceDefaults .WorkspaceImage
3939 }
4040 return nil
4141 })
4242
4343 sessionSecret := "Important!Really-Change-This-Key!"
4444 _ = ctx .WithExperimental (func (cfg * experimental.Config ) error {
45- if cfg .WebApp != nil && cfg .WebApp .Session .Secret != "" {
46- sessionSecret = cfg .WebApp .Session .Secret
45+ if cfg .WebApp != nil && cfg .WebApp .Server != nil && cfg . WebApp . Server . Session .Secret != "" {
46+ sessionSecret = cfg .WebApp .Server . Session .Secret
4747 }
4848 return nil
4949 })
5050
5151 githubApp := GitHubApp {}
5252 _ = ctx .WithExperimental (func (cfg * experimental.Config ) error {
53- if cfg .WebApp != nil && cfg .WebApp .GithubApp != nil {
54- githubApp .AppId = cfg .WebApp .GithubApp .AppId
55- githubApp .AuthProviderId = cfg .WebApp .GithubApp .AuthProviderId
56- githubApp .BaseUrl = cfg .WebApp .GithubApp .BaseUrl
57- githubApp .CertPath = cfg .WebApp .GithubApp .CertPath
58- githubApp .Enabled = cfg .WebApp .GithubApp .Enabled
59- githubApp .LogLevel = cfg .WebApp .GithubApp .LogLevel
60- githubApp .MarketplaceName = cfg .WebApp .GithubApp .MarketplaceName
61- githubApp .WebhookSecret = cfg .WebApp .GithubApp .WebhookSecret
53+ if cfg .WebApp != nil && cfg .WebApp .Server != nil && cfg . WebApp . Server . GithubApp != nil {
54+ githubApp .AppId = cfg .WebApp .Server . GithubApp .AppId
55+ githubApp .AuthProviderId = cfg .WebApp .Server . GithubApp .AuthProviderId
56+ githubApp .BaseUrl = cfg .WebApp .Server . GithubApp .BaseUrl
57+ githubApp .CertPath = cfg .WebApp .Server . GithubApp .CertPath
58+ githubApp .Enabled = cfg .WebApp .Server . GithubApp .Enabled
59+ githubApp .LogLevel = cfg .WebApp .Server . GithubApp .LogLevel
60+ githubApp .MarketplaceName = cfg .WebApp .Server . GithubApp .MarketplaceName
61+ githubApp .WebhookSecret = cfg .WebApp .Server . GithubApp .WebhookSecret
6262 }
6363 return nil
6464 })
0 commit comments