Skip to content

Commit

Permalink
disk_gib, node_count, and instance_type
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig O'Donnell committed Sep 22, 2023
1 parent beaf6dd commit a7383f3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
9 changes: 9 additions & 0 deletions create-cluster/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ inputs:
ttl:
description: 'Cluster TTL (duration, max 48h)'
required: false
disk-gib:
description: 'Disk size in GiB'
required: false
node-count:
description: 'Number of nodes to provision'
required: false
instance-type:
description: 'Instance type to provision'
required: false
timeout-minutes:
description: 'Time to wait for the cluster to have a status of `running`'
required: false
Expand Down
14 changes: 7 additions & 7 deletions create-cluster/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion create-cluster/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dependencies": {
"@actions/core": "^1.10.0",
"esbuild-jest": "^0.5.0",
"replicated-lib": "^0.0.1-beta.2",
"replicated-lib": "^0.0.1-beta.3",
"ts-node": "^10.9.1"
},
"devDependencies": {
Expand Down
5 changes: 4 additions & 1 deletion create-cluster/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ async function run() {
const k8sDistribution = core.getInput('kubernetes-distribution');
const k8sVersion = core.getInput('kubernetes-version');
const k8sTTL = core.getInput('ttl');
const diskGib: number = +(core.getInput('disk-gib') || 50);
const nodeCount: number = +(core.getInput('node-count') || 1);
const instanceType = core.getInput('instance-type');
const timeoutMinutes: number = +(core.getInput('timeout-minutes') || 20);
const apiEndpoint = core.getInput('replicated-api-endpoint')
let kubeconfigPath = core.getInput('kubeconfig-path');
Expand All @@ -24,7 +27,7 @@ async function run() {
apiClient.endpoint = apiEndpoint
}

let cluster = await createCluster(apiClient, name, k8sDistribution, k8sVersion, k8sTTL);
let cluster = await createCluster(apiClient, name, k8sDistribution, k8sVersion, k8sTTL, diskGib, nodeCount, instanceType);
core.info(`Created cluster ${cluster.id} - waiting for it to be ready...`);
core.setOutput('cluster-id', cluster.id);

Expand Down

0 comments on commit a7383f3

Please sign in to comment.