diff --git a/create-cluster/action.yml b/create-cluster/action.yml index 44ab022..92a677d 100644 --- a/create-cluster/action.yml +++ b/create-cluster/action.yml @@ -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 diff --git a/create-cluster/package-lock.json b/create-cluster/package-lock.json index 1d24497..cf9d2b3 100644 --- a/create-cluster/package-lock.json +++ b/create-cluster/package-lock.json @@ -11,7 +11,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": { @@ -6201,9 +6201,9 @@ } }, "node_modules/replicated-lib": { - "version": "0.0.1-beta.2", - "resolved": "https://registry.npmjs.org/replicated-lib/-/replicated-lib-0.0.1-beta.2.tgz", - "integrity": "sha512-dD633Jgv+EYeo6KEnSrKNueAJZAawWyn+brrVJI8IpHHSih3Hb24+q3L9NlHF+Y5mLH3TRHg3LXxsREByaDu4g==", + "version": "0.0.1-beta.3", + "resolved": "https://registry.npmjs.org/replicated-lib/-/replicated-lib-0.0.1-beta.3.tgz", + "integrity": "sha512-URquI05IAmu2dzOqF4XvdBdl5/82rDfQLCm7dwGFqJ+Pbdxmz3yhzWnaBJa9U9plAvYmA5I53SU+sRaoeTC8sg==", "dependencies": { "@actions/core": "^1.10.0", "base64-js": "^1.5.1", @@ -12023,9 +12023,9 @@ "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==" }, "replicated-lib": { - "version": "0.0.1-beta.2", - "resolved": "https://registry.npmjs.org/replicated-lib/-/replicated-lib-0.0.1-beta.2.tgz", - "integrity": "sha512-dD633Jgv+EYeo6KEnSrKNueAJZAawWyn+brrVJI8IpHHSih3Hb24+q3L9NlHF+Y5mLH3TRHg3LXxsREByaDu4g==", + "version": "0.0.1-beta.3", + "resolved": "https://registry.npmjs.org/replicated-lib/-/replicated-lib-0.0.1-beta.3.tgz", + "integrity": "sha512-URquI05IAmu2dzOqF4XvdBdl5/82rDfQLCm7dwGFqJ+Pbdxmz3yhzWnaBJa9U9plAvYmA5I53SU+sRaoeTC8sg==", "requires": { "@actions/core": "^1.10.0", "base64-js": "^1.5.1", diff --git a/create-cluster/package.json b/create-cluster/package.json index 9cb6248..a86e0b8 100644 --- a/create-cluster/package.json +++ b/create-cluster/package.json @@ -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": { diff --git a/create-cluster/src/index.ts b/create-cluster/src/index.ts index aff8981..89c15a1 100644 --- a/create-cluster/src/index.ts +++ b/create-cluster/src/index.ts @@ -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'); @@ -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);