Skip to content

Commit 01d9227

Browse files
authored
Add storage class for kots install (#79)
* Add storage class
1 parent c98ab3b commit 01d9227

File tree

28 files changed

+85
-11
lines changed

28 files changed

+85
-11
lines changed

archive-channel/dist/index.js

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

archive-channel/dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

archive-customer/dist/index.js

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

archive-customer/dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

create-cluster/dist/index.js

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

create-cluster/dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

create-customer/dist/index.js

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

create-customer/dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

create-object-store/dist/index.js

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

create-object-store/dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

create-release/dist/index.js

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

create-release/dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

expose-port/dist/index.js

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

expose-port/dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

helm-install/dist/index.js

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

helm-install/dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

kots-install/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ license_file["license-file"]
1515
config_values["config-values"]
1616
namespace["namespace"]
1717
wait_duration["wait-duration"]
18+
storage_class["storage-class"]
1819
kubeconfig ---> kots_install
1920
kots_version ---> kots_install
2021
app_slug ---> kots_install
@@ -24,6 +25,7 @@ license_file ---> kots_install
2425
config_values ---> kots_install
2526
namespace ---> kots_install
2627
wait_duration ---> kots_install
28+
storage_class ---> kots_install
2729
```
2830
## Inputs
2931
| Name | Default | Required | Description |
@@ -37,6 +39,7 @@ wait_duration ---> kots_install
3739
| config-values | | False | The config values to use. This can be a path to a file or the contents of the file. |
3840
| namespace | default | False | The namespace to install the application to |
3941
| wait-duration | | False | Timeout to be used while waiting for individual components to be ready. must be in Go duration format (eg: 10s, 2m) (default "2m") |
42+
| storage-class | | False | Sets the storage class to use for the KOTS Admin Console components. Default: unset, which means the default storage class will be used. |
4043

4144
## Outputs
4245
| Name | Description |

kots-install/action.yml

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ inputs:
3030
wait-duration:
3131
description: 'Timeout to be used while waiting for individual components to be ready. must be in Go duration format (eg: 10s, 2m) (default "2m")'
3232
required: false
33+
storage-class:
34+
description: "Sets the storage class to use for the KOTS Admin Console components. Default: unset, which means the default storage class will be used."
35+
required: false
3336
runs:
3437
using: "node20"
3538
main: "index.js"

kots-install/dist/index.js

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

kots-install/dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

prepare-cluster/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ helm_run_preflights["helm-run-preflights"]
3333
kots_config_values["kots-config-values"]
3434
kots_version["kots-version"]
3535
kots_wait_duration["kots-wait-duration"]
36+
kots_storage_class["kots-storage-class"]
3637
customer_entitlements["customer-entitlements"]
3738
helm_extra_repos["helm-extra-repos"]
3839
cluster_id["cluster-id"]
@@ -64,6 +65,7 @@ helm_run_preflights ---> prepare_cluster
6465
kots_config_values ---> prepare_cluster
6566
kots_version ---> prepare_cluster
6667
kots_wait_duration ---> prepare_cluster
68+
kots_storage_class ---> prepare_cluster
6769
customer_entitlements ---> prepare_cluster
6870
helm_extra_repos ---> prepare_cluster
6971
prepare_cluster ---> cluster_id
@@ -99,6 +101,7 @@ prepare_cluster ---> cluster_kubeconfig
99101
| kots-config-values | | False | The KOTS config values to use |
100102
| kots-version | latest | False | The version of KOTS to use |
101103
| kots-wait-duration | | False | 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") |
104+
| kots-storage-class | | False | Sets the storage class to use for the KOTS Admin Console components. Default: unset, which means the default storage class will be used. |
102105
| customer-entitlements | | False | Entitlements to assign to the customer.<br>Example:<br><pre>customer-entitlements: \|<br> - name: "number-of-users"<br> value: "10"</pre><br> |
103106
| helm-extra-repos | | True | Extra helm repos to add.<br>Example:<br><pre>helm-extra-repos: \|<br> - repo_name: "cnpg"<br> url: "https://cloudnative-pg.github.io/charts"<br> namespace: "cnpg-system"<br> chart_name: "cloudnative-pg"<br> - repo_name: "minio-operator"<br> url: "https://operator.min.io"<br> namespace: "minio-operator"<br> chart_name: "operator"</pre><br> |
104107

prepare-cluster/action.yml

+4
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ inputs:
9999
kots-wait-duration:
100100
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")'
101101
required: false
102+
kots-storage-class:
103+
description: "Sets the storage class to use for the KOTS Admin Console components. Default: unset, which means the default storage class will be used."
104+
required: false
102105
customer-entitlements:
103106
description: |
104107
Entitlements to assign to the customer.
@@ -222,3 +225,4 @@ runs:
222225
INPUT_WAIT-DURATION: ${{ inputs.kots-wait-duration }}
223226
INPUT_NAMESPACE: ${{ inputs.namespace }}
224227
INPUT_KOTS-VERSION: ${{ inputs.kots-version }}
228+
INPUT_STORAGE-CLASS: ${{ inputs.kots-storage-class }}

prepare-cluster/dist/index.js

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

prepare-cluster/dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

remove-cluster/dist/index.js

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

remove-cluster/dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/kots-install/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export async function actionKotsInstall() {
1313
const namespaceInput = core.getInput("namespace") || "default";
1414
const waitDurationInput = core.getInput("wait-duration");
1515
const sharedPasswordInput: string = core.getInput("shared-password");
16+
const storageClassInput = core.getInput("storage-class");
1617

1718
let licenseFilePath = '';
1819
if (fs.existsSync(licenseFileInput)) {
@@ -43,6 +44,7 @@ export async function actionKotsInstall() {
4344
sharedPassword: sharedPasswordInput,
4445
appVersionLabel: appVersionLabelInput,
4546
waitDuration: waitDurationInput,
47+
storageClass: storageClassInput,
4648
};
4749
await installApp(kostPath, licenseFilePath, valuesFilePath, opts);
4850
}

src/kots-install/kots.ts

+4
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ export type installAppOptions = {
7676
sharedPassword?: string,
7777
appVersionLabel?: string,
7878
waitDuration?: string,
79+
storageClass?: string,
7980
}
8081

8182
export async function installApp(kotsPath: string, licenseFilePath: string, configFilePath: string, opts: installAppOptions) {
@@ -116,6 +117,9 @@ export async function installApp(kotsPath: string, licenseFilePath: string, conf
116117
if (opts.waitDuration) {
117118
params.push("--wait-duration", opts.waitDuration);
118119
}
120+
if (opts.storageClass) {
121+
params.push("--storage-class", opts.storageClass);
122+
}
119123
await exec.exec(kotsPath, params, installOptions);
120124
cleanup();
121125
} catch (error) {

0 commit comments

Comments
 (0)