Skip to content

Commit

Permalink
Adding wait-duration for kots install
Browse files Browse the repository at this point in the history
  • Loading branch information
jdewinne committed Sep 25, 2023
1 parent f7aca7c commit da42d20
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions kots-install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ inputs:
description: 'The namespace to install the application to'
default: "default"
required: false
wait-duration:
description: 'Timeout to be used while waiting for individual components to be ready. must be in Go duration format (eg: 10s, 2m) (default "2m")'
required: false
runs:
using: 'node16'
main: 'dist/index.js'
8 changes: 6 additions & 2 deletions kots-install/src/kots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export async function installApp(kotsPath: string, licenseFilePath: string, conf
const slug = core.getInput('app-slug');
const appVersionLabel = core.getInput('app-version-label');
const namespace = core.getInput('namespace');
const waitDuration = core.getInput('wait-duration');
// write the kubeconfig to a temp file
const { fd , path: kubeconfigPath , cleanup } = await (0, tmpPromise.file)({
postfix: '.yaml'
Expand Down Expand Up @@ -107,10 +108,13 @@ export async function installApp(kotsPath: string, licenseFilePath: string, conf
params.push("--license-file", licenseFilePath)
params.push("--kubeconfig", kubeconfigPath)
if (configFilePath !== '') {
params.push("--config-values", configFilePath);
params.push("--config-values", configFilePath);
}
if (appVersionLabel) {
params.push("--app-version-label", appVersionLabel);
params.push("--app-version-label", appVersionLabel);
}
if (waitDuration) {
params.push("--wait-duration", waitDuration);
}
await exec.exec(kotsPath, params, installOptions);
cleanup();
Expand Down
4 changes: 4 additions & 0 deletions prepare-cluster/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ inputs:
kots-config-values:
description: 'The KOTS config values to use'
required: false
kots-wait-duration:
description: 'Timeout for KOTS to be used while waiting for individual components to be ready. must be in Go duration format (eg: 10s, 2m) (default "2m")'
required: false
outputs:
cluster-id: # id of the cluster
description: 'Contains the cluster id.'
Expand Down Expand Up @@ -97,3 +100,4 @@ runs:
license-file: ${{ steps.create-customer.outputs.license-file }}
app-version-label: release__${{ steps.create-release.outputs.release-sequence }}
config-values: ${{ inputs.kots-config-values }}
wait-duration: ${{ inputs.kots-wait-duration }}

0 comments on commit da42d20

Please sign in to comment.