Skip to content

Commit

Permalink
Different settings for darwin and linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
smebberson committed Jun 16, 2024
1 parent 99c36ef commit 371ccf4
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion bin/c-mk-start.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';

const os = require('os');
const program = require('commander');
const { exec } = require('shelljs');

Expand All @@ -11,9 +12,26 @@ program
)
.parse(process.argv);

const platform = os.platform();
const profile = program.P ? ` --profile ${program.P}` : '';
const command = `minikube start${profile}`;

const defaultSettings = {
cpus: 4,
memory: 12288,
};
const settings = {
darwin: defaultSettings,
linux: {
cpus: 12,
memory: 24576,
},
};

exec(
`${command} --extra-config=apiserver.service-node-port-range=80-32767 --cpus=4 --memory=12288 --vm-driver=docker`
`${command} --extra-config=apiserver.service-node-port-range=80-32767 --cpus=${
(settings[platform] ?? defaultSettings).cpus
} --memory=${
(settings[platform] ?? defaultSettings).memory
} --vm-driver=docker`
);

0 comments on commit 371ccf4

Please sign in to comment.