Skip to content

Commit a3125cf

Browse files
Andrew Farriesroboquat
authored andcommitted
Make server jwtSecret configurable
Default to the existing default value, but allow the value to be overriden by a new experimental config value.
1 parent 0a378ee commit a3125cf

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

install/installer/pkg/components/server/configmap.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) {
2020
if err != nil {
2121
return nil, err
2222
}
23+
_ = ctx.WithExperimental(func(cfg *experimental.Config) error {
24+
if cfg.WebApp != nil && cfg.WebApp.OAuthServer.JWTSecret != "" {
25+
jwtSecret = cfg.WebApp.OAuthServer.JWTSecret
26+
}
27+
return nil
28+
})
2329

2430
license := ""
2531
if ctx.Config.License != nil {

install/installer/pkg/config/v1/experimental/experimental.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ type WebAppConfig struct {
5656
WorkspaceDefaults struct {
5757
WorkspaceImage string `json:"workspaceImage"`
5858
} `json:"workspaceDefaults"`
59+
OAuthServer struct {
60+
JWTSecret string `json:"jwtSecret"`
61+
} `json:"oauthServer"`
5962
}
6063

6164
type PublicAPIConfig struct {

0 commit comments

Comments
 (0)