@@ -3,6 +3,7 @@ import { exec } from "../../../util/shell";
33import { Werft } from "../../../util/werft" ;
44import { getNodePoolIndex } from "../deploy-to-preview-environment" ;
55import { renderPayment } from "../payment/render" ;
6+ import { CORE_DEV_KUBECONFIG_PATH } from "../const" ;
67
78const BLOCK_NEW_USER_CONFIG_PATH = './blockNewUsers' ;
89const WORKSPACE_SIZE_CONFIG_PATH = './workspaceSizing' ;
@@ -66,6 +67,7 @@ export class Installer {
6667 this . configureIDE ( slice )
6768 this . configureObservability ( slice )
6869 this . configureAuthProviders ( slice )
70+ this . configureStripeAPIKeys ( slice )
6971 this . configureSSHGateway ( slice )
7072 this . configurePublicAPIServer ( slice )
7173 this . configureUsage ( slice )
@@ -161,6 +163,19 @@ EOF`)
161163 done` , { slice : slice } )
162164 }
163165
166+ private configureStripeAPIKeys ( slice : string ) {
167+ exec (
168+ `kubectl --kubeconfig ${ CORE_DEV_KUBECONFIG_PATH } -n werft get secret stripe-api-keys -o yaml > stripe-api-keys.secret.yaml` ,
169+ { slice } ,
170+ ) ;
171+ exec ( `yq w -i stripe-api-keys.secret.yaml metadata.namespace "default"` , { slice } ) ;
172+ exec ( `yq d -i stripe-api-keys.secret.yaml metadata.creationTimestamp` , { slice } ) ;
173+ exec ( `yq d -i stripe-api-keys.secret.yaml metadata.uid` , { slice } ) ;
174+ exec ( `yq d -i stripe-api-keys.secret.yaml metadata.resourceVersion` , { slice } ) ;
175+ exec ( `kubectl --kubeconfig "${ this . options . kubeconfigPath } " apply -f stripe-api-keys.secret.yaml` , { slice } ) ;
176+ exec ( `rm -f stripe-api-keys.secret.yaml` , { slice } ) ;
177+ }
178+
164179 private configureSSHGateway ( slice : string ) {
165180 exec ( `cat /workspace/host-key.yaml \
166181 | yq w - metadata.namespace ${ this . options . deploymentNamespace } \
0 commit comments