Skip to content

Commit bce4700

Browse files
authored
[installer] Remove payment endpoint - WEB-144 (#17233)
* [installer] Remove payment endpoint * fix * fix * Fix
1 parent a92e460 commit bce4700

File tree

9 files changed

+6
-101
lines changed

9 files changed

+6
-101
lines changed

dev/preview/workflow/preview/deploy-gitpod.sh

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -496,11 +496,6 @@ if [[ "${GITPOD_WSMANAGER_MK2}" == "true" ]]; then
496496
fi
497497

498498

499-
#
500-
# chargebee
501-
#
502-
yq w -i "${INSTALLER_CONFIG_PATH}" "experimental.webapp.server.chargebeeSecret" "chargebee-config"
503-
504499
#
505500
# Stripe
506501
#
@@ -571,22 +566,6 @@ for feature in ${GITPOD_WORKSPACE_FEATURE_FLAGS}; do
571566
echo "$feature" >> /tmp/defaultFeatureFlags
572567
done
573568

574-
#
575-
# configurePayment
576-
#
577-
SERVICE_WAITER_VERSION="$(yq r /tmp/versions.yaml 'components.serviceWaiter.version')"
578-
PAYMENT_ENDPOINT_VERSION="$(yq r /tmp/versions.yaml 'components.paymentEndpoint.version')"
579-
580-
# 2. render chargebee-config and payment-endpoint
581-
rm -f /tmp/payment
582-
for manifest in "$ROOT"/.werft/jobs/build/payment/*.yaml; do
583-
sed "s/\${NAMESPACE}/${PREVIEW_NAMESPACE}/g" "$manifest" \
584-
| sed "s/\${PAYMENT_ENDPOINT_VERSION}/${PAYMENT_ENDPOINT_VERSION}/g" \
585-
| sed "s/\${SERVICE_WAITER_VERSION}/${SERVICE_WAITER_VERSION}/g" \
586-
>> /tmp/payment
587-
echo "---" >> /tmp/payment
588-
done
589-
590569
#
591570
# configurePublicAPI
592571
#
@@ -606,7 +585,6 @@ WITH_VM=true "$ROOT/.werft/jobs/build/installer/post-process.sh" "${PREVIEW_NAME
606585
#
607586
# Cleanup from post-processing
608587
#
609-
rm -f /tmp/payment
610588
rm -f /tmp/defaultFeatureFlags
611589
rm -f /tmp/public-api
612590

@@ -635,7 +613,7 @@ rm -f "${INSTALLER_RENDER_PATH}"
635613
# =========================
636614
# Wait for objects to be ready
637615
# =========================
638-
for item in deployment.apps/blobserve deployment.apps/content-service deployment.apps/dashboard deployment.apps/ide-metrics deployment.apps/ide-proxy deployment.apps/ide-service deployment.apps/image-builder-mk3 deployment.apps/minio deployment.apps/node-labeler deployment.apps/payment-endpoint deployment.apps/proxy deployment.apps/public-api-server deployment.apps/redis deployment.apps/server deployment.apps/spicedb deployment.apps/usage deployment.apps/ws-manager deployment.apps/ws-manager-bridge deployment.apps/ws-proxy statefulset.apps/messagebus statefulset.apps/mysql statefulset.apps/openvsx-proxy daemonset.apps/agent-smith daemonset.apps/fluent-bit daemonset.apps/registry-facade daemonset.apps/ws-daemon; do
616+
for item in deployment.apps/blobserve deployment.apps/content-service deployment.apps/dashboard deployment.apps/ide-metrics deployment.apps/ide-proxy deployment.apps/ide-service deployment.apps/image-builder-mk3 deployment.apps/minio deployment.apps/node-labeler deployment.apps/proxy deployment.apps/public-api-server deployment.apps/redis deployment.apps/server deployment.apps/spicedb deployment.apps/usage deployment.apps/ws-manager deployment.apps/ws-manager-bridge deployment.apps/ws-proxy statefulset.apps/messagebus statefulset.apps/mysql statefulset.apps/openvsx-proxy daemonset.apps/agent-smith daemonset.apps/fluent-bit daemonset.apps/registry-facade daemonset.apps/ws-daemon; do
639617
kubectl --kubeconfig "${PREVIEW_K3S_KUBE_PATH}" --context "${PREVIEW_K3S_KUBE_CONTEXT}" rollout status "${item}" --namespace="${PREVIEW_NAMESPACE}"
640618
done
641619

install/installer/pkg/common/constants.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ const (
4242
ServerInstallationAdminPort = 9000
4343
ServerGRPCAPIPort = 9877
4444
SystemNodeCritical = "system-node-critical"
45-
PaymentEndpointComponent = "payment-endpoint"
4645
PublicApiComponent = "public-api-server"
4746
UsageComponent = "usage"
4847
WSManagerComponent = "ws-manager"

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

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ var vhostOpenVSXTmpl []byte
3838
//go:embed templates/configmap/vhost.ide-proxy.tpl
3939
var ideProxyTmpl []byte
4040

41-
//go:embed templates/configmap/vhost.payment-endpoint.tpl
42-
var vhostPaymentEndpointTmpl []byte
43-
4441
type commonTpl struct {
4542
Domain string
4643
ReverseProxy string
@@ -99,19 +96,10 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) {
9996
return nil, err
10097
}
10198

102-
paymentEndpoint, err := renderTemplate(vhostPaymentEndpointTmpl, commonTpl{
103-
Domain: ctx.Config.Domain,
104-
ReverseProxy: fmt.Sprintf("payment-endpoint.%s.%s:%d", ctx.Namespace, kubeDomain, 3002), // todo(sje): get port from (future) config
105-
})
106-
if err != nil {
107-
return nil, err
108-
}
109-
11099
data := map[string]string{
111-
"vhost.empty": *empty,
112-
"vhost.open-vsx": *openVSX,
113-
"vhost.payment-endpoint": *paymentEndpoint,
114-
"vhost.ide-proxy": *ideProxy,
100+
"vhost.empty": *empty,
101+
"vhost.open-vsx": *openVSX,
102+
"vhost.ide-proxy": *ideProxy,
115103
}
116104

117105
if ctx.Config.ObjectStorage.CloudStorage == nil {

install/installer/pkg/components/proxy/templates/configmap/vhost.payment-endpoint.tpl

Lines changed: 0 additions & 21 deletions
This file was deleted.

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

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,6 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) {
7878
defaultBaseImageRegistryWhitelist = allowList
7979
}
8080

81-
chargebeeSecret := ""
82-
_ = ctx.WithExperimental(func(cfg *experimental.Config) error {
83-
if cfg.WebApp != nil && cfg.WebApp.Server != nil {
84-
chargebeeSecret = cfg.WebApp.Server.ChargebeeSecret
85-
}
86-
return nil
87-
})
88-
8981
stripeSecret := ""
9082
_ = ctx.WithExperimental(func(cfg *experimental.Config) error {
9183
if cfg.WebApp != nil && cfg.WebApp.Server != nil {
@@ -280,7 +272,7 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) {
280272
MaximumEventLoopLag: 0.35,
281273
CodeSync: CodeSync{},
282274
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
283-
EnablePayment: chargebeeSecret != "" || stripeSecret != "" || stripeConfig != "",
275+
EnablePayment: stripeSecret != "" || stripeConfig != "",
284276
ChargebeeProviderOptionsFile: fmt.Sprintf("%s/providerOptions", chargebeeMountPath),
285277
StripeSecretsFile: fmt.Sprintf("%s/apikeys", stripeSecretMountPath),
286278
LinkedInSecretsFile: fmt.Sprintf("%s/linkedin", linkedInSecretMountPath),

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

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -160,29 +160,6 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
160160
ReadOnly: true,
161161
})
162162

163-
_ = ctx.WithExperimental(func(cfg *experimental.Config) error {
164-
if cfg.WebApp != nil && cfg.WebApp.Server != nil && cfg.WebApp.Server.ChargebeeSecret != "" {
165-
chargebeeSecret := cfg.WebApp.Server.ChargebeeSecret
166-
167-
volumes = append(volumes,
168-
corev1.Volume{
169-
Name: "chargebee-config",
170-
VolumeSource: corev1.VolumeSource{
171-
Secret: &corev1.SecretVolumeSource{
172-
SecretName: chargebeeSecret,
173-
},
174-
},
175-
})
176-
177-
volumeMounts = append(volumeMounts, corev1.VolumeMount{
178-
Name: "chargebee-config",
179-
MountPath: chargebeeMountPath,
180-
ReadOnly: true,
181-
})
182-
}
183-
return nil
184-
})
185-
186163
_ = ctx.WithExperimental(func(cfg *experimental.Config) error {
187164
if cfg.WebApp != nil && cfg.WebApp.Server != nil && cfg.WebApp.Server.StripeSecret != "" {
188165
stripeSecret := cfg.WebApp.Server.StripeSecret

install/installer/pkg/components/usage/networkpolicy.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,6 @@ func networkpolicy(ctx *common.RenderContext) ([]runtime.Object, error) {
4343
},
4444
},
4545
},
46-
{
47-
PodSelector: &metav1.LabelSelector{
48-
MatchLabels: map[string]string{
49-
"component": common.PaymentEndpointComponent,
50-
},
51-
},
52-
},
5346
{
5447
PodSelector: &metav1.LabelSelector{
5548
MatchLabels: map[string]string{

install/installer/pkg/config/v1/config.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ Additional config parameters that are in experimental state
131131
|`experimental.webapp.server.githubApp.marketplaceName`|string|N| ||
132132
|`experimental.webapp.server.githubApp.webhookSecret`|string|N| ||
133133
|`experimental.webapp.server.githubApp.certSecretName`|string|N| ||
134-
|`experimental.webapp.server.chargebeeSecret`|string|N| ||
135134
|`experimental.webapp.server.stripeSecret`|string|N| ||
136135
|`experimental.webapp.server.stripeConfig`|string|N| ||
137136
|`experimental.webapp.server.disableDynamicAuthProviderLogin`|bool|N| ||

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ type ServerConfig struct {
256256
OAuthServer OAuthServer `json:"oauthServer"`
257257
Session Session `json:"session"`
258258
GithubApp *GithubApp `json:"githubApp"`
259-
ChargebeeSecret string `json:"chargebeeSecret"`
259+
_ string `json:"chargebeeSecret"`
260260
StripeSecret string `json:"stripeSecret"`
261261
StripeConfig string `json:"stripeConfig"`
262262
LinkedInSecret string `json:"linkedInSecret"`

0 commit comments

Comments
 (0)