From 70c01ba4e5eb75fc6c7e79521b42913fb47ef530 Mon Sep 17 00:00:00 2001 From: Joris 'Josh' De Winne Date: Mon, 11 Mar 2024 15:40:04 -0700 Subject: [PATCH] Joshd/sc 100435/cluster prepare command should allow setting (#49) * Allow specifying customer entitlements with prepare cluster --------- Co-authored-by: jdewinne --- create-customer/README.md | 2 +- create-customer/action.yml | 7 ++++++- prepare-cluster/README.md | 3 +++ prepare-cluster/action.yml | 9 +++++++++ 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/create-customer/README.md b/create-customer/README.md index eba9672..cd19329 100644 --- a/create-customer/README.md +++ b/create-customer/README.md @@ -41,7 +41,7 @@ create_customer ---> license_file | license-type | dev | True | License Type for the customer. | | channel-slug | | False | Channel to assign the customer to. | | expires-in | 0 | False | Expiration of the license in days. (default: 0 - never expires)) | -| entitlements | | False | Entitlements to assign to the customer. | +| entitlements | | False | Entitlements to assign to the customer.
Example:
entitlements: \|
- name: "number-of-users"
value: "10"

| | is-kots-install-enabled | | False | If KOTS install should be enabled for the customer. | ## Outputs diff --git a/create-customer/action.yml b/create-customer/action.yml index 07c4579..d1324bf 100644 --- a/create-customer/action.yml +++ b/create-customer/action.yml @@ -27,7 +27,12 @@ inputs: required: false default: '0' entitlements: - description: 'Entitlements to assign to the customer.' + description: | + Entitlements to assign to the customer. + Example: +
entitlements: \|
+        - name: "number-of-users"
+          value: "10"
required: false is-kots-install-enabled: description: 'If KOTS install should be enabled for the customer.' diff --git a/prepare-cluster/README.md b/prepare-cluster/README.md index 3daecbd..d93ffa2 100644 --- a/prepare-cluster/README.md +++ b/prepare-cluster/README.md @@ -29,6 +29,7 @@ helm_chart_name["helm-chart-name"] helm_run_preflights["helm-run-preflights"] kots_config_values["kots-config-values"] kots_wait_duration["kots-wait-duration"] +customer_entitlements["customer-entitlements"] cluster_id["cluster-id"] cluster_kubeconfig["cluster-kubeconfig"] app_slug ---> prepare_cluster @@ -54,6 +55,7 @@ helm_chart_name ---> prepare_cluster helm_run_preflights ---> prepare_cluster kots_config_values ---> prepare_cluster kots_wait_duration ---> prepare_cluster +customer_entitlements ---> prepare_cluster prepare_cluster ---> cluster_id prepare_cluster ---> cluster_kubeconfig ``` @@ -83,6 +85,7 @@ prepare_cluster ---> cluster_kubeconfig | helm-run-preflights | true | False | Run preflight checks (true/false) | | kots-config-values | | False | The KOTS config values to use | | 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") | +| customer-entitlements | | False | Entitlements to assign to the customer.
Example:
customer-entitlements: \|
- name: "number-of-users"
value: "10"

| ## Outputs | Name | Description | diff --git a/prepare-cluster/action.yml b/prepare-cluster/action.yml index 3e19eff..3ba6820 100644 --- a/prepare-cluster/action.yml +++ b/prepare-cluster/action.yml @@ -88,6 +88,14 @@ inputs: 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 + customer-entitlements: + description: | + Entitlements to assign to the customer. + Example: +
customer-entitlements: \|
+        - name: "number-of-users"
+          value: "10"
+ required: false outputs: cluster-id: # id of the cluster description: 'Contains the cluster id.' @@ -115,6 +123,7 @@ runs: customer-name: ${{ github.ref_name }}-${{ inputs.kubernetes-distribution }}-${{ inputs.kubernetes-version }} customer-email: ${{ github.ref_name }}@example.com license-type: "test" + entitlements: ${{ inputs.customer-entitlements }} channel-slug: ${{ steps.create-release.outputs.channel-slug }} - name: Create Cluster id: create-cluster