Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions install/installer/pkg/components/server/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
common.WebappTracingEnv(ctx),
common.AnalyticsEnv(&ctx.Config),
common.MessageBusEnv(&ctx.Config),
configcatEnv(ctx),
[]corev1.EnvVar{
{
Name: "CONFIG_PATH",
Expand Down Expand Up @@ -398,3 +399,24 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
},
}, nil
}

func configcatEnv(ctx *common.RenderContext) []corev1.EnvVar {
var sdkKey string
_ = ctx.WithExperimental(func(cfg *experimental.Config) error {
if cfg.WebApp != nil && cfg.WebApp.ConfigcatKey != "" {
sdkKey = cfg.WebApp.ConfigcatKey
}
return nil
})

if sdkKey == "" {
return nil
}

return []corev1.EnvVar{
{
Name: "CONFIGCAT_SDK_KEY",
Value: sdkKey,
},
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ type WebAppConfig struct {
UsePodAntiAffinity bool `json:"usePodAntiAffinity"`
DisableMigration bool `json:"disableMigration"`
Usage *UsageConfig `json:"usage,omitempty"`
ConfigcatKey string `json:"configcatKey"`
}

type WorkspaceDefaults struct {
Expand Down