Skip to content

Commit 2c0d3f9

Browse files
author
Andrew Farries
committed
Use chargebeeSecret in server configmap
* If specified, enable payment.
1 parent b53b197 commit 2c0d3f9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,14 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) {
7474
return nil
7575
})
7676

77+
chargebeeSecret := ""
78+
_ = ctx.WithExperimental(func(cfg *experimental.Config) error {
79+
if cfg.WebApp != nil && cfg.WebApp.Server != nil {
80+
chargebeeSecret = cfg.WebApp.Server.ChargebeeSecret
81+
}
82+
return nil
83+
})
84+
7785
githubApp := GitHubApp{}
7886
_ = ctx.WithExperimental(func(cfg *experimental.Config) error {
7987
if cfg.WebApp != nil && cfg.WebApp.Server != nil && cfg.WebApp.Server.GithubApp != nil {
@@ -162,7 +170,7 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) {
162170
ImageBuilderAddr: "image-builder-mk3:8080",
163171
CodeSync: CodeSync{},
164172
VSXRegistryUrl: fmt.Sprintf("https://open-vsx.%s", ctx.Config.Domain), // todo(sje): or "https://{{ .Values.vsxRegistry.host | default "open-vsx.org" }}" if not using OpenVSX proxy
165-
EnablePayment: false,
173+
EnablePayment: chargebeeSecret != "",
166174
InsecureNoDomain: false,
167175
ChargebeeProviderOptionsFile: "/chargebee/providerOptions",
168176
PrebuildLimiter: map[string]int{

0 commit comments

Comments
 (0)