@@ -3,6 +3,7 @@ import { exec } from "../../../util/shell";
3
3
import { Werft } from "../../../util/werft" ;
4
4
import { getNodePoolIndex } from "../deploy-to-preview-environment" ;
5
5
import { renderPayment } from "../payment/render" ;
6
+ import { CORE_DEV_KUBECONFIG_PATH } from "../const" ;
6
7
7
8
const BLOCK_NEW_USER_CONFIG_PATH = './blockNewUsers' ;
8
9
const WORKSPACE_SIZE_CONFIG_PATH = './workspaceSizing' ;
@@ -66,6 +67,7 @@ export class Installer {
66
67
this . configureIDE ( slice )
67
68
this . configureObservability ( slice )
68
69
this . configureAuthProviders ( slice )
70
+ this . configureStripeAPIKeys ( slice )
69
71
this . configureSSHGateway ( slice )
70
72
this . configurePublicAPIServer ( slice )
71
73
this . configureUsage ( slice )
@@ -161,6 +163,19 @@ EOF`)
161
163
done` , { slice : slice } )
162
164
}
163
165
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
+
164
179
private configureSSHGateway ( slice : string ) {
165
180
exec ( `cat /workspace/host-key.yaml \
166
181
| yq w - metadata.namespace ${ this . options . deploymentNamespace } \
0 commit comments