@autofleet/cli 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/index.js +13 -4
- package/package.json +1 -1
package/bin/index.js
CHANGED
|
@@ -35,10 +35,19 @@ yargs(hideBin(process.argv))
|
|
|
35
35
|
},
|
|
36
36
|
})
|
|
37
37
|
.command({
|
|
38
|
-
command: '
|
|
39
|
-
describe: '--
|
|
40
|
-
handler(argv) {
|
|
41
|
-
|
|
38
|
+
command: 'enableSimulator',
|
|
39
|
+
describe: '--cluster=dev1/e2eManager --variationId=<yourVariationId>',
|
|
40
|
+
async handler(argv) {
|
|
41
|
+
const SIMULATION_CLUSTER_FRONT = 'simulation-cluster-front';
|
|
42
|
+
const { cluster, variationId } = argv;
|
|
43
|
+
const nameSpacePrefix = await connectAndGetPrefix({
|
|
44
|
+
clusterName: cluster,
|
|
45
|
+
variationId,
|
|
46
|
+
});
|
|
47
|
+
await terminalCommand(`kubectl annotate ${nameSpacePrefix} service ${SIMULATION_CLUSTER_FRONT} cloud.google.com/load-balancer-type-`);
|
|
48
|
+
await terminalCommand(`kubectl patch svc ${nameSpacePrefix} ${SIMULATION_CLUSTER_FRONT} -p '{"spec": {"type": "LoadBalancer"}}' `);
|
|
49
|
+
await terminalCommand(`kubectl create ${nameSpacePrefix} rolebinding admin --clusterrole=cluster-admin --serviceaccount=${variationId}:default`);
|
|
50
|
+
console.log(`Successfully exposed ${SIMULATION_CLUSTER_FRONT} and added role binding to dispatch simulations`);
|
|
42
51
|
},
|
|
43
52
|
})
|
|
44
53
|
.parse();
|