Skip to content

Commit 8843d3e

Browse files
author
Andrew Farries
committed
Add volume and mount for chargebeeSecret
* If a secret name is specified via the experimental config, then mount the secret as a volume into the server deployment.
1 parent 474f6b5 commit 8843d3e

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,30 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
164164
env = append(env, envv...)
165165
}
166166

167+
chargebeeSecret := ""
168+
_ = ctx.WithExperimental(func(cfg *experimental.Config) error {
169+
if cfg.WebApp != nil && cfg.WebApp.Server != nil && cfg.WebApp.Server.ChargebeeSecret != "" {
170+
chargebeeSecret = cfg.WebApp.Server.ChargebeeSecret
171+
172+
volumes = append(volumes,
173+
corev1.Volume{
174+
Name: "chargebee-config",
175+
VolumeSource: corev1.VolumeSource{
176+
Secret: &corev1.SecretVolumeSource{
177+
SecretName: chargebeeSecret,
178+
},
179+
},
180+
})
181+
182+
volumeMounts = append(volumeMounts, corev1.VolumeMount{
183+
Name: "chargebee-config",
184+
MountPath: chargebeeMountPath,
185+
ReadOnly: true,
186+
})
187+
}
188+
return nil
189+
})
190+
167191
var podAntiAffinity *corev1.PodAntiAffinity
168192
_ = ctx.WithExperimental(func(cfg *experimental.Config) error {
169193
if cfg.WebApp != nil && cfg.WebApp.UsePodAntiAffinity {

0 commit comments

Comments
 (0)