Skip to content

Commit

Permalink
Joshd/sc 100435/cluster prepare command should allow setting (#49)
Browse files Browse the repository at this point in the history
* Allow specifying customer entitlements with prepare cluster

---------

Co-authored-by: jdewinne <[email protected]>
  • Loading branch information
jdewinne and jdewinne authored Mar 11, 2024
1 parent 796e689 commit 70c01ba
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion create-customer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.<br>Example:<br><pre>entitlements: \|<br> - name: "number-of-users"<br> value: "10"</pre><br> |
| is-kots-install-enabled | | False | If KOTS install should be enabled for the customer. |

## Outputs
Expand Down
7 changes: 6 additions & 1 deletion create-customer/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
<pre>entitlements: \|
- name: "number-of-users"
value: "10"</pre>
required: false
is-kots-install-enabled:
description: 'If KOTS install should be enabled for the customer.'
Expand Down
3 changes: 3 additions & 0 deletions prepare-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
```
Expand Down Expand Up @@ -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.<br>Example:<br><pre>customer-entitlements: \|<br> - name: "number-of-users"<br> value: "10"</pre><br> |

## Outputs
| Name | Description |
Expand Down
9 changes: 9 additions & 0 deletions prepare-cluster/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
<pre>customer-entitlements: \|
- name: "number-of-users"
value: "10"</pre>
required: false
outputs:
cluster-id: # id of the cluster
description: 'Contains the cluster id.'
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 70c01ba

Please sign in to comment.